From 675dfd3ade2b5a05d0343c7248d41459469209e9 Mon Sep 17 00:00:00 2001 From: Dan Beghin Date: Fri, 8 Jan 2021 11:40:36 -0600 Subject: [PATCH] fix(git): add config for displaying git info (#14) This config now allows the git info links to be hidden if desired (as well as moves the bug filing link into the git-info partial template to also be hidden, since it references the git repo). Note: The organization github link is still exposed and visible. --- README.md | 4 ++-- _includes/footer.html | 4 +--- _includes/git-info.html | 3 +++ 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 8d1439d..49f0090 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ guardian: social_links: twitter: github_org: - github_repo: + github_repo: (if present, GitHub links will be rendered in the footer) email_subscription_url: tracking: google_analytics_code: @@ -55,7 +55,7 @@ guardian: * `analytics` - if `site.guardian.tracking.google_analytics_code` is populated, this will include GA tracking code * `header` - included on the `default` layout; renders the header with `site.guardian.style.logo_url` and `site.guardian.style.header_background_url` * `footer` - included on the `default` layout; renders a footer with social links - * `git-info` - includes links to GitHub to view/edit content + * `git-info` - includes links to GitHub to view/edit content (if `site.guardian.social_links.github_repo` is present) * `disqus` - included on the `post` layout; if `site.guardian.tracking.disqus_shortname` is populated, this will include a Disqus comment block ### Assets diff --git a/_includes/footer.html b/_includes/footer.html index 545213b..b8ea5c7 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -14,15 +14,13 @@

© Copyright {{ site.time | date: '%Y' }}, Widen Enterprises, Inc.

-

Looking for work? Come engineer with us!

-

Something wrong with this page? Please file a bug.

{% include git-info.html %} diff --git a/_includes/git-info.html b/_includes/git-info.html index 1bc05c9..4a00596 100644 --- a/_includes/git-info.html +++ b/_includes/git-info.html @@ -1,3 +1,5 @@ +{% if site.guardian.social_links.github_repo %} +

Something wrong with this page? Please file a bug.

+{% endif %}