From f20132870916e1342eed8985f79bb4760a5cb780 Mon Sep 17 00:00:00 2001 From: Boris Mann Date: Sun, 21 Jan 2024 17:34:42 -0800 Subject: [PATCH] journal design --- Gemfile | 2 + Gemfile.lock | 3 + _config.yml | 59 +++++++++++++++ journal.json => _drafts/journal.json | 0 .../journal.links.json | 0 _notes/Threadstorm Builder.md | 3 + _pages/index.md | 34 ++++----- _pages/journal.html | 33 --------- _pages/journal_archive.html | 26 ------- journal/index.html | 71 +++++++++++++++++++ 10 files changed, 151 insertions(+), 80 deletions(-) rename journal.json => _drafts/journal.json (100%) rename journal.links.json => _drafts/journal.links.json (100%) delete mode 100644 _pages/journal.html delete mode 100644 _pages/journal_archive.html create mode 100644 journal/index.html diff --git a/Gemfile b/Gemfile index 4810429..4f2d620 100644 --- a/Gemfile +++ b/Gemfile @@ -8,5 +8,7 @@ ruby File.read(".ruby-version").strip gem "jekyll", "~> 4.1" gem "jekyll-last-modified-at" +gem "jekyll-paginate-v2" + gem "nokogiri" # gem "jekyll-commonmark-ghpages" diff --git a/Gemfile.lock b/Gemfile.lock index 22160c8..89b3361 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -34,6 +34,8 @@ GEM jekyll-last-modified-at (1.3.0) jekyll (>= 3.7, < 5.0) posix-spawn (~> 0.3.9) + jekyll-paginate-v2 (3.0.0) + jekyll (>= 3.0, < 5.0) jekyll-sass-converter (3.0.0) sass-embedded (~> 1.54) jekyll-watch (2.2.1) @@ -77,6 +79,7 @@ PLATFORMS DEPENDENCIES jekyll (~> 4.1) jekyll-last-modified-at + jekyll-paginate-v2 nokogiri RUBY VERSION diff --git a/_config.yml b/_config.yml index b870e8d..13f3f17 100644 --- a/_config.yml +++ b/_config.yml @@ -87,3 +87,62 @@ defaults: layout: "journal" section: journal +############################################################ +# Site configuration for the Jekyll 3 Pagination Gem +# The values here represent the defaults if nothing is set +pagination: + + # Site-wide kill switch, disabled here it doesn't run at all + enabled: true + + # Set to 'true' to enable pagination debugging. This can be enabled in the site config or only for individual pagination pages + debug: true + + # The default document collection to paginate if nothing is specified ('posts' is default) + collection: 'journals' + + # How many objects per paginated page, used to be `paginate` (default: 0, means all) + per_page: 20 + + # The permalink structure for the paginated pages (this can be any level deep) + permalink: '/journal/:num/' # Pages are index.html inside this folder (default) + #permalink: '/page/:num.html' # Pages are simple html files + #permalink: '/page/:num' # Pages are html files, linked jekyll extensionless permalink style. + + # Optional the title format for the paginated pages (supports :title for original page title, :num for pagination page number, :max for total number of pages) + title: ':title - page :num' + + # Limit how many pagenated pages to create (default: 0, means all) + limit: 0 + + # Optional, defines the field that the posts should be sorted on (omit to default to 'date') + sort_field: 'date' + + # Optional, sorts the posts in reverse order (omit to default decending or sort_reverse: true) + sort_reverse: true + + # Optional, the default category to use, omit or just leave this as 'posts' to get a backwards-compatible behavior (all posts) + # category: 'posts' + + # Optional, the default tag to use, omit to disable + # tag: '' + + # Optional, the default locale to use, omit to disable (depends on a field 'locale' to be specified in the posts, + # in reality this can be any value, suggested are the Microsoft locale-codes (e.g. en_US, en_GB) or simply the ISO-639 language code ) + locale: '' + + # Optional,omit or set both before and after to zero to disable. + # Controls how the pagination trail for the paginated pages look like. + trail: + before: 2 + after: 2 + + # Optional, the default file extension for generated pages (e.g html, json, xml). + # Internally this is set to html by default + extension: html + + # Optional, the default name of the index file for generated pages (e.g. 'index.html') + # Without file extension + indexpage: 'index' + +############################################################ \ No newline at end of file diff --git a/journal.json b/_drafts/journal.json similarity index 100% rename from journal.json rename to _drafts/journal.json diff --git a/journal.links.json b/_drafts/journal.links.json similarity index 100% rename from journal.links.json rename to _drafts/journal.links.json diff --git a/_notes/Threadstorm Builder.md b/_notes/Threadstorm Builder.md index ac607aa..1f098c2 100644 --- a/_notes/Threadstorm Builder.md +++ b/_notes/Threadstorm Builder.md @@ -1,3 +1,6 @@ +--- +--- + I wrote up the design for this many years ago now, when I called it a [Tweetstorm Builder and Blog](https://talk.fission.codes/t/tweetstorm-builder-and-blog/433). I'm copying that write up here. In our post Twitter era, both [[ActivityPub]] and [[ATProtocol]] would be good choices. [[Micropub]] really isn't widely used and I think tying it more social platforms makes more sense. diff --git a/_pages/index.md b/_pages/index.md index 143c0a0..2785387 100644 --- a/_pages/index.md +++ b/_pages/index.md @@ -13,8 +13,6 @@ permalink: / a.journal-link { all: unset; cursor: pointer; - text-decoration: underline; - } a.journal-link::after { all: unset; @@ -25,7 +23,9 @@ permalink: / I'm interested in [[Open Source Licensing]], community, co-operative models. Pooling capital and collaboration. I'm the founder of [[Fission]]. In Canada I help run the [[CoSocial]] Community Co-op. In Vancouver, I'm one of the organizers of [[DWebYVR]]. I like to cook & eat and have a [[FoodWiki]]. -## Blog Posts +The [[Feeds]] page has ways to subscribe. My personal Mastodon account is @boris@cosocial.ca. Journal items are cross-posted to @boris@toolsforthought.social. + +## [Blog Posts ๐Ÿ–Š](../blog/) - Choose feeds to subscribe to ยป - -## Digital Garden ๐ŸŒฑ +## [Digital Garden ๐ŸŒฑ](../notes/) {% assign notehtml = '' %} {% assign recentnotes = site.notes | sort: 'last_modified_at' | reverse %} @@ -54,25 +52,19 @@ I'm interested in [[Open Source Licensing]], community, co-operative models. Poo {% endif %} {% endfor %} -Browse the local Notes graph. These are the ten most recently modified local notes: {{ notehtml }}. - -## Journal Entries +These are the ten most recently modified local notes: {{ notehtml }}. -The last five [Journal](/journal) entries: - -{% comment %}{% endcomment %} +## [Journal Entries ๐Ÿ““](../journal/) {% assign journalposts = site.journals | reverse %} -
- - diff --git a/_pages/journal.html b/_pages/journal.html deleted file mode 100644 index bfc683c..0000000 --- a/_pages/journal.html +++ /dev/null @@ -1,33 +0,0 @@ ---- -layout: page -title: Daily Journal -permalink: /journal/ ---- - - {% assign postsByDay = - site.journals | group_by_exp:"post", "post.date | date: '%B %e, %Y'" | reverse %} - - {% for day in postsByDay %} -

