Make relative source path available for themes

- **Need**: I didn't find a way to figure out from article the original name from the file (md or rst) it was generated,
- **Typical use case:** users may modify the version of their article from a direct link opening GitHub in edition mode,
- **Proposal**: Make a article.orig_relpath available for themes article.html template.

Exemple in YOURTHEME/template/article.html:
```
...
<button onclick="window.location.href='https://github.com/getpelican/pelican/edit/master/{{ article.orig_relpath }}'">
  Modify this article under GitLab
</button>
...
```
This commit is contained in:
Baillette 2018-10-03 23:54:01 +02:00 committed by GitHub
commit 5e9fa2453a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -595,6 +595,7 @@ class ArticlesGenerator(CachingGenerator):
all_articles.append(article)
elif article.status == "draft":
all_drafts.append(article)
article.orig_relpath = f;
self.add_source_path(article)
self.articles, self.translations = process_translations(all_articles)