diff options
author | Valentin Popov <info@valentineus.link> | 2018-04-24 19:00:04 +0300 |
---|---|---|
committer | Valentin Popov <info@valentineus.link> | 2018-04-24 19:00:04 +0300 |
commit | ebceb1c3dec8478dbbaa29c7b22d509354c8646d (patch) | |
tree | 7f7773ffcb9e794b4b5f1e78d9c6d335ccc7f785 | |
parent | e0bfa7a3b09fdcc80f92c5c61b92d7ff0e33945c (diff) | |
download | popov.link-ebceb1c3dec8478dbbaa29c7b22d509354c8646d.tar.xz popov.link-ebceb1c3dec8478dbbaa29c7b22d509354c8646d.zip |
Collection with additional links
Signed-off-by: Valentin Popov <info@valentineus.link>
-rw-r--r-- | _data/additional_links.yml | 8 | ||||
-rw-r--r-- | _includes/additional_links.html | 11 | ||||
-rw-r--r-- | _includes/sociallinks.html | 9 | ||||
-rw-r--r-- | _pages/index.html | 4 |
4 files changed, 21 insertions, 11 deletions
diff --git a/_data/additional_links.yml b/_data/additional_links.yml new file mode 100644 index 0000000..e5fab32 --- /dev/null +++ b/_data/additional_links.yml @@ -0,0 +1,8 @@ +- name: "Example" + url: "http://example" + +- name: "Example" + url: "http://example" + +- name: "Example" + url: "http://example" diff --git a/_includes/additional_links.html b/_includes/additional_links.html new file mode 100644 index 0000000..ddc0c97 --- /dev/null +++ b/_includes/additional_links.html @@ -0,0 +1,11 @@ +<p class="social-links"> + {% for link in site.data.additional_links %} + <a href="{{ link.url | strip_newlines | strip_html | strip | normalize_whitespace | uri_escape }}"> + {{ link.name | strip_newlines | strip_html | strip | normalize_whitespace | smartify }} + </a> + <!-- Separation trait --> + {% unless forloop.last %} + <span>|</span> + {% endunless %} + {% endfor %} +</p> diff --git a/_includes/sociallinks.html b/_includes/sociallinks.html deleted file mode 100644 index 0f9cd34..0000000 --- a/_includes/sociallinks.html +++ /dev/null @@ -1,9 +0,0 @@ -<p class="social-links"> - {% for item in site.social_links %} - <a href="{{ item[1] | strip_newlines | strip_html | strip | normalize_whitespace | uri_escape }}"> - {{ item[0] | strip_newlines | strip_html | strip | normalize_whitespace | smartify | downcase | capitalize }} - </a> - <!-- Separation trait --> - {% unless forloop.last %}|{% endunless %} - {% endfor %} -</p> diff --git a/_pages/index.html b/_pages/index.html index 97f5032..742d8da 100644 --- a/_pages/index.html +++ b/_pages/index.html @@ -5,8 +5,8 @@ layout: page {% assign postsByYear = site.posts | group_by_exp: "post", "post.date | date: '%Y'" %} -<!-- Links to social networks --> -{% include sociallinks.html %} +<!-- Links to external resources --> +{% include additional_links.html %} {% for year in postsByYear %} <h2>{{ year.name | strip_newlines | strip_html | strip | normalize_whitespace | slugify }}</h2> |