From 972fda2dd93d2fe4382601302964e7d9faec911d Mon Sep 17 00:00:00 2001 From: Stefano Gerli Date: Mon, 20 May 2019 09:11:05 -0600 Subject: [PATCH 1/5] Configure for pagination --- Gemfile | 2 +- Gemfile.lock | 293 +++++++++++++++++++++++++++++++++------------------ _config.yml | 7 +- 3 files changed, 196 insertions(+), 106 deletions(-) diff --git a/Gemfile b/Gemfile index 1bb8b4a..c50ae3c 100644 --- a/Gemfile +++ b/Gemfile @@ -5,5 +5,5 @@ require 'open-uri' versions = JSON.parse(open('https://pages.github.com/versions.json').read) gem 'github-pages', versions['github-pages'] - +gem 'jekyll-paginate' gem 'jemoji' \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock index 7902f09..30f3e8e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,165 +1,250 @@ GEM remote: https://rubygems.org/ specs: - activesupport (4.2.7) + activesupport (4.2.11.1) i18n (~> 0.7) - json (~> 1.7, >= 1.7.7) minitest (~> 5.1) thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) - addressable (2.4.0) + addressable (2.6.0) + public_suffix (>= 2.0.2, < 4.0) coffee-script (2.4.1) coffee-script-source execjs coffee-script-source (1.11.1) colorator (1.1.0) - ethon (0.10.1) + commonmarker (0.17.13) + ruby-enum (~> 0.5) + concurrent-ruby (1.1.5) + dnsruby (1.61.2) + addressable (~> 2.5) + em-websocket (0.5.1) + eventmachine (>= 0.12.9) + http_parser.rb (~> 0.6.0) + ethon (0.12.0) ffi (>= 1.3.0) + eventmachine (1.2.7) execjs (2.7.0) - faraday (0.10.0) + faraday (0.15.4) multipart-post (>= 1.2, < 3) - ffi (1.9.14) + ffi (1.11.0) forwardable-extended (2.6.0) - gemoji (2.1.0) - github-pages (108) - activesupport (= 4.2.7) - github-pages-health-check (= 1.3.0) - jekyll (= 3.3.1) - jekyll-avatar (= 0.4.2) - jekyll-coffeescript (= 1.0.1) + gemoji (3.0.1) + github-pages (198) + activesupport (= 4.2.11.1) + github-pages-health-check (= 1.16.1) + jekyll (= 3.8.5) + jekyll-avatar (= 0.6.0) + jekyll-coffeescript (= 1.1.1) + jekyll-commonmark-ghpages (= 0.1.5) jekyll-default-layout (= 0.1.4) - jekyll-feed (= 0.8.0) - jekyll-gist (= 1.4.0) - jekyll-github-metadata (= 2.2.0) - jekyll-mentions (= 1.2.0) - jekyll-optional-front-matter (= 0.1.2) + jekyll-feed (= 0.11.0) + jekyll-gist (= 1.5.0) + jekyll-github-metadata (= 2.12.1) + jekyll-mentions (= 1.4.1) + jekyll-optional-front-matter (= 0.3.0) jekyll-paginate (= 1.1.0) - jekyll-readme-index (= 0.0.2) - jekyll-redirect-from (= 0.11.0) - jekyll-relative-links (= 0.2.1) - jekyll-sass-converter (= 1.3.0) - jekyll-seo-tag (= 2.1.0) - jekyll-sitemap (= 0.12.0) + jekyll-readme-index (= 0.2.0) + jekyll-redirect-from (= 0.14.0) + jekyll-relative-links (= 0.6.0) + jekyll-remote-theme (= 0.3.1) + jekyll-sass-converter (= 1.5.2) + jekyll-seo-tag (= 2.5.0) + jekyll-sitemap (= 1.2.0) jekyll-swiss (= 0.4.0) - jekyll-theme-primer (= 0.1.1) - jekyll-titles-from-headings (= 0.1.2) - jemoji (= 0.7.0) - kramdown (= 1.11.1) - liquid (= 3.0.6) - listen (= 3.0.6) + jekyll-theme-architect (= 0.1.1) + jekyll-theme-cayman (= 0.1.1) + jekyll-theme-dinky (= 0.1.1) + jekyll-theme-hacker (= 0.1.1) + jekyll-theme-leap-day (= 0.1.1) + jekyll-theme-merlot (= 0.1.1) + jekyll-theme-midnight (= 0.1.1) + jekyll-theme-minimal (= 0.1.1) + jekyll-theme-modernist (= 0.1.1) + jekyll-theme-primer (= 0.5.3) + jekyll-theme-slate (= 0.1.1) + jekyll-theme-tactile (= 0.1.1) + jekyll-theme-time-machine (= 0.1.1) + jekyll-titles-from-headings (= 0.5.1) + jemoji (= 0.10.2) + kramdown (= 1.17.0) + liquid (= 4.0.0) + listen (= 3.1.5) mercenary (~> 0.3) - minima (= 2.0.0) - rouge (= 1.11.1) + minima (= 2.5.0) + nokogiri (>= 1.8.5, < 2.0) + rouge (= 2.2.1) terminal-table (~> 1.4) - github-pages-health-check (1.3.0) + github-pages-health-check (1.16.1) addressable (~> 2.3) - net-dns (~> 0.8) + dnsruby (~> 1.60) octokit (~> 4.0) - public_suffix (~> 2.0) - typhoeus (~> 0.7) - html-pipeline (2.4.2) + public_suffix (~> 3.0) + typhoeus (~> 1.3) + html-pipeline (2.11.0) activesupport (>= 2) nokogiri (>= 1.4) - i18n (0.7.0) - jekyll (3.3.1) + http_parser.rb (0.6.0) + i18n (0.9.5) + concurrent-ruby (~> 1.0) + jekyll (3.8.5) addressable (~> 2.4) colorator (~> 1.0) + em-websocket (~> 0.5) + i18n (~> 0.7) jekyll-sass-converter (~> 1.0) - jekyll-watch (~> 1.1) - kramdown (~> 1.3) - liquid (~> 3.0) + jekyll-watch (~> 2.0) + kramdown (~> 1.14) + liquid (~> 4.0) mercenary (~> 0.3.3) pathutil (~> 0.9) - rouge (~> 1.7) + rouge (>= 1.7, < 4) safe_yaml (~> 1.0) - jekyll-avatar (0.4.2) + jekyll-avatar (0.6.0) jekyll (~> 3.0) - jekyll-coffeescript (1.0.1) + jekyll-coffeescript (1.1.1) coffee-script (~> 2.2) + coffee-script-source (~> 1.11.1) + jekyll-commonmark (1.3.1) + commonmarker (~> 0.14) + jekyll (>= 3.7, < 5.0) + jekyll-commonmark-ghpages (0.1.5) + commonmarker (~> 0.17.6) + jekyll-commonmark (~> 1) + rouge (~> 2) jekyll-default-layout (0.1.4) jekyll (~> 3.0) - jekyll-feed (0.8.0) + jekyll-feed (0.11.0) jekyll (~> 3.3) - jekyll-gist (1.4.0) + jekyll-gist (1.5.0) octokit (~> 4.2) - jekyll-github-metadata (2.2.0) - jekyll (~> 3.1) + jekyll-github-metadata (2.12.1) + jekyll (~> 3.4) octokit (~> 4.0, != 4.4.0) - jekyll-mentions (1.2.0) - activesupport (~> 4.0) + jekyll-mentions (1.4.1) html-pipeline (~> 2.3) jekyll (~> 3.0) - jekyll-optional-front-matter (0.1.2) + jekyll-optional-front-matter (0.3.0) jekyll (~> 3.0) jekyll-paginate (1.1.0) - jekyll-readme-index (0.0.2) + jekyll-readme-index (0.2.0) jekyll (~> 3.0) - jekyll-redirect-from (0.11.0) - jekyll (>= 2.0) - jekyll-relative-links (0.2.1) + jekyll-redirect-from (0.14.0) jekyll (~> 3.3) - jekyll-sass-converter (1.3.0) - sass (~> 3.2) - jekyll-seo-tag (2.1.0) + jekyll-relative-links (0.6.0) jekyll (~> 3.3) - jekyll-sitemap (0.12.0) + jekyll-remote-theme (0.3.1) + jekyll (~> 3.5) + rubyzip (>= 1.2.1, < 3.0) + jekyll-sass-converter (1.5.2) + sass (~> 3.4) + jekyll-seo-tag (2.5.0) jekyll (~> 3.3) - jekyll-swiss (0.4.0) - jekyll-theme-primer (0.1.1) + jekyll-sitemap (1.2.0) jekyll (~> 3.3) - jekyll-titles-from-headings (0.1.2) + jekyll-swiss (0.4.0) + jekyll-theme-architect (0.1.1) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-cayman (0.1.1) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-dinky (0.1.1) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-hacker (0.1.1) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-leap-day (0.1.1) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-merlot (0.1.1) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-midnight (0.1.1) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-minimal (0.1.1) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-modernist (0.1.1) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-primer (0.5.3) + jekyll (~> 3.5) + jekyll-github-metadata (~> 2.9) + jekyll-seo-tag (~> 2.0) + jekyll-theme-slate (0.1.1) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-tactile (0.1.1) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-time-machine (0.1.1) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-titles-from-headings (0.5.1) jekyll (~> 3.3) - jekyll-watch (1.5.0) - listen (~> 3.0, < 3.1) - jemoji (0.7.0) - activesupport (~> 4.0) - gemoji (~> 2.0) + jekyll-watch (2.2.1) + listen (~> 3.0) + jemoji (0.10.2) + gemoji (~> 3.0) html-pipeline (~> 2.2) - jekyll (>= 3.0) - json (1.8.3) - kramdown (1.11.1) - liquid (3.0.6) - listen (3.0.6) - rb-fsevent (>= 0.9.3) - rb-inotify (>= 0.9.7) + jekyll (~> 3.0) + kramdown (1.17.0) + liquid (4.0.0) + listen (3.1.5) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + ruby_dep (~> 1.2) mercenary (0.3.6) - mini_portile2 (2.1.0) - minima (2.0.0) - minitest (5.10.1) - multipart-post (2.0.0) - net-dns (0.8.0) - nokogiri (1.6.8.1) - mini_portile2 (~> 2.1.0) - octokit (4.6.2) + mini_portile2 (2.4.0) + minima (2.5.0) + jekyll (~> 3.5) + jekyll-feed (~> 0.9) + jekyll-seo-tag (~> 2.1) + minitest (5.11.3) + multipart-post (2.1.1) + nokogiri (1.10.3) + mini_portile2 (~> 2.4.0) + octokit (4.14.0) sawyer (~> 0.8.0, >= 0.5.3) - pathutil (0.14.0) + pathutil (0.16.2) forwardable-extended (~> 2.6) - public_suffix (2.0.4) - rb-fsevent (0.9.8) - rb-inotify (0.9.7) - ffi (>= 0.5.0) - rouge (1.11.1) - safe_yaml (1.0.4) - sass (3.4.22) - sawyer (0.8.1) - addressable (>= 2.3.5, < 2.6) - faraday (~> 0.8, < 1.0) - terminal-table (1.7.3) - unicode-display_width (~> 1.1.1) - thread_safe (0.3.5) - typhoeus (0.8.0) - ethon (>= 0.8.0) - tzinfo (1.2.2) + public_suffix (3.0.3) + rb-fsevent (0.10.3) + rb-inotify (0.10.0) + ffi (~> 1.0) + rouge (2.2.1) + ruby-enum (0.7.2) + i18n + ruby_dep (1.5.0) + rubyzip (1.2.2) + safe_yaml (1.0.5) + sass (3.7.4) + sass-listen (~> 4.0.0) + sass-listen (4.0.0) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + sawyer (0.8.2) + addressable (>= 2.3.5) + faraday (> 0.8, < 2.0) + terminal-table (1.8.0) + unicode-display_width (~> 1.1, >= 1.1.1) + thread_safe (0.3.6) + typhoeus (1.3.1) + ethon (>= 0.9.0) + tzinfo (1.2.5) thread_safe (~> 0.1) - unicode-display_width (1.1.2) + unicode-display_width (1.6.0) PLATFORMS ruby DEPENDENCIES - github-pages (= 108) + github-pages (= 198) + jekyll-paginate jemoji - json BUNDLED WITH - 1.13.6 + 2.0.1 diff --git a/_config.yml b/_config.yml index 26c2d07..2afe46e 100644 --- a/_config.yml +++ b/_config.yml @@ -23,11 +23,16 @@ github_username: pebble-dev #soundcloud_username: TODO #miiverse_username: TODO +# Blog pagination settings +paginate: 5 +paginate_path: "/blog/:num/" + # Build settings markdown: kramdown kramdown: input: GFM -gems: +plugins: +- jekyll-paginate - jemoji From dbd86adc2a64291a1cdb353836403e3056bacea9 Mon Sep 17 00:00:00 2001 From: Stefano Gerli Date: Mon, 20 May 2019 09:11:11 -0600 Subject: [PATCH 2/5] Add basic blog page --- blog/index.html | 55 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 blog/index.html diff --git a/blog/index.html b/blog/index.html new file mode 100644 index 0000000..060b97b --- /dev/null +++ b/blog/index.html @@ -0,0 +1,55 @@ +--- +layout: default +title: "Blog" +--- +
+ {% for post in paginator.posts %} +
+
+ +

