Skip to content
This repository has been archived by the owner on Aug 1, 2023. It is now read-only.

Commit

Permalink
make permalinks end with / instead of .md or .html - makes gh-pages h…
Browse files Browse the repository at this point in the history
…appy
  • Loading branch information
fredemmott committed Nov 7, 2018
1 parent ae6956d commit 5f65158
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/PageSections/FrontMatter.hh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ final class FrontMatter extends PageSection {
$pp = $config['permalinkPrefix'] ?? null;
if ($pp !== null) {
if ($path !== null) {
$fields['permalink'] = $pp.$path;
$fields['permalink'] = $pp.$path
|> Str\strip_suffix($$, '.md')
|> Str\strip_suffix($$, '.html')
|> $$.'/';
}
}
}
Expand Down

0 comments on commit 5f65158

Please sign in to comment.