Skip to content

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.

1 participant