{{ day.name }}

- {% for post in day.items %} -
- {{ post.content }}  -
- {% endfor %} - {% endfor %} diff --git a/_pages/journal_archive.html b/_pages/journal_archive.html deleted file mode 100644 index 33c4533..0000000 --- a/_pages/journal_archive.html +++ /dev/null @@ -1,26 +0,0 @@ ---- -layout: page -title: Daily Journal -permalink: /journal/archive/ ---- - - {% assign postsByDay = - site.journals | group_by_exp:"post", "post.date | date: '%B %Y'" | reverse %} - - {% for day in postsByDay %} -

{{ day.name }}

- - {% endfor %} diff --git a/journal/index.html b/journal/index.html new file mode 100644 index 0000000..fa75767 --- /dev/null +++ b/journal/index.html @@ -0,0 +1,71 @@ +--- +layout: page +title: Daily Journal ๐Ÿ““ +pagination: + enabled: true +--- + + + +{% comment %}{% endcomment %} + +{% assign sortedjournals = site.journals | reverse %} +{% for post in sortedjournals %} + +
+
+
+ + {{ post.date | date: "%b %Y"}} + {{ post.date | date: "%l:%M%P"}} + +
+
+
+ + + + {{ post.content }} + + +
+
+
+ +{% endfor %} + -- 2.51.2