@@ -0,0 +1,29 @@
|
||||
{
|
||||
"name": "Jekyll",
|
||||
"image": "mcr.microsoft.com/devcontainers/jekyll:2-bullseye",
|
||||
"onCreateCommand": "git config --global --add safe.directory ${containerWorkspaceFolder}",
|
||||
"postCreateCommand": "bash .devcontainer/post-create.sh",
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"settings": {
|
||||
"terminal.integrated.defaultProfile.linux": "zsh"
|
||||
},
|
||||
"extensions": [
|
||||
// Liquid tags auto-complete
|
||||
"killalau.vscode-liquid-snippets",
|
||||
// Liquid syntax highlighting and formatting
|
||||
"Shopify.theme-check-vscode",
|
||||
// Shell
|
||||
"timonwong.shellcheck",
|
||||
"mkhl.shfmt",
|
||||
// Common formatter
|
||||
"EditorConfig.EditorConfig",
|
||||
"esbenp.prettier-vscode",
|
||||
"stylelint.vscode-stylelint",
|
||||
"yzhang.markdown-all-in-one",
|
||||
// Git
|
||||
"mhutchie.git-graph"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [ -f package.json ]; then
|
||||
bash -i -c "nvm install --lts && nvm install-latest-npm"
|
||||
npm i
|
||||
npm run build
|
||||
fi
|
||||
|
||||
# Install dependencies for shfmt extension
|
||||
curl -sS https://webi.sh/shfmt | sh &>/dev/null
|
||||
|
||||
# Add OMZ plugins
|
||||
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting
|
||||
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions
|
||||
sed -i -E "s/^(plugins=\()(git)(\))/\1\2 zsh-syntax-highlighting zsh-autosuggestions\3/" ~/.zshrc
|
||||
|
||||
# Avoid git log use less
|
||||
echo -e "\nunset LESS" >>~/.zshrc
|
||||
@@ -0,0 +1,19 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
trim_trailing_whitespace = true
|
||||
# Unix-style newlines with a newline ending every file
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
|
||||
[*.{js,css,scss}]
|
||||
quote_type = single
|
||||
|
||||
[*.{yml,yaml}]
|
||||
quote_type = double
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
@@ -0,0 +1,16 @@
|
||||
# Set default behavior to automatically normalize line endings.
|
||||
* text=auto
|
||||
|
||||
# Force bash scripts to always use LF line endings so that if a repo is accessed
|
||||
# in Unix via a file share from Windows, the scripts will work.
|
||||
*.sh text eol=lf
|
||||
|
||||
# Force batch scripts to always use CRLF line endings so that if a repo is accessed
|
||||
# in Windows via a file share from Linux, the scripts will work.
|
||||
*.{cmd,[cC][mM][dD]} text eol=crlf
|
||||
*.{bat,[bB][aA][tT]} text eol=crlf
|
||||
|
||||
# Denote all files that are truly binary and should not be modified.
|
||||
*.png binary
|
||||
*.jpg binary
|
||||
*.ico binary
|
||||
@@ -1,24 +0,0 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Did you run into an issue?
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
# Bug Report
|
||||
|
||||
## Environment
|
||||
|
||||
Zola version:
|
||||
tabi commit:
|
||||
|
||||
## Expected Behavior
|
||||
Tell us what should have happened.
|
||||
|
||||
## Current Behavior
|
||||
Tell us what happens instead of the expected behavior.
|
||||
|
||||
## Step to reproduce
|
||||
Please provide the steps to reproduce the issue.
|
||||
@@ -1,22 +0,0 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project.
|
||||
title: ''
|
||||
labels: enhancement
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
# Feature Request
|
||||
|
||||
## Summary
|
||||
Briefly describe what this feature request is about.
|
||||
|
||||
## Motivation
|
||||
Why should this feature be implemented? How will it benefit the project and its users?
|
||||
|
||||
## Detailed Description
|
||||
Please provide a detailed description of the proposed feature, including any suggestions you have for how it could be implemented.
|
||||
|
||||
## Additional Context
|
||||
Add any other context or screenshots about the feature request here. If this feature request is related to a problem, please describe it.
|
||||
@@ -1,11 +0,0 @@
|
||||
# To get started with Dependabot version updates, you'll need to specify which
|
||||
# package ecosystems to update and where the package manifests are located.
|
||||
# Please see the documentation for all configuration options:
|
||||
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "" # See documentation for possible values
|
||||
directory: "/" # Location of package manifests
|
||||
schedule:
|
||||
interval: "monthly"
|
||||
@@ -0,0 +1,73 @@
|
||||
name: "Build and Deploy"
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
paths-ignore:
|
||||
- .gitignore
|
||||
- README.md
|
||||
- LICENSE
|
||||
|
||||
# Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
# Allow one concurrent deployment
|
||||
concurrency:
|
||||
group: "pages"
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
# submodules: true
|
||||
# If using the 'assets' git submodule from Chirpy Starter, uncomment above
|
||||
# (See: https://github.com/cotes2020/chirpy-starter/tree/main/assets)
|
||||
|
||||
- name: Setup Pages
|
||||
id: pages
|
||||
uses: actions/configure-pages@v4
|
||||
|
||||
- name: Setup Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: 3.3
|
||||
bundler-cache: true
|
||||
|
||||
- name: Build site
|
||||
run: bundle exec jekyll b -d "_site${{ steps.pages.outputs.base_path }}"
|
||||
env:
|
||||
JEKYLL_ENV: "production"
|
||||
|
||||
- name: Test site
|
||||
run: |
|
||||
bundle exec htmlproofer _site \
|
||||
\-\-disable-external \
|
||||
\-\-ignore-urls "/^http:\/\/127.0.0.1/,/^http:\/\/0.0.0.0/,/^http:\/\/localhost/"
|
||||
|
||||
- name: Upload site artifact
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
path: "_site${{ steps.pages.outputs.base_path }}"
|
||||
|
||||
deploy:
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
steps:
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v4
|
||||
@@ -1,19 +0,0 @@
|
||||
# On every push this script is executed
|
||||
on: push
|
||||
name: Build and deploy GH Pages
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.ref == 'refs/heads/main'
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: build_and_deploy
|
||||
uses: shalzz/[email protected]
|
||||
env:
|
||||
# Target branch
|
||||
PAGES_BRANCH: gh-pages
|
||||
# Provide personal access token
|
||||
TOKEN: ${{ secrets.TOKEN }}
|
||||
# Or if publishing to the same repo, use the automatic token
|
||||
#TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -1,4 +1,27 @@
|
||||
node_modules/
|
||||
npm-debug.log
|
||||
public/
|
||||
.python-version
|
||||
# Bundler cache
|
||||
.bundle
|
||||
vendor
|
||||
Gemfile.lock
|
||||
|
||||
# Jekyll cache
|
||||
.jekyll-cache
|
||||
.jekyll-metadata
|
||||
_site
|
||||
|
||||
# RubyGems
|
||||
*.gem
|
||||
|
||||
# NPM dependencies
|
||||
node_modules
|
||||
package-lock.json
|
||||
|
||||
# IDE configurations
|
||||
.idea
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/extensions.json
|
||||
!.vscode/tasks.json
|
||||
|
||||
# Misc
|
||||
_sass/dist
|
||||
assets/js/dist
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
[submodule "assets/lib"]
|
||||
path = assets/lib
|
||||
url = https://github.com/cotes2020/chirpy-static-assets.git
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"recommendations": ["ms-vscode-remote.remote-containers"]
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
{
|
||||
// Prettier
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||
"editor.formatOnSave": true,
|
||||
// Shopify Liquid
|
||||
"files.associations": {
|
||||
"*.html": "liquid"
|
||||
},
|
||||
"[markdown]": {
|
||||
"editor.defaultFormatter": "yzhang.markdown-all-in-one"
|
||||
},
|
||||
// Formatter
|
||||
"[html][liquid]": {
|
||||
"editor.defaultFormatter": "Shopify.theme-check-vscode"
|
||||
},
|
||||
"[shellscript]": {
|
||||
"editor.defaultFormatter": "mkhl.shfmt"
|
||||
},
|
||||
// Disable vscode built-in stylelint
|
||||
"css.validate": false,
|
||||
"scss.validate": false,
|
||||
"less.validate": false,
|
||||
// Stylint extension settings
|
||||
"stylelint.snippet": ["css", "scss"],
|
||||
"stylelint.validate": ["css", "scss"],
|
||||
// Run tasks in macOS
|
||||
"terminal.integrated.profiles.osx": {
|
||||
"zsh": { "path": "/bin/zsh", "args": ["-l", "-i"] }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "Run Jekyll Server",
|
||||
"type": "shell",
|
||||
"command": "./tools/run.sh",
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
},
|
||||
"problemMatcher": [],
|
||||
"detail": "Runs the Jekyll server with live reload."
|
||||
},
|
||||
{
|
||||
"label": "Build Jekyll Site",
|
||||
"type": "shell",
|
||||
"command": "./tools/test.sh",
|
||||
"group": {
|
||||
"kind": "build"
|
||||
},
|
||||
"problemMatcher": [],
|
||||
"detail": "Build the Jekyll site for production."
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
source "https://rubygems.org"
|
||||
|
||||
gem "jekyll-theme-chirpy", "~> 7.1", ">= 7.1.1"
|
||||
|
||||
gem "html-proofer", "~> 5.0", group: :test
|
||||
|
||||
platforms :mingw, :x64_mingw, :mswin, :jruby do
|
||||
gem "tzinfo", ">= 1", "< 3"
|
||||
gem "tzinfo-data"
|
||||
end
|
||||
|
||||
gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]
|
||||
@@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2023 Ian Andwati
|
||||
Copyright (c) 2024 Ian Andwati
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
#!/usr/bin/make -f
|
||||
|
||||
.PHONY: all build
|
||||
|
||||
BUILD_DIR := public
|
||||
|
||||
all: clean build
|
||||
|
||||
clean:
|
||||
rm -rfd ./$(BUILD_DIR)
|
||||
|
||||
build:
|
||||
zola build
|
||||
|
||||
serve:
|
||||
zola serve
|
||||
|
||||
update-zola:
|
||||
@./scripts/update-zola
|
||||
@@ -1,67 +1 @@
|
||||
# https://andwati.github.io
|
||||
|
||||
|
||||
|
||||
MY personal page and blog site.
|
||||
|
||||
<p align="center" width="100%">
|
||||
<img src="./screenshots/home.png" alt="word counter pro logo" />
|
||||
<img src="./screenshots/posts.png" alt="word counter pro logo" />
|
||||
</p>
|
||||
|
||||
<p align="center" width="100%">
|
||||
<img src="./screenshots/archive.png" alt="word counter pro logo" />
|
||||
<img src="./screenshots/about.png" alt="word counter pro logo" />
|
||||
</p>
|
||||
|
||||
## Features
|
||||
|
||||
- [ ] Dark and light themes. Defaults to the OS setting, with a switcher in the navigation bar.
|
||||
- [x] Support for comments using utterances
|
||||
- [x] Perfect Lighthouse score (Performance, Accessibility, Best Practices and SEO).
|
||||
- [ ] [KaTeX](https://katex.org/) support.
|
||||
- [x] [feed](https://andwati.github.io/rss.xml).
|
||||
- [x] [Archive page](https://andwati.github.io/archive/).
|
||||
- [x] [Tags](<(https://andwati.github.io/tags/)>)
|
||||
- [x] Responsive design.
|
||||
- [x] Code syntax highlighting.
|
||||
- [x] Word Count and Reading time
|
||||
- [x] Pagination
|
||||
|
||||
# Generating the site
|
||||
|
||||
## Steps
|
||||
|
||||
1. Clone this site and enter the directory.
|
||||
|
||||
```
|
||||
repo='andwati.github.io'; git clone [email protected]:andwati/${repo}.git && cd $repo
|
||||
```
|
||||
|
||||
2. Install or update to the latest Zola.
|
||||
|
||||
```
|
||||
make update-zola
|
||||
```
|
||||
|
||||
or install zola from [Github](https://github.com/getzola/zola)
|
||||
|
||||
3. Build the site!
|
||||
|
||||
```
|
||||
make build
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```
|
||||
zola build
|
||||
```
|
||||
|
||||
# Inspiration
|
||||
|
||||
This website was inspired by [gruvbox](https://github.com/morhetz/gruvbox),[Reilly Tucker Siemens](https://github.com/reillysiemens/tuckersiemens.com) and many more.
|
||||
|
||||
# License
|
||||
|
||||
This repo is licensed under [MIT License](./LICENSE)
|
||||
# Chirpy Starter
|
||||
@@ -0,0 +1,225 @@
|
||||
# The Site Configuration
|
||||
|
||||
# Import the theme
|
||||
theme: jekyll-theme-chirpy
|
||||
|
||||
# The language of the webpage › http://www.lingoes.net/en/translator/langcode.htm
|
||||
# If it has the same name as one of the files in folder `_data/locales`, the layout language will also be changed,
|
||||
# otherwise, the layout language will use the default value of 'en'.
|
||||
lang: en
|
||||
|
||||
# Change to your timezone › https://kevinnovak.github.io/Time-Zone-Picker
|
||||
timezone: Africa/Nairobi
|
||||
|
||||
# jekyll-seo-tag settings › https://github.com/jekyll/jekyll-seo-tag/blob/master/docs/usage.md
|
||||
# ↓ --------------------------
|
||||
|
||||
title: andwati # the main title
|
||||
|
||||
tagline: Thoughts and musings # it will display as the subtitle
|
||||
|
||||
description: >- # used by seo meta and the atom feed
|
||||
andwati's site
|
||||
|
||||
# Fill in the protocol & hostname for your site.
|
||||
# E.g. 'https://username.github.io', note that it does not end with a '/'.
|
||||
url: ""
|
||||
|
||||
github:
|
||||
username: andwati # change to your GitHub username
|
||||
|
||||
twitter:
|
||||
username: andwati_ # change to your Twitter username
|
||||
|
||||
social:
|
||||
# Change to your full name.
|
||||
# It will be displayed as the default author of the posts and the copyright owner in the Footer
|
||||
name: Ian Andwati
|
||||
email: [email protected] # change to your email address
|
||||
links:
|
||||
# The first element serves as the copyright owner's link
|
||||
- https://twitter.com/andwati_ # change to your Twitter homepage
|
||||
- https://github.com/andwati # change to your GitHub homepage
|
||||
# Uncomment below to add more social links
|
||||
# - https://www.facebook.com/username
|
||||
- https://www.linkedin.com/in/andwati
|
||||
|
||||
# Site Verification Settings
|
||||
webmaster_verifications:
|
||||
google: lBZ8ofF4rZJjQDf6ngTrI20wzaDq9GVMCsxfZfTcllI # fill in your Google verification code
|
||||
bing: # fill in your Bing verification code
|
||||
alexa: # fill in your Alexa verification code
|
||||
yandex: # fill in your Yandex verification code
|
||||
baidu: # fill in your Baidu verification code
|
||||
facebook: # fill in your Facebook verification code
|
||||
|
||||
# ↑ --------------------------
|
||||
# The end of `jekyll-seo-tag` settings
|
||||
|
||||
# Web Analytics Settings
|
||||
analytics:
|
||||
google:
|
||||
id: G-3QJCKHZT3J # fill in your Google Analytics ID
|
||||
goatcounter:
|
||||
id: andwati # fill in your GoatCounter ID
|
||||
umami:
|
||||
id: # fill in your Umami ID
|
||||
domain: # fill in your Umami domain
|
||||
matomo:
|
||||
id: # fill in your Matomo ID
|
||||
domain: # fill in your Matomo domain
|
||||
cloudflare:
|
||||
id: # fill in your Cloudflare Web Analytics token
|
||||
fathom:
|
||||
id: # fill in your Fathom Site ID
|
||||
|
||||
# Page views settings
|
||||
pageviews:
|
||||
provider: goatcounter # now only supports 'goatcounter'
|
||||
|
||||
# Prefer color scheme setting.
|
||||
#
|
||||
# Note: Keep empty will follow the system prefer color by default,
|
||||
# and there will be a toggle to switch the theme between dark and light
|
||||
# on the bottom left of the sidebar.
|
||||
#
|
||||
# Available options:
|
||||
#
|
||||
# light — Use the light color scheme
|
||||
# dark — Use the dark color scheme
|
||||
#
|
||||
theme_mode: # [light | dark]
|
||||
|
||||
# The CDN endpoint for media resources.
|
||||
# Notice that once it is assigned, the CDN url
|
||||
# will be added to all media resources (site avatar, posts' images, audio and video files) paths starting with '/'
|
||||
#
|
||||
# e.g. 'https://cdn.com'
|
||||
cdn:
|
||||
|
||||
# the avatar on sidebar, support local or CORS resources
|
||||
avatar:
|
||||
|
||||
# The URL of the site-wide social preview image used in SEO `og:image` meta tag.
|
||||
# It can be overridden by a customized `page.image` in front matter.
|
||||
social_preview_image: # string, local or CORS resources
|
||||
|
||||
# boolean type, the global switch for TOC in posts.
|
||||
toc: true
|
||||
|
||||
comments:
|
||||
# Global switch for the post-comment system. Keeping it empty means disabled.
|
||||
provider: utterances # [disqus | utterances | giscus]
|
||||
# The provider options are as follows:
|
||||
disqus:
|
||||
shortname: # fill with the Disqus shortname. › https://help.disqus.com/en/articles/1717111-what-s-a-shortname
|
||||
# utterances settings › https://utteranc.es/
|
||||
utterances:
|
||||
repo: andwati/andwati.github.io # <gh-username>/<repo>
|
||||
issue_term: # < url | pathname | title | ...>
|
||||
# Giscus options › https://giscus.app
|
||||
giscus:
|
||||
repo: # <gh-username>/<repo>
|
||||
repo_id:
|
||||
category:
|
||||
category_id:
|
||||
mapping: # optional, default to 'pathname'
|
||||
strict: # optional, default to '0'
|
||||
input_position: # optional, default to 'bottom'
|
||||
lang: # optional, default to the value of `site.lang`
|
||||
reactions_enabled: # optional, default to the value of `1`
|
||||
|
||||
# Self-hosted static assets, optional › https://github.com/cotes2020/chirpy-static-assets
|
||||
assets:
|
||||
self_host:
|
||||
enabled: # boolean, keep empty means false
|
||||
# specify the Jekyll environment, empty means both
|
||||
# only works if `assets.self_host.enabled` is 'true'
|
||||
env: # [development | production]
|
||||
|
||||
pwa:
|
||||
enabled: true # The option for PWA feature (installable)
|
||||
cache:
|
||||
enabled: true # The option for PWA offline cache
|
||||
# Paths defined here will be excluded from the PWA cache.
|
||||
# Usually its value is the `baseurl` of another website that
|
||||
# shares the same domain name as the current website.
|
||||
deny_paths:
|
||||
# - "/example" # URLs match `<SITE_URL>/example/*` will not be cached by the PWA
|
||||
|
||||
paginate: 10
|
||||
|
||||
# The base URL of your site
|
||||
baseurl: ""
|
||||
|
||||
# ------------ The following options are not recommended to be modified ------------------
|
||||
|
||||
kramdown:
|
||||
footnote_backlink: "↩︎"
|
||||
syntax_highlighter: rouge
|
||||
syntax_highlighter_opts: # Rouge Options › https://github.com/jneen/rouge#full-options
|
||||
css_class: highlight
|
||||
# default_lang: console
|
||||
span:
|
||||
line_numbers: false
|
||||
block:
|
||||
line_numbers: true
|
||||
start_line: 1
|
||||
|
||||
collections:
|
||||
tabs:
|
||||
output: true
|
||||
sort_by: order
|
||||
|
||||
defaults:
|
||||
- scope:
|
||||
path: "" # An empty string here means all files in the project
|
||||
type: posts
|
||||
values:
|
||||
layout: post
|
||||
comments: true # Enable comments in posts.
|
||||
toc: true # Display TOC column in posts.
|
||||
# DO NOT modify the following parameter unless you are confident enough
|
||||
# to update the code of all other post links in this project.
|
||||
permalink: /posts/:title/
|
||||
- scope:
|
||||
path: _drafts
|
||||
values:
|
||||
comments: false
|
||||
- scope:
|
||||
path: ""
|
||||
type: tabs # see `site.collections`
|
||||
values:
|
||||
layout: page
|
||||
permalink: /:title/
|
||||
|
||||
sass:
|
||||
style: compressed
|
||||
|
||||
compress_html:
|
||||
clippings: all
|
||||
comments: all
|
||||
endings: all
|
||||
profile: false
|
||||
blanklines: false
|
||||
ignore:
|
||||
envs: [development]
|
||||
|
||||
exclude:
|
||||
- "*.gem"
|
||||
- "*.gemspec"
|
||||
- docs
|
||||
- tools
|
||||
- README.md
|
||||
- LICENSE
|
||||
- "*.config.js"
|
||||
- package*.json
|
||||
|
||||
jekyll-archives:
|
||||
enabled: [categories, tags]
|
||||
layouts:
|
||||
category: category
|
||||
tag: tag
|
||||
permalinks:
|
||||
tag: /tags/:name/
|
||||
category: /categories/:name/
|
||||
@@ -0,0 +1,40 @@
|
||||
# The contact options.
|
||||
|
||||
- type: github
|
||||
icon: "fab fa-github"
|
||||
|
||||
- type: twitter
|
||||
icon: "fa-brands fa-x-twitter"
|
||||
|
||||
- type: email
|
||||
icon: "fas fa-envelope"
|
||||
noblank: false # open link in current tab
|
||||
|
||||
- type: rss
|
||||
icon: "fas fa-rss"
|
||||
noblank: false
|
||||
# Uncomment and complete the url below to enable more contact options
|
||||
#
|
||||
# - type: mastodon
|
||||
# icon: 'fab fa-mastodon' # icons powered by <https://fontawesome.com/>
|
||||
# url: '' # Fill with your Mastodon account page, rel="me" will be applied for verification
|
||||
#
|
||||
# - type: linkedin
|
||||
# icon: 'fab fa-linkedin' # icons powered by <https://fontawesome.com/>
|
||||
# url: '' # Fill with your Linkedin homepage
|
||||
#
|
||||
- type: stack-overflow
|
||||
icon: 'fab fa-stack-overflow'
|
||||
url: 'https://stackoverflow.com/users/12246264/ian-andwati' # Fill with your stackoverflow homepage
|
||||
#
|
||||
# - type: bluesky
|
||||
# icon: 'fa-brands fa-bluesky'
|
||||
# url: '' # Fill with your Bluesky profile link
|
||||
#
|
||||
# - type: reddit
|
||||
# icon: 'fa-brands fa-reddit'
|
||||
# url: '' # Fill with your Reddit profile link
|
||||
#
|
||||
# - type: threads
|
||||
# icon: 'fa-brands fa-threads'
|
||||
# url: '' # Fill with your Threads profile link
|
||||
@@ -0,0 +1,50 @@
|
||||
# Sharing options at the bottom of the post.
|
||||
# Icons from <https://fontawesome.com/>
|
||||
|
||||
platforms:
|
||||
- type: Twitter
|
||||
icon: "fa-brands fa-square-x-twitter"
|
||||
link: "https://twitter.com/intent/tweet?text=TITLE&url=URL"
|
||||
|
||||
- type: Facebook
|
||||
icon: "fab fa-facebook-square"
|
||||
link: "https://www.facebook.com/sharer/sharer.php?title=TITLE&u=URL"
|
||||
|
||||
- type: Telegram
|
||||
icon: "fab fa-telegram"
|
||||
link: "https://t.me/share/url?url=URL&text=TITLE"
|
||||
|
||||
# Uncomment below if you need to.
|
||||
#
|
||||
- type: Linkedin
|
||||
icon: "fab fa-linkedin"
|
||||
link: "https://www.linkedin.com/sharing/share-offsite/?url=URL"
|
||||
#
|
||||
# - type: Weibo
|
||||
# icon: "fab fa-weibo"
|
||||
# link: "https://service.weibo.com/share/share.php?title=TITLE&url=URL"
|
||||
#
|
||||
# - type: Mastodon
|
||||
# icon: "fa-brands fa-mastodon"
|
||||
# # See: https://github.com/justinribeiro/share-to-mastodon#properties
|
||||
# instances:
|
||||
# - label: mastodon.social
|
||||
# link: "https://mastodon.social/"
|
||||
# - label: mastodon.online
|
||||
# link: "https://mastodon.online/"
|
||||
# - label: fosstodon.org
|
||||
# link: "https://fosstodon.org/"
|
||||
# - label: photog.social
|
||||
# link: "https://photog.social/"
|
||||
#
|
||||
- type: Bluesky
|
||||
icon: "fa-brands fa-bluesky"
|
||||
link: "https://bsky.app/intent/compose?text=TITLE%20URL"
|
||||
#
|
||||
- type: Reddit
|
||||
icon: "fa-brands fa-square-reddit"
|
||||
link: "https://www.reddit.com/submit?url=URL&title=TITLE"
|
||||
#
|
||||
# - type: Threads
|
||||
# icon: "fa-brands fa-square-threads"
|
||||
# link: "https://www.threads.net/intent/post?text=TITLE%20URL"
|
||||
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env ruby
|
||||
#
|
||||
# Check for changed posts
|
||||
|
||||
Jekyll::Hooks.register :posts, :post_init do |post|
|
||||
|
||||
commit_num = `git rev-list --count HEAD "#{ post.path }"`
|
||||
|
||||
if commit_num.to_i > 1
|
||||
lastmod_date = `git log -1 --pretty="%ad" --date=iso "#{ post.path }"`
|
||||
post.data['last_modified_at'] = lastmod_date
|
||||
end
|
||||
|
||||
end
|
||||
@@ -1,11 +1,9 @@
|
||||
+++
|
||||
title = "Hello World"
|
||||
description = "Hello world"
|
||||
date = 2022-11-04
|
||||
author = "Ian Andwati"
|
||||
[taxonomies]
|
||||
tags = ["hugo", "blog", "go"]
|
||||
+++
|
||||
---
|
||||
title : Hello World
|
||||
description : Hello world
|
||||
date : 2022-11-04
|
||||
tags : [hugo, blog, go]
|
||||
---
|
||||
|
||||
How it begins
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
+++
|
||||
title = "Django Secret Key Tutorial"
|
||||
description = "Managing secrets"
|
||||
author = "Ian Andwati"
|
||||
date = 2022-11-11T15:34:14.160Z
|
||||
[taxonomies]
|
||||
tags = ["tutorial", "django", "python", ".env"]
|
||||
+++
|
||||
---
|
||||
title : Django Secret Key Tutorial
|
||||
description : Managing secrets
|
||||
date : 2022-11-11
|
||||
tags : [tutorial, django, python, .env]
|
||||
---
|
||||
|
||||
Managing the Django SECRET_KEY variable.
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
+++
|
||||
title = "Integrating Netlify CMS"
|
||||
description = "Integrating netlify cms"
|
||||
date = 2022-11-24T15:34:14.160Z
|
||||
author = "Ian Andwati"
|
||||
[taxonomies]
|
||||
tags = ["blog", "hugo", "netlify","netlify-cms","github"]
|
||||
+++
|
||||
---
|
||||
title : Integrating Netlify CMS
|
||||
description : Integrating netlify cms
|
||||
date : 2022-11-24
|
||||
tags : [blog, hugo, netlify,netlify-cms,github]
|
||||
---
|
||||
|
||||
Migrating to a better content management system through Netlify CMS
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
+++
|
||||
title= "Semantic Versioning(SemVer) and Conventional Commits"
|
||||
description = "Adopting best practices in your git and build workflows."
|
||||
date= 2023-01-24T15:34:14.160Z
|
||||
author = "Ian Andwati"
|
||||
[taxonomies]
|
||||
tags= ["git", "semver","workflow", "conventional commits"]
|
||||
+++
|
||||
---
|
||||
title: Semantic Versioning(SemVer) and Conventional Commits
|
||||
description : Adopting best practices in your git and build workflows.
|
||||
date: 2023-01-24
|
||||
media_subpath: /static/
|
||||
tags: [git, semver,workflow, conventional commits]
|
||||
---
|
||||
|
||||
Adopting best practices in your git and build workflows.
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
+++
|
||||
title ="Install PostgreSQL 15 on Arch | Manjaro | Garuda Linux"
|
||||
description = "Installing postgresql"
|
||||
date = 2023-02-16T15:34:14.160Z
|
||||
author = "Ian Andwati"
|
||||
[taxonomies]
|
||||
tags = ["postgresql", "archlinux", "manjaro", "garuda", "linux"]
|
||||
+++
|
||||
---
|
||||
title : Install PostgreSQL 15 on Arch | Manjaro | Garuda Linux
|
||||
description : Installing postgresql
|
||||
date : 2023-02-16
|
||||
tags : [postgresql, archlinux, manjaro, garuda, linux]
|
||||
---
|
||||
|
||||
Getting PostgreSQL up and running on Arch Linux-based distros
|
||||
|
||||
@@ -47,12 +45,12 @@ Postgres offers a lot of advantages that make it an excellent choice for highly
|
||||
|
||||
Now with all that fluff out of the way, let's get to business. The steps have been tested on Arch Linux with the KDE desktop.
|
||||
|
||||
> **Note:** Commands that should be run as the *postgres* user are prefixed by `[postgres]$` in this article.
|
||||
> **Note:** Commands that should be run as the *postgres* user are prefixed by `[postgres]` in this article.
|
||||
|
||||
## Step 1: Installing the PostgreSQL Package
|
||||
|
||||
```sh
|
||||
$ sudo pacman -Syu postgresql
|
||||
sudo pacman -Syu postgresql
|
||||
```
|
||||
|
||||
This command will update the package database and update all packages on the system then install the PostgreSQL package from your distribution mirrors. Never install a package without updating the system first. On a rolling release, this can lead to an unbootable system. Installing the package will also create a system user called *postgres*. You can now switch to the *postgres* user using a privilege elevation program.
|
||||
@@ -62,13 +60,13 @@ You can switch to the PostgreSQL user by executing the following command:
|
||||
- If you have sudo and are in sudoers
|
||||
|
||||
```sh
|
||||
$ sudo -iu postgres
|
||||
sudo -iu postgres
|
||||
```
|
||||
|
||||
- Otherwise using su:
|
||||
|
||||
```sh
|
||||
$ su
|
||||
su
|
||||
# su -l postgres
|
||||
```
|
||||
|
||||
@@ -79,20 +77,20 @@ Before PostgreSQL can function correctly, the database cluster must be initializ
|
||||
### 2.1 We can confirm the installed PostgreSQL version by running:
|
||||
|
||||
```sh
|
||||
$ postgres --version ─╯
|
||||
postgres --version ─╯
|
||||
postgres (PostgreSQL) 15.1
|
||||
```
|
||||
|
||||
### 2.2 Set applicable entries in **/etc/locale.gen**
|
||||
|
||||
```sh
|
||||
$ echo "en_US.UTF-8 UTF-8" | sudo tee /etc/locale.gen
|
||||
echo "en_US.UTF-8 UTF-8" | sudo tee /etc/locale.gen
|
||||
```
|
||||
|
||||
### 2.3 Then run **\*\*locale-gen\*\*** to generate locale settings
|
||||
|
||||
```sh
|
||||
$ sudo locale-gen
|
||||
sudo locale-gen
|
||||
Generating locales...
|
||||
en_US.UTF-8... done
|
||||
Generation complete.
|
||||
@@ -117,7 +115,7 @@ sudo su - postgres
|
||||
### 3.1 Check PostgreSQL status with the following command:
|
||||
|
||||
```sh
|
||||
$ systemctl status postgresql ─╯
|
||||
systemctl status postgresql ─╯
|
||||
postgresql.service - PostgreSQL database server
|
||||
Loaded: loaded (/usr/lib/systemd/system/postgresql.service; disabled; preset: disabled)
|
||||
Active: inactive (dead)
|
||||
@@ -132,13 +130,13 @@ sudo systemctl start postgresql
|
||||
### 3.3 Enable the PostgreSQL service to start automatically at boot by running the following command:
|
||||
|
||||
```sh
|
||||
$ sudo systemctl enable postgresql
|
||||
sudo systemctl enable postgresql
|
||||
```
|
||||
|
||||
### 3.4 Verify that PostgreSQL is running by running the following command:
|
||||
|
||||
```sh
|
||||
$ sudo systemctl status postgresql ─╯
|
||||
sudo systemctl status postgresql ─╯
|
||||
● postgresql.service - PostgreSQL database server
|
||||
Loaded: loaded (/usr/lib/systemd/system/postgresql.service; enabled; preset: disabled)
|
||||
Active: active (running) since Thu 2023-02-16 22:52:43 EAT; 20s ago
|
||||
@@ -155,6 +153,11 @@ $ sudo systemctl status postgresql
|
||||
└─26112 "postgres: logical replication launcher "
|
||||
```
|
||||
|
||||
# Change postgres User Password
|
||||
```sh
|
||||
sudo -u postgres psql -c "ALTER USER postgres PASSWORD '$PGPASSWORD';"
|
||||
```
|
||||
|
||||
# Resources
|
||||
|
||||
- [Arch Linux Wiki](https://wiki.archlinux.org/title/PostgreSQL)
|
||||
@@ -1,11 +1,9 @@
|
||||
+++
|
||||
title= "Subresource Integrity"
|
||||
description = "Understanding Subresource Integrity"
|
||||
date= 2023-04-29
|
||||
author = "Ian Andwati"
|
||||
[taxonomies]
|
||||
tags= ["subresource integrity", "csp", "cors"]
|
||||
+++
|
||||
---
|
||||
title: Subresource Integrity
|
||||
description : Understanding Subresource Integrity
|
||||
date: 2023-04-29
|
||||
tags: [subresource integrity, csp, cors]
|
||||
---
|
||||
|
||||
Understanding Subresource Integrity
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
+++
|
||||
title = "A Fresh Coat Of Paint"
|
||||
description = "Migrating to Zola"
|
||||
author = "Ian Andwati"
|
||||
date = 2023-08-24
|
||||
[taxonomies]
|
||||
tags = ["zola", "blog", "tera", "rust"]
|
||||
+++
|
||||
---
|
||||
title : A Fresh Coat Of Paint
|
||||
description : Migrating to Zola
|
||||
date : 2023-08-24
|
||||
tags : [zola, blog, tera, rust]
|
||||
---
|
||||
|
||||
Using Zola as my preferred static site generator
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
+++
|
||||
title = "What say you?"
|
||||
description = "Adding a comment system by utterances"
|
||||
author = "Ian Andwati"
|
||||
date = 2023-08-24T15:34:14.160Z
|
||||
[taxonomies]
|
||||
tags = ["blog", "utterances"]
|
||||
+++
|
||||
---
|
||||
title : What say you?
|
||||
description : Adding a comment system by utterances
|
||||
date : 2023-08-24
|
||||
tags : [blog, utterances]
|
||||
---
|
||||
|
||||
Free speech enhanced
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
+++
|
||||
title = "Setting up Obsidian sync in Windows"
|
||||
description = "Syncing Obsidian in Windows with Windows Task Scheduler with git"
|
||||
author = "Ian Andwati"
|
||||
date = 2023-10-01
|
||||
[taxonomies]
|
||||
tags = ["obsidian", "git","sync", "windows", "cron", "task scheduler", "powershell"]
|
||||
+++
|
||||
---
|
||||
title : Setting up Obsidian sync in Windows
|
||||
description : Syncing Obsidian in Windows with Windows Task Scheduler with git
|
||||
date : 2023-10-01
|
||||
tags : [obsidian, git,sync, windows, cron, task scheduler, powershell]
|
||||
---
|
||||
|
||||
Syncing Obsidian in Windows with Windows Task Scheduler and git
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
+++
|
||||
title = "Export default and module.exports in Javascript"
|
||||
description = "Modules are the building blocks of modern JavaScript applications, allowing for the encapsulation of code into reusable components. Two primary systems govern the exportation of these modules: export default in ES6 and module.exports in CommonJS. "
|
||||
author = "Ian Andwati"
|
||||
date = 2024-01-17
|
||||
[taxonomies]
|
||||
tags = ["javascript", "node"]
|
||||
+++
|
||||
---
|
||||
title : Export default and module.exports in Javascript
|
||||
date : 2024-01-17
|
||||
tags : [javascript, node]
|
||||
---
|
||||
|
||||
Javascript is a popular programming language that can run both in the browser and on the server. However, different environments may have different ways of organizing and importing Javascript modules. In this article, we will compare two common methods of exporting and importing modules: **export default** and **module.exports**.
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
# the default layout is 'page'
|
||||
icon: fas fa-info-circle
|
||||
order: 4
|
||||
---
|
||||
|
||||
I spend my free time working on hobby projects and sometimes I write about my experiences. In particular, I enjoy learning about programming languages,high performance computing, and how to write fast, robust, and secure code.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
layout: archives
|
||||
icon: fas fa-archive
|
||||
order: 3
|
||||
---
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
layout: categories
|
||||
icon: fas fa-stream
|
||||
order: 1
|
||||
---
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
layout: tags
|
||||
icon: fas fa-tags
|
||||
order: 2
|
||||
---
|
||||
|
Before Width: | Height: | Size: 9.6 KiB After Width: | Height: | Size: 9.6 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 8.7 KiB After Width: | Height: | Size: 8.7 KiB |
|
Before Width: | Height: | Size: 572 B After Width: | Height: | Size: 572 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
@@ -1,18 +0,0 @@
|
||||
base_url = "https://andwati.github.io"
|
||||
title = "Ian Andwati"
|
||||
description = "Ian Andwati's personal website"
|
||||
|
||||
generate_feeds = true
|
||||
feed_filenames = ["rss.xml"]
|
||||
minify_html = false
|
||||
taxonomies = [{ name = 'tags', feed = false }]
|
||||
compile_sass = true
|
||||
|
||||
[markdown]
|
||||
highlight_code = true
|
||||
highlight_theme = "gruvbox-dark"
|
||||
|
||||
[link_checker]
|
||||
|
||||
[extra]
|
||||
author = "Ian Andwati"
|
||||
@@ -1,8 +0,0 @@
|
||||
+++
|
||||
title = "Ian Andwati"
|
||||
description = "Ian's Website"
|
||||
+++
|
||||
I spend my free time working on [hobby projects] and sometimes I [write] about my experiences. In particular, I enjoy learning about programming languages,high performance computing, and how to write fast, robust, and secure code.
|
||||
|
||||
[hobby projects]: https://github.com/andwati
|
||||
[write]: /posts
|
||||
@@ -1,4 +0,0 @@
|
||||
+++
|
||||
title = "Archive"
|
||||
template = "archive.html"
|
||||
+++
|
||||
@@ -1,10 +0,0 @@
|
||||
+++
|
||||
title = "Contact"
|
||||
description = "Let's get in touch."
|
||||
+++
|
||||
|
||||
## Find me on
|
||||
|
||||
- Github : [https://github.com/andwati](https://github.com/andwati)
|
||||
|
||||
- Twitter : [https://twitter.com/andwati_]( https://twitter.com/andwati_)
|
||||
@@ -1,7 +0,0 @@
|
||||
+++
|
||||
render = false
|
||||
insert_anchor_links = "left"
|
||||
|
||||
[extra]
|
||||
hide_from_feed = true
|
||||
+++
|
||||
@@ -1,8 +0,0 @@
|
||||
+++
|
||||
title = "Posts"
|
||||
template = "posts.html"
|
||||
page_template = "post.html"
|
||||
sort_by = "date"
|
||||
insert_anchor_links = "right"
|
||||
paginate_by= 5
|
||||
+++
|
||||
@@ -1,17 +0,0 @@
|
||||
+++
|
||||
title = "File over app"
|
||||
description = "Take control of your artifacts"
|
||||
author = "Ian Andwati"
|
||||
draft = true
|
||||
date = 2024-04-22
|
||||
[taxonomies]
|
||||
tags = [ "entropy", "notes"]
|
||||
+++
|
||||
|
||||
Take control of your artifacts
|
||||
|
||||
<!-- more -->
|
||||
|
||||
In my endless endeavors to find the perfect note taking app led me to obsidian, a note taking software that uses markdown files as the file format. All software is ephemeral in nature and your artifacts need to survive the decline of your favorite app. The files you create should be available to you and shouldn't require specialized software to access.
|
||||
|
||||
Your data shouldn't be locked behind a paywall or an authentication system that is not under your control.
|
||||
@@ -0,0 +1,4 @@
|
||||
---
|
||||
layout: home
|
||||
# Index page
|
||||
---
|
||||
@@ -1,369 +0,0 @@
|
||||
/* TODO: Future considerations.
|
||||
- Reset all margin and padding for * to 0.
|
||||
- Use the <abbr> tag for abbreviations.
|
||||
- Support footnotes or asides for notes sections.
|
||||
- Support a "display title" in an [extra] section to allow for <br> elements
|
||||
or other manual control over title display.
|
||||
*/
|
||||
|
||||
@font-face {
|
||||
font-family: 'Noto Serif';
|
||||
src: local('Noto Serif'),
|
||||
url('fonts/NotoSerif.ttf') format("ttf");
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Noto Sans';
|
||||
src: local('Noto Sans'),
|
||||
url('fonts/NotoSans.ttf') format("ttf");
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Noto Sans Mono';
|
||||
src: local('Noto Sans Mono'),
|
||||
url('fonts/NotoSansMono.ttf') format("ttf");
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
:root {
|
||||
/* Fonts and Text Sizes */
|
||||
--default-serif-font: "Noto Serif", serif;
|
||||
--default-sans-font: "Noto Sans", sans-serif;
|
||||
--default-mono-font: "Noto Sans Mono", monospace;
|
||||
--default-font-size: 16px;
|
||||
--header-font-size: 2em;
|
||||
/* Not sure I like this as the default, but it keeps inline code blocks from
|
||||
overlapping. */
|
||||
--default-line-height: 1.5;
|
||||
|
||||
/* Gruvbox Dark Colors */
|
||||
--background-color: #1d2021;
|
||||
--foreground-color: #ebdbb2;
|
||||
--link-color: #458588;
|
||||
--muted-color: #928374;
|
||||
--primary-accent-color: #b16286;
|
||||
--secondary-accent-color: #689d6a;
|
||||
--code-background-color: #282828;
|
||||
--inline-code-background-color: #3c3836;
|
||||
}
|
||||
|
||||
.accent {
|
||||
color: var(--primary-accent-color);
|
||||
}
|
||||
|
||||
/* Required for sticky footer. */
|
||||
html,
|
||||
body {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
display: flex;
|
||||
/* Required for sticky footer. */
|
||||
flex-direction: column;
|
||||
/* Required for sticky footer. */
|
||||
margin: 0;
|
||||
line-height: var(--default-line-height);
|
||||
font-size: var(--default-font-size);
|
||||
font-family: var(--default-serif-font);
|
||||
background-color: var(--background-color);
|
||||
color: var(--foreground-color);
|
||||
border-top: 0.5em solid var(--primary-accent-color);
|
||||
}
|
||||
|
||||
main {
|
||||
flex: 1 0 auto;
|
||||
/* Required for sticky footer. */
|
||||
}
|
||||
|
||||
/* FIXME: For reasons that utterly bewilder me, an <article> with this id needs
|
||||
to be inside a <main> with no id. I have a strong feeling I've done
|
||||
something wrong here. */
|
||||
#content {
|
||||
max-width: 48em;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
padding-right: 1.4em;
|
||||
padding-left: 1.4em;
|
||||
padding-bottom: 1.4em;
|
||||
}
|
||||
|
||||
header {
|
||||
overflow: hidden;
|
||||
/* FIXME: This WILL cut off titles that are too long! */
|
||||
margin-top: 1.4em;
|
||||
margin-bottom: 1.4em;
|
||||
margin-left: 1em;
|
||||
margin-right: 1em;
|
||||
}
|
||||
|
||||
header>h1 {
|
||||
text-align: center;
|
||||
font-size: var(--header-font-size);
|
||||
font-family: var(--default-sans-font);
|
||||
padding-top: 2.8rem;
|
||||
margin-top: 0;
|
||||
margin-bottom: 0.7rem;
|
||||
}
|
||||
|
||||
header .post-meta {
|
||||
text-align: center;
|
||||
padding-top: 0.5em;
|
||||
padding-bottom: 0.9em;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.post-meta time {
|
||||
// TODO: This color doesn't look great in with a light color scheme...
|
||||
color: var(--muted-color);
|
||||
}
|
||||
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
padding-top: 1.2rem;
|
||||
margin-bottom: 0.2rem;
|
||||
}
|
||||
|
||||
p {
|
||||
padding-top: 0.4em;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
/* Default text uses serif, so use sans-serif to differentiate quoted text. */
|
||||
font-family: var(--default-sans-font);
|
||||
font-style: italic;
|
||||
/* Indent blockquotes, but align the start with where text in code begins. */
|
||||
margin: 0 1.25rem;
|
||||
padding-left: 1.25rem;
|
||||
padding-right: 1.25rem;
|
||||
border-left: 3px solid var(--secondary-accent-color);
|
||||
}
|
||||
|
||||
a {
|
||||
color: var(--link-color);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
|
||||
/* ---- Anchor links --------------------------------------------------------*/
|
||||
|
||||
/* Add a # to the left of a subheading when it references an internal link... */
|
||||
:where(h2, h3, h4, h5, h6)>a[href^="#"]::before {
|
||||
content: "#";
|
||||
display: inline-block;
|
||||
width: 1.2rem;
|
||||
margin-left: -1.2rem;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
/* ... but only display the internal anchor link when hovered over. */
|
||||
:where(h2, h3, h4, h5, h6):hover>a[href^="#"]::before {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/* When internal links are linked directly, display with the accent color. */
|
||||
:where(h2, h3, h4, h5, h6):target>a[href^="#"]::before {
|
||||
opacity: 1;
|
||||
color: var(--primary-accent-color);
|
||||
}
|
||||
|
||||
/* ---- Media ---------------------------------------------------------------*/
|
||||
|
||||
img,
|
||||
video {
|
||||
/* Media should fill the width of its container if possible. */
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
figure {
|
||||
/* Don't add margins to figures. */
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
figcaption {
|
||||
/* De-emphasize figure captions. */
|
||||
font-size: 0.85rem;
|
||||
color: var(--muted-color);
|
||||
}
|
||||
|
||||
/* ---- Tables --------------------------------------------------------------*/
|
||||
|
||||
table {
|
||||
/* FIXME: Use flexbox for centering? Frankly, this is still bad on mobile.
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
*/
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
text-align: left;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
/* Headers in a row (column scoped) get a colored bottom border. */
|
||||
th[scope="col"] {
|
||||
padding-top: 0.4em;
|
||||
border-bottom: 3px solid var(--secondary-accent-color);
|
||||
}
|
||||
|
||||
/* Headers in a column (row scoped) get a colored right border. */
|
||||
th[scope="row"] {
|
||||
border-right: 3px solid var(--secondary-accent-color);
|
||||
}
|
||||
|
||||
td {
|
||||
text-align: center;
|
||||
border: 1px solid var(--muted-color);
|
||||
}
|
||||
|
||||
th,
|
||||
td {
|
||||
vertical-align: bottom;
|
||||
padding-left: 0.4em;
|
||||
padding-right: 0.4em;
|
||||
border: 1px solid var(--muted-color);
|
||||
}
|
||||
|
||||
/* ---- Footer, nav, and copyright ------------------------------------------*/
|
||||
|
||||
footer {
|
||||
border-top: 0.5em solid var(--primary-accent-color);
|
||||
text-align: center;
|
||||
/* FIXME: Using the code background color could look awkward if a post ends
|
||||
in a code snippet. */
|
||||
background-color: var(--code-background-color);
|
||||
padding: 1.4em;
|
||||
flex-shrink: 0;
|
||||
/* Required for sticky footer. */
|
||||
}
|
||||
|
||||
footer a {
|
||||
color: var(--secondary-accent-color);
|
||||
}
|
||||
|
||||
/* Give footer nav links some breathing room. */
|
||||
footer>nav>a {
|
||||
// margin: 0 1.4em;
|
||||
margin: 0 0.4em;
|
||||
}
|
||||
|
||||
/* FIXME: This could probably go away with global margin/padding adjustments. */
|
||||
footer p {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
footer p,
|
||||
footer a {
|
||||
font-family: var(--default-sans-font);
|
||||
/* It doesn't seem as though Google fonts support direct usage of OpenType
|
||||
features like 'c2sc' and 'smcp'.
|
||||
|
||||
FIXME: It's not clear why numerals don't seem to obey this property. */
|
||||
font-variant-caps: all-small-caps;
|
||||
}
|
||||
|
||||
.pagination {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
list-style: none;
|
||||
|
||||
.page-item .disabled {
|
||||
opacity: 0.5;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.page-numbers {
|
||||
font-size: 0.9rem;
|
||||
color: var(--link-color);
|
||||
}
|
||||
}
|
||||
|
||||
pre {
|
||||
display: block;
|
||||
padding: 0.25rem 1.25rem;
|
||||
font-size: 85%;
|
||||
border-left: 0.25rem solid var(--primary-accent-color);
|
||||
}
|
||||
|
||||
code {
|
||||
padding: 0 0.4rem;
|
||||
// background-color: #3c3836;
|
||||
background-color: var(--inline-code-background-color);
|
||||
/* Inline code blocks look less aggressive with a little rounding. */
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
pre,
|
||||
code {
|
||||
overflow: auto;
|
||||
font-family: var(--default-mono-font);
|
||||
}
|
||||
|
||||
/* Without this the <code> tag gains a little padding that offsets text by like
|
||||
2 pixels. Let's *not* do that. */
|
||||
pre>code {
|
||||
padding: 0;
|
||||
background-color: var(--code-background-color);
|
||||
// Code inside a pre block doesn't need rounded borders.
|
||||
border-radius: unset;
|
||||
}
|
||||
|
||||
/* ---- Media Queries ------------------------------------------------------ */
|
||||
|
||||
@media (min-width: 470px) {
|
||||
:root {
|
||||
--default-font-size: 17px;
|
||||
}
|
||||
|
||||
/* Above this size, increase the header margins. Smaller sizes benefit from
|
||||
extra breathing room in the title. */
|
||||
header {
|
||||
margin-left: 2.8em;
|
||||
margin-right: 2.8em;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 625px) {
|
||||
:root {
|
||||
--default-font-size: 18px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 802px) {
|
||||
:root {
|
||||
--default-font-size: 19px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1003px) {
|
||||
:root {
|
||||
--default-font-size: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1225px) {
|
||||
:root {
|
||||
--default-font-size: 21px;
|
||||
}
|
||||
|
||||
/* On larger devices, give the anchor link some more space. */
|
||||
:where(h2, h3, h4, h5, h6)>a[href^="#"]::before {
|
||||
width: 1.8rem;
|
||||
margin-left: -1.8rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1496px) {
|
||||
:root {
|
||||
--default-font-size: 22px;
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 104 KiB |
|
Before Width: | Height: | Size: 131 KiB |
|
Before Width: | Height: | Size: 110 KiB |
|
Before Width: | Height: | Size: 171 KiB |
@@ -1,62 +0,0 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
set -e
|
||||
|
||||
: ${ZOLA_REPO='https://github.com/getzola/zola'}
|
||||
: ${ZOLA_INSTALL_DIR="${HOME}/.cargo/bin"}
|
||||
|
||||
# Helpers for ANSI color and logging.
|
||||
name="$(basename $0)"; esc=''; reset="${esc}[0m"
|
||||
red() { local string="${1}"; echo "${esc}[31m${string}${reset}"; }
|
||||
yellow() { local string="${1}"; echo "${esc}[33m${string}${reset}"; }
|
||||
green() { local string="${1}"; echo "${esc}[32m${string}${reset}"; }
|
||||
blue() { local string="${1}"; echo "${esc}[34m${string}${reset}"; }
|
||||
magenta() { local string="${1}"; echo "${esc}[35m${string}${reset}"; }
|
||||
log() { local string="${1}"; echo "[$(blue $name)] ${string}"; }
|
||||
|
||||
prompt_for_update() {
|
||||
local current="${1}"
|
||||
local latest="${2}"
|
||||
|
||||
[ -n "${current}" ] \
|
||||
&& installed="You're using Zola $(yellow $current)" \
|
||||
|| installed="Zola is $(red 'not installed')"
|
||||
|
||||
log "${installed}, but $(magenta $latest) is available."
|
||||
|
||||
# Prompt for an update. Exit the entire script if declined.
|
||||
read -p "$(log "Would you like to install Zola $(magenta $latest)? [y/N]: ")" answer
|
||||
case $answer in
|
||||
[Yy]*) log "Downloading Zola $(magenta $latest) from GitHub." ;;
|
||||
[Nn]*|*) log $(red "Aborted!"); exit ;;
|
||||
esac
|
||||
}
|
||||
|
||||
install_zola() {
|
||||
local version="${1}"
|
||||
local download_url="${ZOLA_REPO}/releases/download/${version}/zola-${version}-x86_64-unknown-linux-gnu.tar.gz"
|
||||
|
||||
curl --progress-bar --location $download_url | tar --gunzip --extract --directory=$ZOLA_INSTALL_DIR --file -
|
||||
}
|
||||
|
||||
update_zola() {
|
||||
# Find the current Zola version (if any).
|
||||
[ -n "$(which zola 2> /dev/null)" ] && current_version=$(zola --version | awk '{print "v"$2}')
|
||||
|
||||
# Find the latest available Zola version. Use --refs to avoid listing
|
||||
# annotated commit objects that include the dereference syntax '^{}'.
|
||||
# Find more background at https://stackoverflow.com/a/15472310.
|
||||
local latest_version=$(git ls-remote --tags --refs $ZOLA_REPO | # Fetch remote tags.
|
||||
sort -t '/' -k 3 -V | # Sort them by version.
|
||||
tail -n 1 | # Take the latest one.
|
||||
awk -F / '{print $3}') # Return only the tag.
|
||||
|
||||
if [ "${current_version}" != "${latest_version}" ]; then
|
||||
prompt_for_update "${current_version}" "${latest_version}"
|
||||
install_zola "${latest_version}"
|
||||
fi
|
||||
|
||||
log "You're using Zola $(magenta $latest_version). $(green "Everything is up-to-date!")"
|
||||
}
|
||||
|
||||
update_zola
|
||||
@@ -1,19 +0,0 @@
|
||||
{
|
||||
"name": "Ian Andwati",
|
||||
"short_name": "andwati",
|
||||
"icons": [
|
||||
{
|
||||
"src": "/android-chrome-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/android-chrome-512x512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png"
|
||||
}
|
||||
],
|
||||
"theme_color": "#ffffff",
|
||||
"background_color": "#ffffff",
|
||||
"display": "standalone"
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
{% extends "index.html" %}
|
||||
{% block title %}
|
||||
404 Not Found
|
||||
{% endblock title %}
|
||||
{% block meta %}
|
||||
<meta name="description" content="404 Not Found" />
|
||||
<meta property="og:site_name" content="andwati.github.io" />
|
||||
<meta property="og:locale" content="en-us" />
|
||||
<meta property="og:title" content="404 Not Found" />
|
||||
<meta property="og:description" content="404 Not Found" />
|
||||
<meta property="og:image" content="https://andwati.github.io/self.png" />
|
||||
<meta property="twitter:card" content="summary" />
|
||||
<meta property="twitter:site" content="@andwati_" />
|
||||
<meta property="twitter:title" content="404 Not Found" />
|
||||
<meta property="twitter:description" content="404 Not Found" />
|
||||
<meta property="twitter:image" content="https://andwati.github.io/self.png" />
|
||||
{% endblock meta %}
|
||||
{% block links %}
|
||||
{% endblock links %}
|
||||
{% block content %}
|
||||
<main id="content">
|
||||
<header>
|
||||
404 Not Found
|
||||
</header>
|
||||
<p>Hmm...could not find that page</p>
|
||||
</main>
|
||||
{% include "footer.html" %}
|
||||
{% endblock content %}
|
||||
@@ -1 +0,0 @@
|
||||
<a href="#{{ id }}" aria-label='Anchor link for: {{ id }}'></a>
|
||||
@@ -1,29 +0,0 @@
|
||||
{% extends "section.html" %}
|
||||
{% import "post_macros.html" as page_macros %}
|
||||
{% import "paginate.html" as paginate_macro %}
|
||||
{% block content %}
|
||||
<main id="content">
|
||||
<header>
|
||||
<h1>Archive</h1>
|
||||
</header>
|
||||
{% set section = get_section(path="posts/_index.md") %}
|
||||
{% for year, posts in section.pages
|
||||
| sort(attribute="date")
|
||||
| reverse
|
||||
| group_by(attribute="year") %}
|
||||
<div class="archive">
|
||||
<h2>{{ year }}</h2>
|
||||
<ul>
|
||||
{% for post in posts %}
|
||||
<li>
|
||||
<time>{{ post.date | date(format="%d-%h") }}</time>
|
||||
<a href="{{ post.permalink }}">{{ post.title }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% if paginator %}{{ paginate_macro::paginate() }}{% endif %}
|
||||
</main>
|
||||
{% include "footer.html" %}
|
||||
{% endblock content %}
|
||||
@@ -1,4 +0,0 @@
|
||||
<div>
|
||||
<script src="https://utteranc.es/client.js" repo="andwati/andwati.github.io" issue-term="title" theme="gruvbox-dark" crossorigin="anonymous" async>
|
||||
</script>
|
||||
</div>
|
||||
@@ -1,23 +0,0 @@
|
||||
<footer>
|
||||
<nav>
|
||||
<a href="/">Home</a>
|
||||
⬡
|
||||
<a href="/posts">Posts</a>
|
||||
⬡
|
||||
<a href="/tags">Tags</a>
|
||||
⬡
|
||||
<a href="/archive">Archive</a>
|
||||
⬡
|
||||
<a href="/contact">Contact</a>
|
||||
</nav>
|
||||
|
||||
<p>
|
||||
© 2022 -
|
||||
{{ now() | date(format="%Y") }}
|
||||
Ian Andwati
|
||||
⬡
|
||||
<a href="https://github.com/andwati/andwati.github.io">Source</a>
|
||||
⬡
|
||||
<a href="/rss.xml">Feed</a>
|
||||
</p>
|
||||
</footer>
|
||||
@@ -1,58 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
|
||||
<meta name="google-site-verification" content="lBZ8ofF4rZJjQDf6ngTrI20wzaDq9GVMCsxfZfTcllI" />
|
||||
|
||||
<!-- Google tag (gtag.js) -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=G-3QJCKHZT3J"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', 'G-3QJCKHZT3J');
|
||||
</script>
|
||||
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta name="keywords" content="" />
|
||||
<title>
|
||||
{% block title %}
|
||||
{{ section.title }}
|
||||
{% endblock title %}
|
||||
</title>
|
||||
{% block meta %}
|
||||
<meta name="description" content="{{ section.description }}" />
|
||||
<meta property="og:site_name" content="andwati.github.io" />
|
||||
<meta property="og:locale" content="en-us" />
|
||||
<meta property="og:url" content="{{ section.permalink }}" />
|
||||
<meta property="og:title" content="{{ section.title }}" />
|
||||
<meta property="og:description" content="{{ section.description }}" />
|
||||
<meta property="og:type" content="profile" />
|
||||
<meta property="og:image" content="https://andwati.github.io/self.png" />
|
||||
<meta property="twitter:card" content="summary" />
|
||||
<meta property="twitter:site" content="@andwati_" />
|
||||
<meta property="twitter:title" content="{{ section.title }}" />
|
||||
<meta property="twitter:description" content="{{ section.description }}" />
|
||||
<meta property="twitter:image" content="https://andwati.github.io/self.png" />
|
||||
{% endblock meta %}
|
||||
<link rel="dns-prefetch" href="https://fonts.googleapis.com" />
|
||||
<link rel="stylesheet" href="/site.css" />
|
||||
<link rel="shortcut icon" href="/favicon.ico" />
|
||||
{% block links %}
|
||||
<link rel="canonical" href="{{ section.permalink }}" />
|
||||
{% endblock links %}
|
||||
</head>
|
||||
<body>
|
||||
{% block content %}
|
||||
<main id="content">
|
||||
<header>
|
||||
<h1>{{ section.title }}</h1>
|
||||
</header>
|
||||
{{ section.content | safe }}
|
||||
</main>
|
||||
{% include "footer.html" %}
|
||||
{% endblock content %}
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,30 +0,0 @@
|
||||
{% extends "index.html" %}
|
||||
{% block title %}
|
||||
{{ page.title }}
|
||||
{% endblock title %}
|
||||
{% block meta %}
|
||||
<meta name="description" content="{{ page.description }}" />
|
||||
<meta property="og:site_name" content="andwati.github.io" />
|
||||
<meta property="og:locale" content="en-us" />
|
||||
<meta property="og:url" content="{{ page.permalink }}" />
|
||||
<meta property="og:title" content="{{ page.title }}" />
|
||||
<meta property="og:description" content="{{ page.description }}" />
|
||||
<meta property="og:image" content="https://andwati.github.io/self.png" />
|
||||
<meta property="twitter:card" content="summary" />
|
||||
<meta property="twitter:site" content="@andwati_" />
|
||||
<meta property="twitter:title" content="{{ page.title }}" />
|
||||
<meta property="twitter:description" content="{{ page.description }}" />
|
||||
<meta property="twitter:image" content="andwati.github.io/self.png" />
|
||||
{% endblock meta %}
|
||||
{% block links %}
|
||||
<link rel="canonical" href="{{ page.permalink }}" />
|
||||
{% endblock links %}
|
||||
{% block content %}
|
||||
<main id="content">
|
||||
<header>
|
||||
<h1>{{ page.title }}</h1>
|
||||
</header>
|
||||
{{ page.content | safe }}
|
||||
</main>
|
||||
{% include "footer.html" %}
|
||||
{% endblock content %}
|
||||
@@ -1,27 +0,0 @@
|
||||
{% macro paginate() %}
|
||||
{% if paginator %}
|
||||
<div>
|
||||
<ul class="pagination">
|
||||
{% if paginator.previous %}
|
||||
<li class="page-item page-prev">
|
||||
<a href="{{ paginator.previous }}" class="page-link">← Prev</a>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="page-item page-prev">
|
||||
<span class="page-link disabled" aria-disabled="true">← Prev</span>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li class="page-item page-numbers">{{ paginator.current_index }} of {{ paginator.number_pagers }}</li>
|
||||
{% if paginator.next %}
|
||||
<li class="page-item page-next">
|
||||
<a href="{{ paginator.next }}" class="page-link">Next →</a>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="page-item page-next">
|
||||
<span class="page-link disabled" aria-disabled="trues">Next →</span>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endmacro paginate %}
|
||||
@@ -1,35 +0,0 @@
|
||||
{% extends "page.html" %}
|
||||
{% import "post_macros.html" as page_macros %}
|
||||
{% block meta %}
|
||||
<meta name="description" content="{{ page.description }}" />
|
||||
<meta property="og:site_name" content="andwati.github.io" />
|
||||
<meta property="og:locale" content="en-us" />
|
||||
<meta property="og:url" content="{{ page.permalink }}" />
|
||||
<meta property="og:title" content="{{ page.title }}" />
|
||||
<meta property="og:description" content="{{ page.description }}" />
|
||||
<meta property="og:type" content="article" />
|
||||
<meta property="og:image" content="https://andwati.github.io/self.png" />
|
||||
<meta property="og:article:author" content="{{ config.extra.author }}" />
|
||||
<meta property="og:article:published_time" content="{{ page.date }}" />
|
||||
<meta property="og:article:section" content="Posts" />
|
||||
{% for tag in page.taxonomies.tags %}<meta property="og:article:tag" content="{{ tag }}" />{% endfor %}
|
||||
<meta property="twitter:card" content="summary" />
|
||||
<meta property="twitter:site" content="@andwati_" />
|
||||
<meta property="twitter:title" content="{{ page.title }}" />
|
||||
<meta property="twitter:description" content="{{ page.description }}" />
|
||||
<meta property="twitter:image" content="https://andwati.github.io/self.png" />
|
||||
{% endblock meta %}
|
||||
{% block content %}
|
||||
<main>
|
||||
<article id="content">
|
||||
<header>
|
||||
<h1>{{ page.title }}</h1>
|
||||
{{ page_macros::meta(page=page) }}
|
||||
</header>
|
||||
{{ page.content | safe }}
|
||||
</article>
|
||||
</main>
|
||||
|
||||
{% include "comments.html" %}
|
||||
{% include "footer.html" %}
|
||||
{% endblock content %}
|
||||
@@ -1,25 +0,0 @@
|
||||
{% macro meta(page) %}
|
||||
<div class="post-meta">
|
||||
<time datetime="{{ page.date }}">{{ page.date | date(format="%B %d,%Y") }}</time>
|
||||
{% if page.taxonomies.tags %}
|
||||
<span class="accent">⬡</span>
|
||||
{% for tag in page.taxonomies.tags %}
|
||||
<a href="{{ get_taxonomy_url(kind="tags", name=tag) }}">#{{ tag }}</a>
|
||||
{%- if page.taxonomies.tags | length > 1 and loop.index != page.taxonomies.tags | length -%},{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
<div class="accent">☕ {{ page.reading_time }} minutes 📝 {{ page.word_count }}</div>
|
||||
</div>
|
||||
{% endmacro meta %}
|
||||
{% macro snippet(page) %}
|
||||
<article>
|
||||
<h2>
|
||||
<a href="{{ page.permalink }}">{{ page.title }}</a>
|
||||
</h2>
|
||||
{{ self::meta(page=page) }}
|
||||
{% if page.summary %}{{ page.summary | safe }}{% endif %}
|
||||
<nav>
|
||||
<a href="{{ page.permalink }}">Read More →</a>
|
||||
</nav>
|
||||
</article>
|
||||
{% endmacro snippet %}
|
||||
@@ -1,13 +0,0 @@
|
||||
{% extends "section.html" %}
|
||||
{% import "post_macros.html" as post_macros %}
|
||||
{% import "paginate.html" as paginate_macro %}
|
||||
{% block content %}
|
||||
<main id="content">
|
||||
<header>
|
||||
<h1>Posts</h1>
|
||||
</header>
|
||||
{% for page in paginator.pages %}{{ post_macros::snippet(page=page) }}{% endfor %}
|
||||
{% if paginator %}{{ paginate_macro::paginate() }}{% endif %}
|
||||
</main>
|
||||
{% include "footer.html" %}
|
||||
{% endblock content %}
|
||||
@@ -1,29 +0,0 @@
|
||||
{% extends "index.html" %}
|
||||
{% block title %}
|
||||
{{ section.title }}
|
||||
{% endblock title %}
|
||||
{% block meta %}
|
||||
<meta name="description" content="{{ section.description }}" />
|
||||
<meta property="og:site_name" content="andwati.github.io" />
|
||||
<meta property="og:locale" content="en-us" />
|
||||
<meta property="og:url" content="{{ section.permalink }}" />
|
||||
<meta property="og:title" content="{{ section.title }}" />
|
||||
<meta property="og:description" content="{{ section.description }}" />
|
||||
<meta property="og:image" content="https://andati.com/self.png" />
|
||||
<meta property="twitter:card" content="summary" />
|
||||
<meta property="twitter:site" content="@andwati_" />
|
||||
<meta property="twitter:title" content="{{ section.title }}" />
|
||||
<meta property="twitter:description" content="{{ section.description }}" />
|
||||
<meta property="twitter:image" content="https://andwati.github.io/self.png" />
|
||||
{% endblock meta %}
|
||||
{% block links %}
|
||||
<link rel="canonical" href="{{ section.permalink }}" />
|
||||
{% endblock links %}
|
||||
{% block content %}
|
||||
<main>
|
||||
<header>
|
||||
<h1>{{ section.title }}</h1>
|
||||
</header>
|
||||
{{ section.content | safe }}
|
||||
</main>
|
||||
{% endblock content %}
|
||||
@@ -1,38 +0,0 @@
|
||||
{% extends "index.html" %}
|
||||
{% block title %}
|
||||
Tags
|
||||
{% endblock title %}
|
||||
{% block meta %}
|
||||
<meta name="description" content="All tags." />
|
||||
<meta property="og:site_name" content="andwati.github.io" />
|
||||
<meta property="og:locale" content="en-us" />
|
||||
<meta property="og:url" content="{{ current_url }}" />
|
||||
<meta property="og:title" content="Tags" />
|
||||
<meta property="og:description" content="All tags." />
|
||||
<meta property="og:image" content="https://andwati.github.io/self.png" />
|
||||
<meta property="twitter:card" content="summary" />
|
||||
<meta property="twitter:site" content="@andwati" />
|
||||
<meta property="twitter:title" content="Tags" />
|
||||
<meta property="twitter:description" content="All tags." />
|
||||
<meta property="twitter:image" content="https://andwati.github.io/self.png" />
|
||||
{% endblock meta %}
|
||||
{% block links %}
|
||||
<link rel="canonical" href="{{ current_url }}" />
|
||||
{% endblock links %}
|
||||
{% block content %}
|
||||
<main id="content">
|
||||
<header>
|
||||
<h1>All Tags</h1>
|
||||
</header>
|
||||
{% if terms %}
|
||||
<ul>
|
||||
{% for term in terms %}
|
||||
<li>
|
||||
<a href="{{ term.permalink }}">#{{ term.name }}</a> ({{ term.pages | length }})
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</main>
|
||||
{% include "footer.html" %}
|
||||
{% endblock content %}
|
||||
@@ -1,32 +0,0 @@
|
||||
{% extends "index.html" %}
|
||||
{% import "post_macros.html" as post_macros %}
|
||||
{% block title %}
|
||||
Tag - {{ term.name }}
|
||||
{% endblock title %}
|
||||
{% block meta %}
|
||||
<meta name="description" content="Posts tagged as {{ term.name }}" />
|
||||
<meta property="og:site_name" content="andwati.github.io" />
|
||||
<meta property="og:locale" content="en-us" />
|
||||
<meta property="og:url" content="{{ current_url }}" />
|
||||
<meta property="og:title" content="Tag - {{ term.name }}" />
|
||||
<meta property="og:description" content="Posts tagged as {{ term.name }}" />
|
||||
<meta property="og:image" content="https://andwati.github.io/self.png" />
|
||||
<meta property="twitter:card" content="summary" />
|
||||
<meta property="twitter:site" content="@andwati_" />
|
||||
<meta property="twitter:title" content="Tag - {{ term.name }}" />
|
||||
<meta property="twitter:description"
|
||||
content="Posts tagged as {{ term.name }}" />
|
||||
<meta property="twitter:image" content="https://andwati.github.io/self.png" />
|
||||
{% endblock meta %}
|
||||
{% block links %}
|
||||
<link rel="canonical" href="{{ current_url }}" />
|
||||
{% endblock links %}
|
||||
{% block content %}
|
||||
<main id="content">
|
||||
<header>
|
||||
<h1>Posts Tagged as "{{ term.name }}"</h1>
|
||||
</header>
|
||||
{% for page in term.pages %}{{ post_macros::snippet(page=page) }}{% endfor %}
|
||||
</main>
|
||||
{% include "footer.html" %}
|
||||
{% endblock content %}
|
||||
@@ -0,0 +1,54 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Run jekyll serve and then launch the site
|
||||
|
||||
prod=false
|
||||
command="bundle exec jekyll s -l"
|
||||
host="127.0.0.1"
|
||||
|
||||
help() {
|
||||
echo "Usage:"
|
||||
echo
|
||||
echo " bash /path/to/run [options]"
|
||||
echo
|
||||
echo "Options:"
|
||||
echo " -H, --host [HOST] Host to bind to."
|
||||
echo " -p, --production Run Jekyll in 'production' mode."
|
||||
echo " -h, --help Print this help information."
|
||||
}
|
||||
|
||||
while (($#)); do
|
||||
opt="$1"
|
||||
case $opt in
|
||||
-H | --host)
|
||||
host="$2"
|
||||
shift 2
|
||||
;;
|
||||
-p | --production)
|
||||
prod=true
|
||||
shift
|
||||
;;
|
||||
-h | --help)
|
||||
help
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
echo -e "> Unknown option: '$opt'\n"
|
||||
help
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
command="$command -H $host"
|
||||
|
||||
if $prod; then
|
||||
command="JEKYLL_ENV=production $command"
|
||||
fi
|
||||
|
||||
if [ -e /proc/1/cgroup ] && grep -q docker /proc/1/cgroup; then
|
||||
command="$command --force_polling"
|
||||
fi
|
||||
|
||||
echo -e "\n> $command\n"
|
||||
eval "$command"
|
||||
@@ -0,0 +1,89 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Build and test the site content
|
||||
#
|
||||
# Requirement: html-proofer, jekyll
|
||||
#
|
||||
# Usage: See help information
|
||||
|
||||
set -eu
|
||||
|
||||
SITE_DIR="_site"
|
||||
|
||||
_config="_config.yml"
|
||||
|
||||
_baseurl=""
|
||||
|
||||
help() {
|
||||
echo "Build and test the site content"
|
||||
echo
|
||||
echo "Usage:"
|
||||
echo
|
||||
echo " bash $0 [options]"
|
||||
echo
|
||||
echo "Options:"
|
||||
echo ' -c, --config "<config_a[,config_b[...]]>" Specify config file(s)'
|
||||
echo " -h, --help Print this information."
|
||||
}
|
||||
|
||||
read_baseurl() {
|
||||
if [[ $_config == *","* ]]; then
|
||||
# multiple config
|
||||
IFS=","
|
||||
read -ra config_array <<<"$_config"
|
||||
|
||||
# reverse loop the config files
|
||||
for ((i = ${#config_array[@]} - 1; i >= 0; i--)); do
|
||||
_tmp_baseurl="$(grep '^baseurl:' "${config_array[i]}" | sed "s/.*: *//;s/['\"]//g;s/#.*//")"
|
||||
|
||||
if [[ -n $_tmp_baseurl ]]; then
|
||||
_baseurl="$_tmp_baseurl"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
else
|
||||
# single config
|
||||
_baseurl="$(grep '^baseurl:' "$_config" | sed "s/.*: *//;s/['\"]//g;s/#.*//")"
|
||||
fi
|
||||
}
|
||||
|
||||
main() {
|
||||
# clean up
|
||||
if [[ -d $SITE_DIR ]]; then
|
||||
rm -rf "$SITE_DIR"
|
||||
fi
|
||||
|
||||
read_baseurl
|
||||
|
||||
# build
|
||||
JEKYLL_ENV=production bundle exec jekyll b \
|
||||
-d "$SITE_DIR$_baseurl" -c "$_config"
|
||||
|
||||
# test
|
||||
bundle exec htmlproofer "$SITE_DIR" \
|
||||
--disable-external \
|
||||
--ignore-urls "/^http:\/\/127.0.0.1/,/^http:\/\/0.0.0.0/,/^http:\/\/localhost/"
|
||||
}
|
||||
|
||||
while (($#)); do
|
||||
opt="$1"
|
||||
case $opt in
|
||||
-c | --config)
|
||||
_config="$2"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-h | --help)
|
||||
help
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
# unknown option
|
||||
help
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
main
|
||||