Skip to content

A Pelican plugin that adds a github_edit_url attribute to articles and pages, similar to Read the Docs pages

License

Notifications You must be signed in to change notification settings

peterdesmet/pelican-github-edit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub edit URL

A Pelican plugin that adds a github_edit_url attribute to articles and pages, similar to Read the Docs pages.

Installation

  1. Download this plugin
  2. Place it in your plugins directory
  3. Add pelican-github-edit to PLUGINS in your settings file.

Or see the general Plugin installation instructions.

Usage

Add the URL of your public website repository (including the path to the content directory) to your settings file:

GITHUB_CONTENT_URL = "https://github.com/your_user_name/your_website_repo/blob/master/your_content_dir" # No trailing slash

This will activate the github_edit_url attribute for all articles and pages, which you can use in templates as follows:

Article template:

<a href="{{ article.github_edit_url }}">Edit on GitHub</a>

Page template:

<a href="{{ page.github_edit_url }}">Edit on GitHub</a>

LICENSE

LICENSE

About

A Pelican plugin that adds a github_edit_url attribute to articles and pages, similar to Read the Docs pages

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages