panini icon indicating copy to clipboard operation
panini copied to clipboard

Page path variable

Open archiekennedy opened this issue 4 years ago • 2 comments

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 avatar Apr 15 '21 13:04 archiekennedy

@DanielRuf can you review this PR? Thanks :smiley:

archiekennedy avatar Apr 16 '21 17:04 archiekennedy

@joeworkman can you take a look at these changes?

archiekennedy avatar Apr 25 '21 14:04 archiekennedy