diff --git a/.gitignore b/.gitignore --- a/.gitignore +++ b/.gitignore @@ -11,5 +11,4 @@ Thumbs.db ehthumbs.db -_data/blog-feed.json _data/github-releases.json diff --git a/_config.yml b/_config.yml --- a/_config.yml +++ b/_config.yml @@ -16,7 +16,7 @@ # List of links in the navigation bar navbar-links: eCash: "ecash/" - Blog: "https://blog.bitcoinabc.org/" + Announcements: "announcements/" Download: - Releases: "releases/" - Source Code: "https://github.com/Bitcoin-ABC/bitcoin-abc" diff --git a/_layouts/base.html b/_layouts/base.html --- a/_layouts/base.html +++ b/_layouts/base.html @@ -12,7 +12,6 @@ - "/js/jquery-1.11.2.min.js" - "/js/bootstrap.min.js" - "/js/main.js" - - "/js/blog-feed.js" --- diff --git a/announcements.html b/announcements.html --- a/announcements.html +++ b/announcements.html @@ -1,7 +1,6 @@ --- layout: page title: Bitcoin ABC Announcements -subtitle: Please see blog.bitcoinabc.org for latest announcements ---
diff --git a/index.html b/index.html --- a/index.html +++ b/index.html @@ -31,20 +31,58 @@ -
- {% if site.data.blog-feed %} - {% assign blogFeedItems = site.data.blog-feed.items | reverse %} - {% for post in blogFeedItems limit:3 %} - + + {% assign english_posts = site.posts | where: "lang", "en" %} + {% assign first_posts = english_posts | slice: 0, site.front_page_posts %} +
+ {% for post in first_posts %} +
+ +

{{ post.title }}

+ + {% if post.subtitle %} +

+ {{ post.subtitle }} +

+ {% endif %} +
+ + + +
+ {% if post.image %} +
+ + + +
+ {% endif %} +
+ {{ post.excerpt | strip_html | xml_escape | truncatewords: site.excerpt_length }} + {% assign excerpt_word_count = post.excerpt | number_of_words %} + {% if post.content != post.excerpt or excerpt_word_count > site.excerpt_length %} + [Read More] + {% endif %} +
+
+ + {% if post.tags.size > 0 %} +
+ Tags: + {% if site.link-tags %} + {% for tag in post.tags %} + {{- tag -}} + {% endfor %} + {% else %} + {{ post.tags | join: ", " }} + {% endif %} +
+ {% endif %} + +
{% endfor %} - {% endif %}
diff --git a/js/blog-feed.js b/js/blog-feed.js deleted file mode 100644 --- a/js/blog-feed.js +++ /dev/null @@ -1,30 +0,0 @@ -$.getJSON("https://blog.bitcoinabc.org/json/", function (data) { - var feed = $(".abc-blog-feed"); - feed.empty(); - $.each(data["items"].slice(0, 3), function (i, post) { - var encodedURL = encodeURI(post.url); - feed.append( - $('
').append( - $("") - .attr("href", encodedURL) - .append($('

').text(post.title)) - .append( - $('
').append( - $('
').text(post.content_text) - ) - ) - .append( - $('[Read More]').attr( - "href", - encodedURL - ) - ) - ) - ); - }); -}); diff --git a/scripts/fetch-blog-feed.sh b/scripts/fetch-blog-feed.sh deleted file mode 100755 --- a/scripts/fetch-blog-feed.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -# This script downloads the static JSON for the blog feed in order to improve SEO. - -TOPLEVEL=$(git rev-parse --show-toplevel) -cd "${TOPLEVEL}"/_data -wget -O blog-feed.json https://blog.bitcoinabc.org/json/ - -# HTML-escape unicode characters because Jekyll complains about them despite -# these characters being within strings. -sed -i 's/\\u\([a-z0-9]\{4\}\)/\&#x\1;/g' blog-feed.json