aboutsummaryrefslogtreecommitdiff

Weeknotes

Weeknotes!

PC Development

Install

npm install

Develop

npm run dev

Build

npm run build

Mobile Development (i.e., writing posts)

MGit

I cloned the repo using MGit - https://github.com/maks/MGit. I installed the F-Droid version of MGit through the F-Droid app store, as the Google Play version of MGit is not supported by Google.

I set up MGit using an SSH key and added the SSH key to my GitHub account, which allows me to do things like push to this repository from my phone.

I set the Root storage location for repos in MGit to /storage/emulated/0/Documents (i.e., the Android Documents folder), so when I clone a repo, it is placed in Documents.

Markor

I installed Markor, to edit markdown files. I set the Notebook location to Documents/markor, and from here, I can navigate up to Documents and to the weeknotes folder, where I can edit the markdown files.

Process

  1. Open MGit. Create new file in ./weeknotes/.
  2. Open file with Markor and write content
  3. Exit back to MGit, then stage, commit, and push changes (just like normal Git)
  4. When pushed to git, the pages.yml workflow runs, building the website with 11ty and publishing it to my GitHub pages site at https://weeknotes.alifeee.net

Topics

Topics are provided per-weeknote in _data/topics.yaml. This is transformed into a 2D array with [_data/topicstable.js], which can be used in the template to build the topics on the homepage.

To see a list of all topics, use the bash command:

cat _data/topics.yaml | pcregrep -o1 "^- (.*)$" | sort | uniq

Archiving

Old posts are "archived". The age past-which to archive is specified in ./_data/archive.json

{ "archive_older_than_days": 31 }

"Archiving" is really just "hiding" the content with a <details> element.

{{#if (gt (daysago page.fileSlug ) archive.archive_older_than_days)}}
  <p class="archive-text">this weeknote is archived for the sins of being over 1 month old.</p>
  <details>
    <summary class="summary">if you have good reason to read it, show anyway</summary>
{{/if}}