Merge pull request #1 from andwati/zola-switch

Zola switch
This commit is contained in:
2023-08-09 11:53:25 +03:00
committed by GitHub
45 changed files with 880 additions and 478 deletions
+1
View File
@@ -0,0 +1 @@
{"ignore": "D018"}
+4
View File
@@ -0,0 +1,4 @@
node_modules/
npm-debug.log
public/
.python-version
-3
View File
@@ -1,3 +0,0 @@
[submodule "themes/PaperMod"]
path = themes/PaperMod
url = https://github.com/adityatelange/hugo-PaperMod.git
View File
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2023 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
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+19
View File
@@ -0,0 +1,19 @@
#!/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 -3
View File
@@ -1,3 +1 @@
> Words about things
[![Netlify Status](https://api.netlify.com/api/v1/badges/471edaff-df82-49b0-87c4-0027d02c9784/deploy-status)](https://app.netlify.com/sites/andwati/deploys)
# My Digital Garden
-39
View File
@@ -1,39 +0,0 @@
---
title: "My 1st post"
date: 2020-09-15T11:30:03+00:00
# weight: 1
# aliases: ["/first"]
tags: ["first"]
author: "Me"
# author: ["Me", "You"] # multiple authors
showToc: true
TocOpen: false
draft: false
hidemeta: false
comments: false
description: "Desc Text."
canonicalURL: "https://canonical.url/to/page"
disableHLJS: true # to disable highlightjs
disableShare: false
disableHLJS: false
hideSummary: false
searchHidden: true
ShowReadingTime: true
ShowBreadCrumbs: true
ShowPostNavLinks: true
ShowWordCount: true
ShowRssButtonInSectionTermList: true
UseHugoToc: true
cover:
image: "<image path/url>" # image path/url
alt: "<alt text>" # alt text
caption: "<text>" # display caption under cover
relative: false # when using page bundles set this to true
hidden: true # only hide on current single page
editPost:
URL: "https://github.com/<path_to_repo>/content"
Text: "Suggest Changes" # edit text
appendFilePath: true # to append file path to Edit link
---
<!-- more -->
View File
+21
View File
@@ -0,0 +1,21 @@
title = "Ian Andwati"
description = "Ian Andwati's personal website"
base_url = "https://andwati.com"
genenerate_categories_pages = false
generate_tags_pages = false
generate_feed = true
feed_filename = "rss.xml"
minify_html = false
taxonomies = [{ name = 'tags', feed = false }]
compile_sass = true
[markdown]
highlight_code = true
highlight_theme = "gruvbox-dark"
[link_checker]
skip_anchor_prefixes = ["https://github.com/"]
[extra]
author = "Ian Andwati"
-137
View File
@@ -1,137 +0,0 @@
baseURL: "https://andwati.com/"
title: Ian Andwati
paginate: 5
theme: PaperMod
enableRobotsTXT: true
buildDrafts: false
buildFuture: false
buildExpired: false
googleAnalytics: G-3QJCKHZT3J
minify:
disableXML: true
minifyOutput: true
params:
env: production # to enable google analytics, opengraph, twitter-cards and schema.
title: Ian Andwati
description: "Software Engineer.Young, versatile and enthusiastic programmer and entrepreneur. "
keywords: [Blog, Portfolio, Ian Andwati, Andwati, Ian]
author: Ian Andwati
# author: ["Me", "You"] # multiple authors
images: [""]
DateFormat: "January 2, 2006"
defaultTheme: auto # dark, light
disableThemeToggle: false
ShowReadingTime: true
ShowShareButtons: true
ShowPostNavLinks: true
ShowBreadCrumbs: true
ShowCodeCopyButtons: true
ShowWordCount: true
ShowRssButtonInSectionTermList: true
UseHugoToc: true
disableSpecial1stPost: false
disableScrollToTop: false
comments: false
hidemeta: false
hideSummary: false
showtoc: false
tocopen: false
assets:
# disableHLJS: true # to disable highlight.js
# disableFingerprinting: true
favicon: "/favicon.ico"
favicon16x16: "/favicon-16x16.png"
favicon32x32: "/favicon-32x32.png"
apple_touch_icon: "/apple-touch-icon.png"
safari_pinned_tab: "<link / abs url>"
label:
text: "Home"
icon: /apple-touch-icon.png
iconHeight: 35
# home-info mode
homeInfoParams:
Title: "Hi there \U0001F44B"
Content: Welcome to my blog.Thoughts and musings.A little bit of this and that
socialIcons:
- name: twitter
url: "https://twitter.com/andwati_"
- name: stackoverflow
url: "https://stackoverflow.com/users/12246264/ian"
- name: github
url: "https://github.com/andwati"
- name : linkedin
url: "https://linkedin.com/in/andwati"
- name : email
url: "mailto:[email protected]"
analytics:
google:
SiteVerificationTag: "XYZabc"
bing:
SiteVerificationTag: "XYZabc"
yandex:
SiteVerificationTag: "XYZabc"
cover:
hidden: true # hide everywhere but not in structured data
hiddenInList: true # hide on list pages and home
hiddenInSingle: true # hide on single page
editPost:
URL: "https://github.com/andwati/content"
Text: "Suggest Changes" # edit text
appendFilePath: true # to append file path to Edit link
# for search
# https://fusejs.io/api/options.html
fuseOpts:
isCaseSensitive: false
shouldSort: true
location: 0
distance: 1000
threshold: 0.4
minMatchCharLength: 0
keys: ["title", "permalink", "summary", "content"]
menu:
main:
- identifier: archives
name: archives
url: /archives/
weight: 10
# - identifier: tags
# name: tags
# url: /tags/
# weight: 20
- identifier: newsletter
name: newsletter
url: https://buttondown.email/andwati
weight: 30
- identifier: about
name: about
url: /about/
# Read: https://github.com/adityatelange/hugo-PaperMod/wiki/FAQs#using-hugos-syntax-highlighter-chroma
pygmentsUseClasses: true
markup:
highlight:
noClasses: false
# anchorLineNos: true
codeFences: true
guessSyntax: true
lineNos: true
style: monokai
outputs:
home:
- HTML
- RSS
- JSON
+8
View File
@@ -0,0 +1,8 @@
+++
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, ,web dev, and how to write fast, robust, and secure code.
[hobby projects]: https://github.com/andwati
[write]: /posts
-26
View File
@@ -1,26 +0,0 @@
---
title: "About"
layout: "about"
url: "/about/"
summary: about
---
Welcome to my personal website! I am glad to hear what brings you here.
# Who am I?
As a software engineer with 2 years of experience in Python programming language and intermediate knowledge of JavaScript, I am well-versed in developing web applications using popular frameworks such as Django and Flask. I am also interested in exploring newer technologies such as FastAPI framework, Go, and Rust programming languages.
# Find me on:
- Github : https://github.com/andwati
![Github contribution graph](https://ghchart.rshah.org/andwati)
- Stack Overflow : https://stackoverflow.com/users/12246264/ian
![Stack Overflow info](https://stackoverflow-card.vercel.app/?userID=12246264&theme=solarized-light)
- Twitter : https://twitter.com/andwati_
- Email : andwatiian@gmail.com
+4
View File
@@ -0,0 +1,4 @@
+++
sort_by = "date"
template= "archive.html"
+++
-6
View File
@@ -1,6 +0,0 @@
---
title: "Archive"
layout: "archives"
url: "/archives/"
summary: archives
---
+19
View File
@@ -0,0 +1,19 @@
+++
title = "Contact"
description = "Let's get in touch."
+++
# Find me on:
- Github : [https://github.com/andwati](https://github.com/andwati)
![Github contribution graph](https://ghchart.rshah.org/andwati)
[Stack Overflow]( https://stackoverflow.com/users/12246264/ian)
![Stack Overflow info](https://stackoverflow-card.vercel.app/?userID=12246264&theme=solarized-light)
- Twitter : [https://twitter.com/andwati_]( https://twitter.com/andwati_)
- Email: [[email protected]](mailto:[email protected])
- LinkedIn : [https://linkedin.com/in/andwati](https://linkedin.com/in/andwati)
+8
View File
@@ -0,0 +1,8 @@
+++
title = "Posts"
template = "posts.html"
page_template = "post.html"
sort_by = "date"
insert_anchor_links = "left"
paginate_by= 5
+++
@@ -1,42 +1,15 @@
---
title: "Django Secret Key Tutorial"
date: 2022-11-11T15:34:14.160Z
# weight: 1
# aliases: ["/first"]
tags: ["tutorial", "Django", "Python", ".emv"]
author: "Ian Andwati"
showToc: true
TocOpen: false
draft: false
hidemeta: false
comments: false
description: "django secret key tutorial"
canonicalURL: ""
disableShare: false
disableHLJS: false
hideSummary: false
searchHidden: true
ShowReadingTime: true
ShowBreadCrumbs: true
ShowPostNavLinks: true
ShowWordCount: true
ShowRssButtonInSectionTermList: true
UseHugoToc: true
cover:
image: "<image path/url>" # image path/url
alt: "<alt text>" # alt text
caption: "<text>" # display caption under cover
relative: false # when using page bundles set this to true
hidden: true # only hide on current single page
editPost:
URL: "https://github.com/andwati/content"
Text: "Suggest Changes" # edit text
appendFilePath: true # to append file path to Edit link
---
+++
title = "Django Secret Key Tutorial"
description = "Managing secrets"
author = "Ian Andwati"
date = 2022-11-11T15:34:14.160Z
[taxonomies]
tags = ["tutorial", "Django", "Python", ".env"]
+++
Managing the Django SECRET_KEY variable.
<!--more-->
<!-- more -->
The Django `SECRET_KEY` variable is very crucial to your Django application. The secret key must be a large random value and it must be kept secret. Leaking this value to unauthorized people could lead to a security breach. The SECRET_KEY is used in Django for cryptographic signing. It is used to generate tokens and hashes, they can be recreated using this variable. If it is not configured Django throws a `django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty` error
@@ -1,34 +1,15 @@
---
title: "Hello World"
date: 2022-11-04
tags: ["hugo, blog, Go"]
author: "Ian Andwati"
showToc: true
TocOpen: false
draft: false
hidemeta: false
comments: false
description: "Hello world"
canonicalURL: ""
disableShare: false
disableHLJS: false
hideSummary: false
searchHidden: true
ShowReadingTime: true
ShowBreadCrumbs: true
ShowPostNavLinks: true
ShowWordCount: true
ShowRssButtonInSectionTermList: true
UseHugoToc: true
editPost:
URL: "https://github.com/andwati/content"
Text: "Suggest Changes" # edit text
appendFilePath: true # to append file path to Edit link
---
+++
title = "Hello World"
description = "Hello world"
date = 2022-11-04
author = "Ian Andwati"
[taxonomies]
tags = ["hugo", "blog", "Go"]
+++
How it begins
<!--more-->
<!-- more -->
In this post-web2.0 age, people seem to blog less and less, and blogs seem to be dying slowly. People are separated in different Apps where the content is not searchable by search engines.
@@ -47,7 +28,7 @@ Mostly random stuff and a few tutorials. I'll see where this goes.Although some
I use hugo as a static site generator.After trying a couple of blogging platforms and trying to build a few from scratch I decided to
throw in the towel and opt in for a ready made solution, no need reinventing the wheel.
Hugo is one of the most popular open-source static site generators. With its amazing speed and flexibility, Hugo makes building websites fun again.Hugo provides a robust theming system that is easy to implement but capable of producing even the most complicated websites.Hugo's Go-based templating provides just the right amount of logic to build anything from the simple to complex. For this site I decided to go with the [even theme](https://github.com/olOwOlo/hugo-theme-even). The commenting system is implemented using [Utterances](https://utteranc.es/)
Hugo is one of the most popular open-source static site generators. With its amazing speed and flexibility, Hugo makes building websites fun again.Hugo provides a robust theming system that is easy to implement but capable of producing even the most complicated websites.Hugo's Go-based templates provide just the right amount of logic to build anything from the simple to complex. For this site I decided to go with the [even theme](https://github.com/olOwOlo/hugo-theme-even). The commenting system is implemented using [Utterances](https://utteranc.es/)
# Blog site hosting
@@ -1,42 +1,15 @@
---
title: "Install PostgreSQL 15 on Arch | Manjaro | Garuda Linux"
date: 2023-02-16T15:34:14.160Z
# weight: 1
# aliases: ["/first"]
tags: ["postgresql", "archlinux", "manjaro", "garuda", "linux"]
author: "Ian Andwati"
showToc: true
TocOpen: false
draft: false
hidemeta: false
comments: false
description: "Integrating netlify cms."
canonicalURL: ""
disableShare: false
disableHLJS: false
hideSummary: false
searchHidden: true
ShowReadingTime: true
ShowBreadCrumbs: true
ShowPostNavLinks: true
ShowWordCount: true
ShowRssButtonInSectionTermList: true
UseHugoToc: true
cover:
image: "<image path/url>" # image path/url
alt: "<alt text>" # alt text
caption: "<text>" # display caption under cover
relative: false # when using page bundles set this to true
hidden: true # only hide on current single page
editPost:
URL: "https://github.com/andwati/content"
Text: "Suggest Changes" # edit text
appendFilePath: true # to append file path to Edit link
---
+++
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"]
+++
Getting PostgreSQL up and running on Arch Linux-based distros
<!--more-->
<!-- more -->
# Overview
@@ -78,7 +51,7 @@ Now with all that fluff out of the way, let's get to business. The steps have be
## Step 1: Installing the PostgreSQL Package
```shell
```sh
$ sudo pacman -Syu postgresql
```
@@ -88,13 +61,13 @@ You can switch to the PostgreSQL user by executing the following command:
- If you have sudo and are in sudoers
```shell
```sh
$ sudo -iu postgres
```
- Otherwise using su:
```shell
```sh
$ su
# su -l postgres
```
@@ -105,20 +78,20 @@ Before PostgreSQL can function correctly, the database cluster must be initializ
### 2.1 We can confirm the installed PostgreSQL version by running:
```shell
```sh
$ postgres --version ─╯
postgres (PostgreSQL) 15.1
```
### 2.2 Set applicable entries in **/etc/locale.gen**
```shell
```sh
$ echo "en_US.UTF-8 UTF-8" | sudo tee /etc/locale.gen
```
### 2.3 Then run **\*\*locale-gen\*\*** to generate locale settings
```shell
```sh
$ sudo locale-gen
Generating locales...
en_US.UTF-8... done
@@ -129,13 +102,13 @@ Generation complete.
You must first log in as the **postgres** user using the following command before you can initialize PostgreSQL’s data directory:
```shell
```sh
sudo su - postgres
```
### 2.5 With the following command, you can now initialize PostgreSQL’s data directory:
```shell
```sh
[postgres]$ initdb -D /var/lib/postgres/data
```
@@ -143,7 +116,7 @@ sudo su - postgres
### 3.1 Check PostgreSQL status with the following command:
```shell
```sh
$ systemctl status postgresql ─╯
postgresql.service - PostgreSQL database server
Loaded: loaded (/usr/lib/systemd/system/postgresql.service; disabled; preset: disabled)
@@ -152,19 +125,19 @@ $ systemctl status postgresql
### 3.2 Start the PostgreSQL service by running the following command:
```shell
```sh
sudo systemctl start postgresql
```
### 3.3 Enable the PostgreSQL service to start automatically at boot by running the following command:
```shell
```sh
$ sudo systemctl enable postgresql
```
### 3.4 Verify that PostgreSQL is running by running the following command:
```shell
```sh
$ sudo systemctl status postgresql ─╯
● postgresql.service - PostgreSQL database server
Loaded: loaded (/usr/lib/systemd/system/postgresql.service; enabled; preset: disabled)
@@ -1,42 +1,15 @@
---
title: "Integrating Netlify CMS"
date: 2022-11-24T15:34:14.160Z
# weight: 1
# aliases: ["/first"]
tags: ["blog", "hugo", "netlify","netlify-cms","github"]
author: "Ian Andwati"
showToc: true
TocOpen: false
draft: false
hidemeta: false
comments: false
description: "Integrating netlify cms."
canonicalURL: ""
disableShare: false
disableHLJS: false
hideSummary: false
searchHidden: true
ShowReadingTime: true
ShowBreadCrumbs: true
ShowPostNavLinks: true
ShowWordCount: true
ShowRssButtonInSectionTermList: true
UseHugoToc: true
cover:
image: "<image path/url>" # image path/url
alt: "<alt text>" # alt text
caption: "<text>" # display caption under cover
relative: false # when using page bundles set this to true
hidden: true # only hide on current single page
editPost:
URL: "https://github.com/andwati/content"
Text: "Suggest Changes" # edit text
appendFilePath: true # to append file path to Edit link
---
+++
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"]
+++
Migrating to a better content management system through Netlify CMS
<!--more-->
<!-- more -->
# Heavy Lifting
@@ -1,42 +1,15 @@
---
title: "Semantic Versioning(SemVer) and Conventional Commits"
date: 2023-01-24T15:34:14.160Z
# weight: 1
# aliases: ["/first"]
tags: ["git", "semver","workflow", "conventional commits"]
author: "Ian Andwati"
showToc: true
TocOpen: false
draft: false
hidemeta: false
comments: false
description: "semantic versioning"
canonicalURL: ""
disableShare: false
disableHLJS: false
hideSummary: false
searchHidden: true
ShowReadingTime: true
ShowBreadCrumbs: true
ShowPostNavLinks: true
ShowWordCount: true
ShowRssButtonInSectionTermList: true
UseHugoToc: true
cover:
image: "<image path/url>" # image path/url
alt: "<alt text>" # alt text
caption: "<text>" # display caption under cover
relative: false # when using page bundles set this to true
hidden: true # only hide on current single page
editPost:
URL: "https://github.com/andwati/content"
Text: "Suggest Changes" # edit text
appendFilePath: true # to append file path to Edit link
---
+++
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"]
+++
Adopting best practices in your git and build workflows.
Adopting best practices in your git and build workflows.
<!--more-->
<!-- more -->
# What is Semver?
@@ -50,7 +23,7 @@ The dependency issue arises when several packages have dependencies on the same
### Summary
Semantic versioning is based on three numbers that indicate the versions of the software and the compatibilities.They are `X.Y.Z` correspondind to `Major.Minor.Patch`
Semantic versioning is based on three numbers that indicate the versions of the software and the compatibilities.They are `X.Y.Z` corresponding to `Major.Minor.Patch`
- **Major Version (X):**Introduces major changes to the code and breaking changes toward backward compatibility
- **Minor Version (Y):** These code changes don’t introduce breaking changes. This could be adding a new feature that doesn't break changes but are not exactly bug fixes.
@@ -1,29 +1,11 @@
---
title: "Subresource Integrity"
date: 2023-04-29
# weight: 1
# aliases: ["/first"]
tags: ["Subresource Integrity", "CSP", "CORS"]
author: "Ian Andwati"
# author: ["Me", "You"] # multiple authors
showToc: false
TocOpen: false
draft: false
hidemeta: false
comments: false
description: "Understanding Subresource Integrity"
canonicalURL: ""
disableShare: false
disableHLJS: false
hideSummary: false
searchHidden: true
ShowReadingTime: true
ShowBreadCrumbs: true
ShowPostNavLinks: true
ShowWordCount: true
ShowRssButtonInSectionTermList: true
UseHugoToc: true
---
+++
title= "Subresource Integrity"
description = "Understanding Subresource Integrity"
date= 2023-04-29
author = "Ian Andwati"
[taxonomies]
tags= ["Subresource Integrity", "CSP", "CORS"]
+++
Understanding Subresource Integrity
@@ -40,7 +22,7 @@ In my junior year while I was learning HTML and CSS I got to use the Bootstrap c
/>
```
I didnt bother with the `integrity` attribute of the link(guess I wasnt curios enough). The integrity attribute has a cryptographic hash value that is important in CDNs and its called the Subresource Integrity.
I didn't bother with the `integrity` attribute of the link(guess I wasn't curios enough). The integrity attribute has a cryptographic hash value that is important in CDNs and its called the Subresource Integrity.
Subresource Integrity (SRI) is a security feature in web browsers that helps prevent malicious or compromised scripts from being loaded and executed on a website.a security feature that enables browsers to verify that resources they fetch (for example, from a CDN) are delivered without unexpected manipulation. It works by allowing you to provide a cryptographic hash that a fetched resource must match.
@@ -124,7 +106,7 @@ Access-Control-Allow-Origin: *
# How browsers handle Subresource Integrity
Web browsers employ several mechanisms to handle Subresource Integrity (SRI). When a <script> or <link> element with an integrity attribute is encountered by the browser, it compares the script or stylesheet to the expected hash given in the integrity value before executing the script or applying the stylesheet.
Web browsers employ several mechanisms to handle Subresource Integrity (SRI). When a **script** or **link** element with an integrity attribute is encountered by the browser, it compares the script or stylesheet to the expected hash given in the integrity value before executing the script or applying the stylesheet.
For resources served from a different domain than the document in which it's embedded, the browser also checks the resource using Cross-Origin Resource Sharing (CORS) to ensure that the origin serving the resource allows it to be shared with the requesting domain. This additional check is important for preventing unauthorized access to sensitive resources.
@@ -132,9 +114,9 @@ If the script or stylesheet fails to match its associated integrity value, the b
# References
- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP
- https://www.srihash.org/
- https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity
- https://html.spec.whatwg.org/multipage/semantics.html#attr-script-integrity
- https://html.spec.whatwg.org/multipage/semantics.html#attr-link-integrity
- https://w3c.github.io/webappsec-subresource-integrity/#the-integrity-attribute
- [https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP)
- [https://www.srihash.org/](https://www.srihash.org/)
- [https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity)
- [https://html.spec.whatwg.org/multipage/semantics.html#attr-script-integrity](https://html.spec.whatwg.org/multipage/semantics.html#attr-script-integrity)
- [https://html.spec.whatwg.org/multipage/semantics.html#attr-link-integrity](https://html.spec.whatwg.org/multipage/semantics.html#attr-link-integrity)
- [https://w3c.github.io/webappsec-subresource-integrity/#the-integrity-attribute](https://w3c.github.io/webappsec-subresource-integrity/#the-integrity-attribute)
-8
View File
@@ -1,8 +0,0 @@
---
title: "Search" # in any language you want
layout: "search" # is necessary
# url: "/archive"
# description: "Description for Search"
summary: "search"
placeholder: "placeholder text in search input box"
---
View File
View File
+4 -28
View File
@@ -1,33 +1,9 @@
[build]
command = "hugo"
publish = "public"
command = "zola build"
[build.environment]
HUGO_VERSION = "0.111.3"
ZOLA_VERSION = "0.17.2"
[build.processing]
skip_processing = false
[build.processing.css]
bundle = true
minify = false
[build.processing.js]
bundle = true
minify = false
[build.processing.html]
pretty_urls = true
[build.processing.images]
compress = true
[[headers]]
for = "/*"
[headers.values]
Cache-Control = "public, max-age=600"
[[headers]]
for = "*.(css|js|woff|woff2|ttf|png|jpg|jpeg)"
[headers.values]
Cache-Control = "public, max-age=2592000"
[context.deploy-preview]
command = "zola buld --base-url $DEPLOY_PRIME_URL"
View File
+308
View File
@@ -0,0 +1,308 @@
/* TODO: Future considerations.
- Reset all margin and padding for * to 0.
- Use the <abbr> tag for abbreviations.
- Support footnotes or asides for notes sections.
- Serve fonts from the local server rather than Google's API.
- Support a "display title" in an [extra] section to allow for <br> elements
or other manual control over title display. */
@charset "utf-8";
@import url('https://fonts.googleapis.com/css?family=Noto+Sans|Noto+Serif|Noto+Sans+Mono');
: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: 2.0em;
/* 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);
}
/* ---- Code blocks ---------------------------------------------------------*/
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 aggresive 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;
}
/* ---- 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;
}
/* ---- 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; }
}
+62
View File
@@ -0,0 +1,62 @@
#!/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
-6
View File
@@ -1,6 +0,0 @@
This favicon was generated using the following font:
- Font Title: Poppins
- Font Author: Copyright 2020 The Poppins Project Authors (https://github.com/itfoundry/Poppins)
- Font Source: http://fonts.gstatic.com/s/poppins/v20/pxiByp8kv8JHgFVrLCz7V1tvFP-KUEg.ttf
- Font License: SIL Open Font License, 1.1 (http://scripts.sil.org/OFL))
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

+28
View File
@@ -0,0 +1,28 @@
{% 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.com" />
<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.com/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.com/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
View File
@@ -0,0 +1 @@
<a href="#{{ id }}" aria-label='Anchor link for: {{ id }}'></a>
+27
View File
@@ -0,0 +1,27 @@
{% extends "section.html" %}
{% import "post_macros.html" as page_macros %}
{% 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 %}
</main>
{% include "footer.html" %}
{% endblock content %}
+22
View File
@@ -0,0 +1,22 @@
<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.com">Source</a>
⬡
<a href="/rss.xml">Feed</a>
</p>
</footer>
+45
View File
@@ -0,0 +1,45 @@
<!DOCTYPE html>
<html lang="en">
<head>
<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.com" />
<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.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.com/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>
+30
View File
@@ -0,0 +1,30 @@
{% extends "index.html" %}
{% block title %}
{{ page.title }}
{% endblock title %}
{% block meta %}
<meta name="description" content="{{ page.description }}" />
<meta property="og:site_name" content="andwati.com" />
<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.com/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.com/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 %}
+33
View File
@@ -0,0 +1,33 @@
{% 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.com" />
<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.com/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.com/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 "footer.html" %}
{% endblock content %}
+24
View File
@@ -0,0 +1,24 @@
{% 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>
{% 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 %}
+15
View File
@@ -0,0 +1,15 @@
{% extends "section.html" %}
{% import "post_macros.html" as post_macros %}
{% block content %}
<main id="content">
<header>
<h1>Posts</h1>
</header>
{% for page in paginator.pages %}{{ post_macros::snippet(page=page) }}{% endfor %}
<nav>
{% if paginator.previous %}<a href="{{ paginator.previous }}" class="previous">Previous</a>{% endif %}
{% if paginator.next %}<a href="{{ paginator.next }}" class="next">Next</a>{% endif %}
</nav>
</main>
{% include "footer.html" %}
{% endblock content %}
+29
View File
@@ -0,0 +1,29 @@
{% extends "index.html" %}
{% block title %}
{{ section.title }}
{% endblock title %}
{% block meta %}
<meta name="description" content="{{ section.description }}" />
<meta property="og:site_name" content="andwati.com" />
<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.com/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 %}
+38
View File
@@ -0,0 +1,38 @@
{% extends "index.html" %}
{% block title %}
Tags
{% endblock title %}
{% block meta %}
<meta name="description" content="All tags." />
<meta property="og:site_name" content="andwati.com" />
<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.com/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.com/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 %}
+32
View File
@@ -0,0 +1,32 @@
{% 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.com" />
<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.com/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.com/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 %}
Submodule themes/PaperMod deleted from 031e2ba57e