diff --git a/themes/mytheme/blueprints.yaml b/themes/mytheme/blueprints.yaml index 8d5400cd99..169126451a 100644 --- a/themes/mytheme/blueprints.yaml +++ b/themes/mytheme/blueprints.yaml @@ -16,3 +16,79 @@ license: MIT dependencies: - { name: grav, version: '>=1.6.0' } + - git-sync +form: + validation: loose + fields: + tabs: + type: tabs + active: 1 + fields: + gitsynclink_options: + type: tab + title: 'Git Sync Link' + fields: + gitsyncsetup: + type: section + title: Setup + underline: true + display_of_git_sync_repo_link: + type: select + size: medium + classes: fancy + label: 'Location of Git Sync Link' + default: menu + options: + menu: Menu + page: 'Page (visible when ''Chromeless'')' + footer: Footer + none: None + type_of_git_sync_repo_link: + type: select + size: medium + label: 'Type of Git Sync Link' + default: view + options: + view: 'View Git Repository' + edit: 'View/Edit Page in Git Repository' + gitsyncoptions: + type: section + title: Appearance + underline: true + custom_git_sync_repo_link_icon: + type: input.text + size: small + label: 'Custom Font Awesome Icon' + description: 'Short name, e.g. ''code-fork''.' + validate: + type: text + custom_git_sync_repo_link_text: + type: input.text + size: long + label: 'Custom Link Text' + description: 'Link text, e.g. ''View Page in GitHub'' or ''View Page as Markdown''.' + validate: + type: text + git_sync_edit_note_text: + type: input.text + size: medium + label: 'Text before Page Link' + description: 'The text before Git Sync Link located on a Page, e.g. ''Have a suggestion or correction?'' or ''Want to reuse this open content?''.' + custom_git_sync_repo_presentation_link_text: + type: input.text + size: long + label: 'Custom Presentation Link Text' + description: 'Link text for embedded Presentations, e.g. ''View Slides in GitHub'' or ''View Slides as Markdown''.' + validate: + type: text + gitsyncadvanced: + type: section + title: Advanced + underline: true + git_sync_repo_link: + type: input.url + label: 'Custom Git Repository Tree URL' + help: 'Enter the URL that leads to the pages folder of your Git Repository.' + description: 'URL path to pages folder for ''View/Edit Page in Git Repository'' option, but with ''/pages'' and everything following it removed. For example, ''https://github.com/paulhibbitts/demo-grav-course-hub/tree/master''.' + validate: + type: URL diff --git a/themes/mytheme/templates/README.html.twig b/themes/mytheme/templates/README.html.twig index 61491b2846..f626d6b50c 100644 --- a/themes/mytheme/templates/README.html.twig +++ b/themes/mytheme/templates/README.html.twig @@ -42,7 +42,21 @@ {% endif %} {% endif %} + + {% if page.taxonomy.tag|length > 0 %} + {% set taglist = [] %} + {% for tag in page.taxonomy.tag %} + {% set taglist = taglist|merge([''~tag~'']) %} + {% endfor %} +
+ {% endif %} + {% if theme_var('display_of_git_sync_repo_link') == 'page' and not (grav.uri.param('summaryonly') or grav.uri.param('onlysummary')) %} +{% include 'partials/git_sync_repo_link_note.html.twig' %}
+ {% endif %} +