{{ post.title }}

+ {{ post.excerpt }} +
+
+ {% endfor %} +
+{% if site.posts == 0 %} +
+
+

There's nothing here (yet...)

+

+ In the meantime, check out the + Discord Server or subscribe to the mailing list: +

+ {% include mailinglist.html %} +
+
+ +{% endif %} + + +{% if paginator.total_pages > 1 %} + +{% endif %} \ No newline at end of file From 19a2b9b1033d68ecf2d4c7dbde7dcbfe34faf46d Mon Sep 17 00:00:00 2001 From: Stefano Gerli Date: Tue, 21 May 2019 13:47:09 -0600 Subject: [PATCH 3/5] Style pagination --- blog/index.html | 24 +++++++++++++++--------- css/common.css | 46 +++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 60 insertions(+), 10 deletions(-) diff --git a/blog/index.html b/blog/index.html index 060b97b..abb745e 100644 --- a/blog/index.html +++ b/blog/index.html @@ -29,27 +29,33 @@

{{ post.title }}

{% if paginator.total_pages > 1 %} - + + {% endif %} \ No newline at end of file diff --git a/css/common.css b/css/common.css index 260216e..8d2bbf5 100644 --- a/css/common.css +++ b/css/common.css @@ -400,10 +400,54 @@ hr { border: 1px solid #dbdadb; } +/* Pagination styles */ + /* --- Error page styles --- */ .pet-rock-pebble { margin-left: auto; margin-right: auto; display: block; max-width: 98%; -} \ No newline at end of file +} + +.pagination { + display: flex; + padding-left: 0; + list-style: none; + margin-left: auto; + margin-right: auto; + margin-bottom: 20px; + width: fit-content; + } + + .page-link { + position: relative; + display: block; + padding: .5rem .75rem; + margin-left: -1px; + line-height: 1.25; + color: #686868; + text-decoration: none; + font-size: 20px; + /*border: $pagination-border-width solid $pagination-border-color;*/ + + /*&:focus { + z-index: 3; + outline: $pagination-focus-outline; + box-shadow: $pagination-focus-box-shadow; + }*/ + } + +.page-link.disabled { + color: #cacaca; + } +.page-link.active { + color: #D40; +} + +a.page-link:hover { + z-index: 2; + color: #222; + text-decoration: none; + /*border-color: $pagination-hover-border-color;*/ +} \ No newline at end of file From 0c951062eb0e735e756f37a2edb29f918ffcc09c Mon Sep 17 00:00:00 2001 From: Stefano Gerli Date: Tue, 21 May 2019 14:04:48 -0600 Subject: [PATCH 4/5] Add blog to menu --- _data/index.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/_data/index.yml b/_data/index.yml index d00d352..6eea268 100644 --- a/_data/index.yml +++ b/_data/index.yml @@ -1,6 +1,9 @@ - display: "home" permalink: "/" +- display: "blog" + permalink: "/blog/" + - display: "howto" permalink: "/howto/" From 70c3d976536f60761b517cd31c03018384c26621 Mon Sep 17 00:00:00 2001 From: Stefano Gerli Date: Tue, 21 May 2019 14:05:12 -0600 Subject: [PATCH 5/5] Clean css --- css/common.css | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/css/common.css b/css/common.css index 8d2bbf5..74ef70b 100644 --- a/css/common.css +++ b/css/common.css @@ -400,16 +400,7 @@ hr { border: 1px solid #dbdadb; } -/* Pagination styles */ - -/* --- Error page styles --- */ -.pet-rock-pebble { - margin-left: auto; - margin-right: auto; - display: block; - max-width: 98%; -} - +/* --- Pagination styles --- */ .pagination { display: flex; padding-left: 0; @@ -429,13 +420,6 @@ hr { color: #686868; text-decoration: none; font-size: 20px; - /*border: $pagination-border-width solid $pagination-border-color;*/ - - /*&:focus { - z-index: 3; - outline: $pagination-focus-outline; - box-shadow: $pagination-focus-box-shadow; - }*/ } .page-link.disabled { @@ -448,6 +432,12 @@ hr { a.page-link:hover { z-index: 2; color: #222; - text-decoration: none; - /*border-color: $pagination-hover-border-color;*/ -} \ No newline at end of file +} + +/* --- Error page styles --- */ +.pet-rock-pebble { + margin-left: auto; + margin-right: auto; + display: block; + max-width: 98%; +} \ No newline at end of file