Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Page path variable #232

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

archiekennedy
Copy link

@archiekennedy archiekennedy commented Apr 15, 2021

This adds the {{path}} variable that stores the path to the current page, excluding the filename.

Example

src/pages/about.html           -> 
src/pages/subfolder/about.html -> subfolder/

Use case

Generating canonical tags, for example:

<link rel="canonical" href="https://example.com/{{path}}{{page}}.html">

@archiekennedy archiekennedy changed the title Feature/page path variable Page path variable Apr 15, 2021
@archiekennedy
Copy link
Author

@DanielRuf can you review this PR? Thanks 😃

@archiekennedy
Copy link
Author

@joeworkman can you take a look at these changes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant