Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
73 changes: 15 additions & 58 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,8 @@ Refers to snippets of code within the `_includes` directory that can be inserted
- `head.html` &mdash; Code-block that defines the `<head></head>` in *default* layout.
- `custom-head.html` &mdash; Placeholder to allow users to add more metadata to `<head />`.
- `header.html` &mdash; Defines the site's main header section. By default, pages with a defined `title` attribute will have links displayed here.
- `social.html` &mdash; Renders social-media icons based on the `minima:social_links` data in the config file.
- `social-item.html` &mdash; Template to render individual list-item containing graphic link to configured social-profile.
- `social-links/*.svg` &mdash; SVG markup components of supported social-icons.
- `social.html` &mdash; Renders social-media icons based on the `minima:social_links` data in the config file using
the latest version of Font Awesome Free webfonts via remote CDN.


### Sass
Expand Down Expand Up @@ -283,67 +282,25 @@ Minima 2.x | Minima 3.0

You can add links to the accounts you have on other sites, with respective icon as an SVG graphic, via the config file.
From `Minima-3.0` onwards, the social media data is sourced from config key `minima.social_links`. It is a list of key-value pairs, each entry
corresponding to a link rendered in the footer. For example, to render links to Jekyll GitHub repository and Twitter account, one should have:
corresponding to a link rendered in the footer. For example, to render links to Jekyll GitHub repository and Twitter account (now X), one
should have:

```yaml
minima:
social_links:
- { platform: github, user_url: "https://github.com/jekyll/jekyll" }
- { platform: twitter, user_url: "https://twitter.com/jekyllrb" }
- title: Jekyll repository at GitHub
icon: github
url: "https://github.com/jekyll/jekyll"
- title: Jekyll at X (formerly Twitter)
icon: x-twitter
url: "https://x.com/jekyllrb"
```

Apart from the necessary keys illustrated above, `title` may also be defined to render a custom link-title. By default, the title is the same
as `platform`. The `platform` key corresponds to the SVG id of the sprite in the composite file at URL `/assets/minima-social-icons.svg`.

The theme ships with an icon for `rss` and icons of select social-media platforms:

- `bluesky`
- `codeberg`
- `devto`
- `dribbble`
- `facebook`
- `flickr`
- `github`
- `gitlab`
- `google_scholar`
- `instagram`
- `keybase`
- `linkedin`
- `mastodon`
- `microdotblog`
- `pinterest`
- `stackoverflow`
- `telegram`
- `twitter`
- `whatsapp`
- `x`
- `youtube`

To render a link to a platform not listed above, one should first create a file at path `_includes/social-icons/<PLATFORM>.svg` comprised of
graphic markup **without the top-level `<svg></svg>`**. The icon is expected to be centered within a viewbox of `"0 0 16 16"`. Then, make an
entry under key `minima.social_links`.

For example, to render a link to an account of user `john.doe` at platform `deviantart.com`, the steps to follow would be:
- Get DeviantArt logo in SVG format.
- Using a text-editor, open the downloaded file to inspect if the `viewBox` attribute is defined on the `<svg>` element and is set
as `"0 0 16 16" (or similar "square" dimension)`.
- If the `viewBox` attribute is non-square or undefined, the graphic *may optionally need* to be edited in a vector graphic editor such as
*Inkscape* or *Adobe Illustrator* for properly aligned render on page.
- Edit the SVG file in text-editor to delete everything **except** what is contained between `<svg></svg>` and save it into the Jekyll
project at path `_includes/social-icons/deviantart.svg`.
- Finally, edit the Jekyll config file to enable loading of new icon graphic with:
```yaml
minima:
social_links:
- platform: deviantart # same as SVG filename.
user_url: "https://www.deviantart.com/john.doe" # URL of profile page.
title: My profile at DeviantArt.com # Optional. Text displayed on hovering over link.
```

**Notes:**
- The list of social-links is declarative. List-items are rendered in the order declared in the downstream configuration file and not merged
with entries from upstream config file(s) such as theme-config-file or prior local config files.
- The `user_url` is rendered as given without handling any special characters within.
where `title` corresponds to the link-title displayed when a visitor hovers mouse-pointer over url / icon and
`icon` refers to the Font Awesome icon id. e.g. `github` corresponds to `fa-github`.

Social platform icons are rendered using the latest version of Font Awesome Free webfonts sourced via remote CDN.
The full list of available social icons can be found at https://fontawesome.com/search?ic=brands


### Enabling Google Analytics
Expand Down
35 changes: 14 additions & 21 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,24 +51,17 @@ minima:
# Refer to https://shopify.github.io/liquid/filters/date/ if you want to customize this.
#date_format: "%b-%d-%Y"

# Generate social links in footer.
#social_links:
# - { platform: devto, user_url: "https://dev.to/jekyll" }
# - { platform: dribbble, user_url: "https://dribbble.com/jekyll" }
# - { platform: facebook, user_url: "https://www.facebook.com/jekyll" }
# - { platform: flickr, user_url: "https://www.flickr.com/photos/jekyll" }
# - { platform: github, user_url: "https://github.com/jekyll/minima" }
# - { platform: gitlab, user_url: "https://gitlab.com/jekyll" }
# - { platform: google_scholar, user_url: "https://scholar.google.com/citations?user=qc6CJjYAAAAJ" }
# - { platform: instagram, user_url: "https://www.instagram.com/jekyll" }
# - { platform: keybase, user_url: "https://keybase.io/jekyll" }
# - { platform: linkedin, user_url: "https://www.linkedin.com/in/jekyll" }
# - { platform: microdotblog, user_url: "https://micro.blog/jekyll" }
# - { platform: pinterest, user_url: "https://www.pinterest.com/jekyll" }
# - { platform: stackoverflow, user_url: "https://stackoverflow.com/users/1234567/jekyll" }
# - { platform: telegram, user_url: "https://t.me/jekyll" }
# - { platform: twitter, user_url: "https://twitter.com/jekyllrb" }
# - { platform: x, user_url: "https://x.com/jekyllrb" }
# - { platform: youtube, user_url: "https://www.youtube.com/jekyll" }


# Social Media Links
# Renders icons via Font Awesome Free webfonts CDN, based on ordered list of entries.
#
# Entry keys:
# * title Tooltip rendered on hovering over icon.
# * icon Font Awesome icon id. `github` corresponds to `fa-github`.
# * url Full URL of social profile.
social_links:
- title: Minima Theme repository at GitHub
icon: github
url: "https://github.com/jekyll/minima"
- title: Jekyll at X (formerly Twitter)
icon: x-twitter
url: "https://x.com/jekyllrb"
6 changes: 5 additions & 1 deletion _includes/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@
<p class="feed-subscribe">
<a href="{{ site.feed.path | default: 'feed.xml' | absolute_url }}">
<svg class="svg-icon orange">
<use xlink:href="{{ 'assets/minima-social-icons.svg#rss' | relative_url }}"></use>
<path d="M12.8 16C12.8 8.978 7.022 3.2 0 3.2V0c8.777 0 16 7.223 16 16h-3.2zM2.194
11.61c1.21 0 2.195.985 2.195 2.196 0 1.21-.99 2.194-2.2 2.194C.98 16 0 15.017 0
13.806c0-1.21.983-2.195 2.194-2.195zM10.606
16h-3.11c0-4.113-3.383-7.497-7.496-7.497v-3.11c5.818 0 10.606 4.79 10.606 10.607z"
/>
</svg><span>Subscribe</span>
</a>
</p>
Expand Down
1 change: 1 addition & 0 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
{%- seo -%}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@latest/css/all.min.css">
<link rel="stylesheet" href="{{ "/assets/css/style.css" | relative_url }}">
{%- feed_meta -%}
{%- if jekyll.environment == 'production' and site.google_analytics -%}
Expand Down
1 change: 0 additions & 1 deletion _includes/social-icons/bluesky.svg

This file was deleted.

11 changes: 0 additions & 11 deletions _includes/social-icons/codeberg.svg

This file was deleted.

1 change: 0 additions & 1 deletion _includes/social-icons/devto.svg

This file was deleted.

1 change: 0 additions & 1 deletion _includes/social-icons/dribbble.svg

This file was deleted.

1 change: 0 additions & 1 deletion _includes/social-icons/facebook.svg

This file was deleted.

1 change: 0 additions & 1 deletion _includes/social-icons/flickr.svg

This file was deleted.

1 change: 0 additions & 1 deletion _includes/social-icons/github.svg

This file was deleted.

1 change: 0 additions & 1 deletion _includes/social-icons/gitlab.svg

This file was deleted.

1 change: 0 additions & 1 deletion _includes/social-icons/google_scholar.svg

This file was deleted.

1 change: 0 additions & 1 deletion _includes/social-icons/instagram.svg

This file was deleted.

4 changes: 0 additions & 4 deletions _includes/social-icons/keybase.svg

This file was deleted.

1 change: 0 additions & 1 deletion _includes/social-icons/linkedin.svg

This file was deleted.

1 change: 0 additions & 1 deletion _includes/social-icons/mastodon.svg

This file was deleted.

1 change: 0 additions & 1 deletion _includes/social-icons/microdotblog.svg

This file was deleted.

Loading