Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add possibility to hide parts from the footer #789

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,13 @@ For example, to render a link to an account of user `john.doe` at platform `devi
- The `user_url` is rendered as given without handling any special characters within.


### Hiding parts from the footer

- You can hide the feed part from the footer by setting `site.minima.hide_feed_from_footer` to `true` in `_config.yml`.
- You can hide the author part from the footer by setting `site.minima.hide_author_from_footer` to `true` in `_config.yml`.
- You can hide the description part from the footer by setting `site.minima.hide_description_from_footer` to `true` in `_config.yml`.


### Enabling Google Analytics

To enable Google Analytics, add the following lines to your Jekyll site:
Expand Down
13 changes: 8 additions & 5 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ description: >
# If you clone the Minima repo and build locally, use this setting.
theme: minima

# As of November 2023, GitHub Pages still uses Minima 2.5.1 (https://pages.github.com/versions/).
# If you want to use the latest Minima version on GitHub Pages, use the following setting and
# As of November 2023, GitHub Pages still uses Minima 2.5.1 (https://pages.github.com/versions/).
# If you want to use the latest Minima version on GitHub Pages, use the following setting and
# add a line comment on "theme: minima" above.
#remote_theme: jekyll/minima

Expand Down Expand Up @@ -45,9 +45,9 @@ minima:
# solarized-dark Dark variant of solarized color scheme.
# solarized Adaptive skin for solarized color scheme skins.
skin: classic

# Minima date format.
# The default value is "%b %d, %Y" (e.g. Nov 14, 2023)
# The default value is "%b %d, %Y" (e.g. Nov 14, 2023)
# Refer to https://shopify.github.io/liquid/filters/date/ if you want to customize this.
#date_format: "%b-%d-%Y"

Expand All @@ -71,4 +71,7 @@ minima:
# - { platform: x, user_url: "https://x.com/jekyllrb" }
# - { platform: youtube, user_url: "https://www.youtube.com/jekyll" }


# Hide parts from footer.
# hide_feed_from_footer: true
# hide_author_from_footer: true
# hide_description_from_footer: true
16 changes: 11 additions & 5 deletions _includes/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,18 @@

<div class="footer-col-wrapper">
<div class="footer-col">
{%- assign feed_path = site.feed.path | default: 'feed.xml' %}
{%- assign found_feed_paths = site.pages | where: 'path', feed_path %}
{%- if found_feed_paths.size > 0 and site.minima.hide_feed_from_footer != true %}
<p class="feed-subscribe">
<a href="{{ site.feed.path | default: 'feed.xml' | absolute_url }}">
<a href="{{ feed_path | absolute_url }}">
<svg class="svg-icon orange">
<use xlink:href="{{ 'assets/minima-social-icons.svg#rss' | relative_url }}"></use>
</svg><span>Subscribe</span>
</a>
</p>
{%- if site.author %}
{%- endif %}
{%- if site.author and site.minima.hide_author_from_footer != true %}
<ul class="contact-list">
{% if site.author.name -%}
<li class="p-name">{{ site.author.name | escape }}</li>
Expand All @@ -23,9 +27,11 @@
</ul>
{%- endif %}
</div>
<div class="footer-col">
<p>{{ site.description | escape }}</p>
</div>
{%- if site.description and site.minima.hide_description_from_footer != true %}
<div class="footer-col">
<p>{{ site.description | escape }}</p>
</div>
{%- endif }
</div>

<div class="social-links">
Expand Down
Loading