diff --git a/knowledge-base.yaml b/knowledge-base.yaml index 2dd2683..51e1c05 100644 --- a/knowledge-base.yaml +++ b/knowledge-base.yaml @@ -11,6 +11,9 @@ params: authors: true # show article authors in the article header topics: true # show assigned topics in the article header time: true # show reading time in the article header + git: + tree: https://github.com/Perlkonig/grav-skeleton-knowledge-base/blob/master/ + commits: https://github.com/Perlkonig/grav-skeleton-knowledge-base/commits/master/ front: # params for the front page content maxrows: 3 # the maximum number of rows on the front page maxentries: 5 # maximum number of articles displayed for each category diff --git a/languages.yaml b/languages.yaml index 0ec14d9..d5b09ed 100644 --- a/languages.yaml +++ b/languages.yaml @@ -10,6 +10,8 @@ en: RELATED_ARTICLES: Related Articles COMMENTS: Comments CATEGORY: "Category:" + GIT_PAGE_EDIT: "Edit this page" + GIT_PAGE_HISTORY: "View history" fr: FOOTER_TEXT:

Ce thème à été avec par Perlkönig.

CATEGORIES: Catégories @@ -22,6 +24,8 @@ fr: RELATED_ARTICLES: Articles similaires COMMENTS: Commentaires CATEGORY: "Catégorie : " + GIT_PAGE_EDIT: "Editer cette page" + GIT_PAGE_HISTORY: "Voir l'historique" cs: FOOTER_TEXT:

Tento motiv byl -án s uživatelem Perlkönig.

CATEGORIES: Kategorie diff --git a/templates/item.html.twig b/templates/item.html.twig index 8e7bfa1..7f985ce 100644 --- a/templates/item.html.twig +++ b/templates/item.html.twig @@ -40,6 +40,12 @@ {% if grav.theme.config.params.articles.show.time %} {{ page.content|readingtime }} {% endif %} + {% if grav.theme.config.params.articles.git.tree %} + {% include 'partials/git_edit_link.html.twig' %} + {% endif %} + {% if grav.theme.config.params.articles.git.commits %} + {% include 'partials/git_history_link.html.twig' %} + {% endif %} {% endif %} diff --git a/templates/partials/git_edit_link.html.twig b/templates/partials/git_edit_link.html.twig new file mode 100644 index 0000000..90795fb --- /dev/null +++ b/templates/partials/git_edit_link.html.twig @@ -0,0 +1 @@ + {{ 'GIT_PAGE_EDIT'|t }} \ No newline at end of file diff --git a/templates/partials/git_history_link.html.twig b/templates/partials/git_history_link.html.twig new file mode 100644 index 0000000..1f7cadf --- /dev/null +++ b/templates/partials/git_history_link.html.twig @@ -0,0 +1 @@ + {{ 'GIT_PAGE_HISTORY'|t }} \ No newline at end of file