summaryrefslogtreecommitdiff
path: root/layouts/partials/edit_post.html
AgeCommit message (Collapse)Author
2022-03-27Use `site` function instead of `.Site` or `$.Site`Aditya Telange
- The site function provides global access to the same data as the .Site page method. - Current context (`.`) is never considered.
2021-03-30Fix Spacing in overall repoAditya Telange
2021-03-28Fix path in editPost URL for Windows (#333)Syphdias
`.File.Path` is OS dependant and uses `\` as directory separator. This leads to cases where posts get the wrong URL, if in a sub folder, e.g. `content/posts/folder\post.md`. One idea was to replace `\` with `/` this however breaks valid files (on Unix systems) which include `\` in the file name. According to the docs [`path.Join`](layouts/partials/edit_post.html) is OS unaware and converts to a Unix-like path. > Note: All path elements on Windows are converted to slash ('/') separators. PS: It looks like hugo also uses this internally to build URLs. PPS: Solution was discussed in #278.
2021-03-23Add option to show link in meta data for editing posts (#278)Syphdias
Usage - in site config => Params: editPost: URL: "https://github.com/<path_to_repo>/content" Text: "Suggest Changes" # edit text appendFilePath: true # to append file path to Edit link - in front-matter vars => --- editPost: URL: "https://github.com/<path_to_repo>/content" Text: "Suggest Changes" # edit text appendFilePath: true # to append file path to Edit link --- - Front-matter vars overrides global ones