feat: move to hugo
All checks were successful
Build and deploy website / Build and Push Hugo Site (push) Successful in 36s
|
@ -16,7 +16,7 @@ concurrency:
|
|||
|
||||
jobs:
|
||||
build-push:
|
||||
name: Build and Push Jekyll Site
|
||||
name: Build and Push Hugo Site
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
@ -24,33 +24,35 @@ jobs:
|
|||
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)
|
||||
|
||||
# Build and test site
|
||||
|
||||
- name: Setup Ruby
|
||||
uses: https://github.com/ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: 3.3
|
||||
bundler-cache: true
|
||||
|
||||
- name: Build site
|
||||
run: bundle exec jekyll b -d _site
|
||||
- name: Cache Hugo resources
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
JEKYLL_ENV: "production"
|
||||
cache-name: cache-hugo-resources
|
||||
with:
|
||||
path: resources
|
||||
key: ${{ env.cache-name }}
|
||||
|
||||
- name: Test site
|
||||
run: |
|
||||
bundle exec htmlproofer _site \
|
||||
\-\-disable-external \
|
||||
\-\-ignore-urls "/^http:\/\/127.0.0.1/,/^http:\/\/0.0.0.0/,/^http:\/\/localhost/"
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "^1.17.0"
|
||||
- run: go version
|
||||
|
||||
- name: Setup Hugo
|
||||
uses: https://github.com/peaceiris/actions-hugo@v2
|
||||
with:
|
||||
hugo-version: "latest"
|
||||
extended: true
|
||||
|
||||
- name: Build
|
||||
run: hugo --minify --gc
|
||||
|
||||
- name: Copy website to destination server
|
||||
uses: https://github.com/garygrossgarten/github-action-scp@release
|
||||
with:
|
||||
local: _site
|
||||
local: public
|
||||
remote: /srv/docker/nginx/html/blog
|
||||
host: ${{ secrets.SSH_HOST }}
|
||||
port: ${{ secrets.SSH_PORT }}
|
||||
|
|
1
.gitattributes
vendored
|
@ -14,3 +14,4 @@
|
|||
*.png binary
|
||||
*.jpg binary
|
||||
*.ico binary
|
||||
*.png binary
|
||||
|
|
30
.gitignore
vendored
|
@ -1,27 +1,3 @@
|
|||
# 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/vendors
|
||||
assets/js/dist
|
||||
public
|
||||
resources
|
||||
.hugo_build.lock
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
FROM nginx:1.27.4@sha256:124b44bfc9ccd1f3cedf4b592d4d1e8bddb78b51ec2ed5056c52d3692baebc19
|
||||
|
||||
COPY _site /usr/share/nginx/html
|
14
Gemfile
|
@ -1,14 +0,0 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
source "https://rubygems.org"
|
||||
|
||||
gem "jekyll-theme-chirpy", "~> 7.2", ">= 7.2.4"
|
||||
|
||||
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.2.0", :platforms => [:mingw, :x64_mingw, :mswin]
|
2
LICENSE
|
@ -1,6 +1,6 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2021 Cotes Chung
|
||||
Copyright (c) 2021 Jimmy Cai
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
84
README.md
|
@ -1,43 +1,69 @@
|
|||
# Chirpy Starter
|
||||
<img align="right" width="150" alt="logo" src="https://user-images.githubusercontent.com/5889006/190859553-5b229b4f-c476-4cbd-928f-890f5265ca4c.png">
|
||||
|
||||
[][gem]
|
||||
[][mit]
|
||||
# Hugo Theme Stack Starter Template
|
||||
|
||||
When installing the [**Chirpy**][chirpy] theme through [RubyGems.org][gem], Jekyll can only read files in the folders
|
||||
`_data`, `_layouts`, `_includes`, `_sass` and `assets`, as well as a small part of options of the `_config.yml` file
|
||||
from the theme's gem. If you have ever installed this theme gem, you can use the command
|
||||
`bundle info --path jekyll-theme-chirpy` to locate these files.
|
||||
This is a quick start template for [Hugo theme Stack](https://github.com/CaiJimmy/hugo-theme-stack). It uses [Hugo modules](https://gohugo.io/hugo-modules/) feature to load the theme.
|
||||
|
||||
The Jekyll team claims that this is to leave the ball in the user’s court, but this also results in users not being
|
||||
able to enjoy the out-of-the-box experience when using feature-rich themes.
|
||||
It comes with a basic theme structure and configuration. GitHub action has been set up to deploy the theme to a public GitHub page automatically. Also, there's a cron job to update the theme automatically everyday.
|
||||
|
||||
To fully use all the features of **Chirpy**, you need to copy the other critical files from the theme's gem to your
|
||||
Jekyll site. The following is a list of targets:
|
||||
## Get started
|
||||
|
||||
```shell
|
||||
.
|
||||
├── _config.yml
|
||||
├── _plugins
|
||||
├── _tabs
|
||||
└── index.html
|
||||
1. Click *Use this template*, and create your repository as `<username>.github.io` on GitHub.
|
||||

|
||||
|
||||
2. Once the repository is created, create a GitHub codespace associated with it.
|
||||

|
||||
|
||||
3. And voila! You're ready to go. The codespace has been configured with the latest version of Hugo extended, just run `hugo server` in the terminal and see your new site in action.
|
||||
|
||||
4. Check `config` folder for the configuration files. You can edit them to suit your needs. Make sure to update the `baseurl` property in `config/_default/config.toml` to your site's URL.
|
||||
|
||||
5. Open Settings -> Pages. Change the build branch from `master` to `gh-pages`.
|
||||

|
||||
|
||||
6. Once you're done editing the site, just commit it and push it. GitHub action will deploy the site automatically to GitHub page asociated with the repository.
|
||||

|
||||
|
||||
---
|
||||
|
||||
In case you don't want to use GitHub codespace, you can also run this template in your local machine. **You need to install Git, Go and Hugo extended locally.**
|
||||
|
||||
## Update theme manually
|
||||
|
||||
Run:
|
||||
|
||||
```bash
|
||||
hugo mod get -u github.com/CaiJimmy/hugo-theme-stack/v3
|
||||
hugo mod tidy
|
||||
```
|
||||
|
||||
To save you time, and also in case you lose some files while copying, we extract those files/configurations of the
|
||||
latest version of the **Chirpy** theme and the [CD][CD] workflow to here, so that you can start writing in minutes.
|
||||
> This starter template has been configured with `v3` version of theme. Due to the limitation of Go module, once the `v4` or up version of theme is released, you need to update the theme manually. (Modifying `config/module.toml` file)
|
||||
|
||||
## Usage
|
||||
## Deploy to another static page hostings
|
||||
|
||||
Check out the [theme's docs](https://github.com/cotes2020/jekyll-theme-chirpy/wiki).
|
||||
If you want to build this site using another static page hosting, you need to make sure they have Go installed in the machine.
|
||||
|
||||
## Contributing
|
||||
<details>
|
||||
<summary>Vercel</summary>
|
||||
|
||||
You need to overwrite build command to install manually Go:
|
||||
|
||||
This repository is automatically updated with new releases from the theme repository. If you encounter any issues or want to contribute to its improvement, please visit the [theme repository][chirpy] to provide feedback.
|
||||
```
|
||||
amazon-linux-extras install golang1.11 && hugo --gc --minify
|
||||
```
|
||||
|
||||
## License
|
||||

|
||||
|
||||
This work is published under [MIT][mit] License.
|
||||
If you are using Node.js 20, you need to overwrite the install command to install manually Go:
|
||||
|
||||
[gem]: https://rubygems.org/gems/jekyll-theme-chirpy
|
||||
[chirpy]: https://github.com/cotes2020/jekyll-theme-chirpy/
|
||||
[CD]: https://en.wikipedia.org/wiki/Continuous_deployment
|
||||
[mit]: https://github.com/cotes2020/chirpy-starter/blob/master/LICENSE
|
||||
```
|
||||
dnf install -y golang
|
||||
```
|
||||
|
||||

|
||||
|
||||
|
||||
Make sure also to specify Hugo version in the environment variable `HUGO_VERSION` (Use the latest version of Hugo extended):
|
||||
|
||||

|
||||
</details>
|
||||
|
|
227
_config.yml
|
@ -1,227 +0,0 @@
|
|||
# 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: Europe/Zurich
|
||||
|
||||
# jekyll-seo-tag settings › https://github.com/jekyll/jekyll-seo-tag/blob/master/docs/usage.md
|
||||
# ↓ --------------------------
|
||||
|
||||
title: The Pensieve # the main title
|
||||
|
||||
# it will display as the subtitle
|
||||
tagline: >-
|
||||
A stream of consciousness archive about some stuff I've done.
|
||||
|
||||
description: >- # used by seo meta and the atom feed
|
||||
|
||||
# Fill in the protocol & hostname for your site.
|
||||
# E.g. 'https://username.github.io', note that it does not end with a '/'.
|
||||
url: "https://blog.martin.md"
|
||||
|
||||
github:
|
||||
username: Radu-C-Martin # change to your GitHub username
|
||||
|
||||
mastodon:
|
||||
username: radu@mstdn.md
|
||||
|
||||
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: Radu C. Martin
|
||||
email: contact@martin.md
|
||||
links:
|
||||
- https://blog.martin.md
|
||||
# The first element serves as the copyright owner's link
|
||||
- https://github.com/Radu-C-Martin # change to your GitHub homepage
|
||||
# Uncomment below to add more social links
|
||||
# - https://www.facebook.com/username
|
||||
- https://www.linkedin.com/in/Radu-C-Martin
|
||||
|
||||
# Site Verification Settings
|
||||
webmaster_verifications:
|
||||
google: # 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: # fill in your Google Analytics ID
|
||||
goatcounter:
|
||||
id: # 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: # 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: '/assets/avatar.png'
|
||||
|
||||
# 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: # [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: # <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
|
||||
- purgecss.js
|
||||
- rollup.config.js
|
||||
- "package*.json"
|
||||
|
||||
jekyll-archives:
|
||||
enabled: [categories, tags]
|
||||
layouts:
|
||||
category: category
|
||||
tag: tag
|
||||
permalinks:
|
||||
tag: /tags/:name/
|
||||
category: /categories/:name/
|
|
@ -1,38 +0,0 @@
|
|||
# The contact options.
|
||||
# icons powered by <https://fontawesome.com/>
|
||||
#
|
||||
- type: github
|
||||
icon: "fab fa-github"
|
||||
|
||||
# - type: email
|
||||
# icon: "fas fa-envelope"
|
||||
# noblank: true # open link in current tab
|
||||
|
||||
- type: mastodon
|
||||
icon: 'fab fa-mastodon'
|
||||
# Fill with your Mastodon account page, rel="me" will be applied for verification
|
||||
url: 'https://mstdn.md/@radu'
|
||||
|
||||
# - type: linkedin
|
||||
# icon: 'fab fa-linkedin' # icons powered by <https://fontawesome.com/>
|
||||
# url: 'www.linkedin.com/in/radu-c-martin'
|
||||
|
||||
- type: matrix
|
||||
icon: 'fa-solid fa-message'
|
||||
url: 'https://matrix.to/#/@radu:martin.md'
|
||||
#
|
||||
# - 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
|
||||
|
||||
- type: rss
|
||||
icon: "fas fa-rss"
|
||||
noblank: true
|
|
@ -1,50 +0,0 @@
|
|||
# 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"
|
|
@ -1,14 +0,0 @@
|
|||
#!/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 +0,0 @@
|
|||
|
|
@ -1,8 +0,0 @@
|
|||
---
|
||||
# the default layout is 'page'
|
||||
icon: fas fa-info-circle
|
||||
order: 4
|
||||
---
|
||||
|
||||
> Add Markdown syntax content to file `_tabs/about.md`{: .filepath } and it will show up on this page.
|
||||
{: .prompt-tip }
|
|
@ -1,5 +0,0 @@
|
|||
---
|
||||
layout: archives
|
||||
icon: fas fa-archive
|
||||
order: 3
|
||||
---
|
|
@ -1,5 +0,0 @@
|
|||
---
|
||||
layout: categories
|
||||
icon: fas fa-stream
|
||||
order: 1
|
||||
---
|
|
@ -1,5 +0,0 @@
|
|||
---
|
||||
layout: tags
|
||||
icon: fas fa-tags
|
||||
order: 2
|
||||
---
|
1
assets/icons/brand-git.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-brand-git"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M16 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M12 8m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M12 16m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M12 15v-6" /><path d="M15 11l-2 -2" /><path d="M11 7l-1.9 -1.9" /><path d="M13.446 2.6l7.955 7.954a2.045 2.045 0 0 1 0 2.892l-7.955 7.955a2.045 2.045 0 0 1 -2.892 0l-7.955 -7.955a2.045 2.045 0 0 1 0 -2.892l7.955 -7.955a2.045 2.045 0 0 1 2.892 0z" /></svg>
|
After Width: | Height: | Size: 732 B |
1
assets/icons/brand-mastodon.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-brand-mastodon"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18.648 15.254c-1.816 1.763 -6.648 1.626 -6.648 1.626a18.262 18.262 0 0 1 -3.288 -.256c1.127 1.985 4.12 2.81 8.982 2.475c-1.945 2.013 -13.598 5.257 -13.668 -7.636l-.026 -1.154c0 -3.036 .023 -4.115 1.352 -5.633c1.671 -1.91 6.648 -1.666 6.648 -1.666s4.977 -.243 6.648 1.667c1.329 1.518 1.352 2.597 1.352 5.633s-.456 4.074 -1.352 4.944z" /><path d="M12 11.204v-2.926c0 -1.258 -.895 -2.278 -2 -2.278s-2 1.02 -2 2.278v4.722m4 -4.722c0 -1.258 .895 -2.278 2 -2.278s2 1.02 2 2.278v4.722" /></svg>
|
After Width: | Height: | Size: 812 B |
1
assets/icons/brand-matrix.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-brand-matrix"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 3h-1v18h1" /><path d="M20 21h1v-18h-1" /><path d="M7 9v6" /><path d="M12 15v-3.5a2.5 2.5 0 1 0 -5 0v.5" /><path d="M17 15v-3.5a2.5 2.5 0 1 0 -5 0v.5" /></svg>
|
After Width: | Height: | Size: 483 B |
5
assets/icons/person.svg
Normal file
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg width="800px" height="800px" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" version="1.1" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5">
|
||||
<circle cx="8" cy="6" r="3.25"/>
|
||||
<path d="m2.75 14.25c0-2.5 2-5 5.25-5s5.25 2.5 5.25 5"/>
|
||||
</svg>
|
After Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 180 KiB After Width: | Height: | Size: 180 KiB |
10
assets/jsconfig.json
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"*": [
|
||||
"../../../.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/!cai!jimmy/hugo-theme-stack/v3@v3.30.0/assets/*"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
3
assets/scss/custom.scss
Normal file
|
@ -0,0 +1,3 @@
|
|||
/*
|
||||
You can add your own custom styles here.
|
||||
*/
|
6
config/_default/_languages.toml
Normal file
|
@ -0,0 +1,6 @@
|
|||
# Rename this file to languages.toml to enable multilingual support
|
||||
[en]
|
||||
languageName = "English"
|
||||
languagedirection = "ltr"
|
||||
title = "The Pensieve"
|
||||
weight = 1
|
18
config/_default/config.toml
Normal file
|
@ -0,0 +1,18 @@
|
|||
# Change baseurl before deploy
|
||||
baseurl = "https://blog.martin.md"
|
||||
languageCode = "en-us"
|
||||
title = "The Pensieve"
|
||||
|
||||
# Theme i18n support
|
||||
# Available values: en, fr, id, ja, ko, pt-br, zh-cn, zh-tw, es, de, nl, it, th, el, uk, ar
|
||||
defaultContentLanguage = "en"
|
||||
|
||||
# Set hasCJKLanguage to true if DefaultContentLanguage is in [zh-cn ja ko]
|
||||
# This will make .Summary and .WordCount behave correctly for CJK languages.
|
||||
hasCJKLanguage = false
|
||||
|
||||
# Change it to your Disqus shortname before using
|
||||
disqusShortname = "hugo-theme-stack"
|
||||
|
||||
[pagination]
|
||||
pagerSize = 5
|
26
config/_default/markup.toml
Normal file
|
@ -0,0 +1,26 @@
|
|||
# Markdown renderer configuration
|
||||
[goldmark.renderer]
|
||||
unsafe = true
|
||||
|
||||
[goldmark.extensions.passthrough]
|
||||
enable = true
|
||||
|
||||
# LaTeX math support
|
||||
# https://gohugo.io/content-management/mathematics/
|
||||
[goldmark.extensions.passthrough.delimiters]
|
||||
block = [['\[', '\]'], ['$$', '$$']]
|
||||
inline = [['\(', '\)']]
|
||||
|
||||
[tableOfContents]
|
||||
endLevel = 4
|
||||
ordered = true
|
||||
startLevel = 2
|
||||
|
||||
[highlight]
|
||||
noClasses = false
|
||||
codeFences = true
|
||||
guessSyntax = true
|
||||
lineNoStart = 1
|
||||
lineNos = true
|
||||
lineNumbersInTable = true
|
||||
tabWidth = 4
|
44
config/_default/menu.toml
Normal file
|
@ -0,0 +1,44 @@
|
|||
# Configure main menu and social menu
|
||||
#[[main]]
|
||||
#identifier = "home"
|
||||
#name = "Home"
|
||||
#url = "/"
|
||||
#[main.params]
|
||||
#icon = "home"
|
||||
#newtab = true
|
||||
|
||||
[[social]]
|
||||
identifier = "github"
|
||||
name = "GitHub"
|
||||
url = "https://github.com/Radu-C-Martin"
|
||||
weight = 1
|
||||
|
||||
[social.params]
|
||||
icon = "brand-github"
|
||||
|
||||
[[social]]
|
||||
identifier = "forgejo"
|
||||
name = "Forgejo"
|
||||
url = "https://git.martin.md/radu"
|
||||
weight = 2
|
||||
|
||||
[social.params]
|
||||
icon = "brand-git"
|
||||
|
||||
[[social]]
|
||||
identifier = "mastodon"
|
||||
name = "Mastodon"
|
||||
url = "https://mstdn.md/@radu"
|
||||
weight = 3
|
||||
|
||||
[social.params]
|
||||
icon = "brand-mastodon"
|
||||
|
||||
[[social]]
|
||||
identifier = "matrix"
|
||||
name = "Matrix"
|
||||
url = "https://matrix.to/#/@radu:martin.md"
|
||||
weight = 4
|
||||
|
||||
[social.params]
|
||||
icon = "brand-matrix"
|
2
config/_default/module.toml
Normal file
|
@ -0,0 +1,2 @@
|
|||
[[imports]]
|
||||
path = "github.com/CaiJimmy/hugo-theme-stack/v3"
|
85
config/_default/params.toml
Normal file
|
@ -0,0 +1,85 @@
|
|||
# Pages placed under these sections will be shown on homepage and archive page.
|
||||
mainSections = ["post"]
|
||||
# Output page's full content in RSS.
|
||||
rssFullContent = true
|
||||
favicon = "/favicon.png"
|
||||
|
||||
[footer]
|
||||
since = 2025
|
||||
customText = ""
|
||||
|
||||
[dateFormat]
|
||||
published = "Jan 02, 2006"
|
||||
lastUpdated = "Jan 02, 2006 15:04 MST"
|
||||
|
||||
[sidebar]
|
||||
emoji = "🎮"
|
||||
subtitle = "A loosely organized archive of projects, thoughts, and experiments."
|
||||
|
||||
[sidebar.avatar]
|
||||
enabled = true
|
||||
local = true
|
||||
src = "img/avatar.png"
|
||||
|
||||
[article]
|
||||
headingAnchor = false
|
||||
math = false
|
||||
readingTime = true
|
||||
|
||||
[article.license]
|
||||
enabled = false
|
||||
default = "Licensed under CC BY-NC-SA 4.0"
|
||||
|
||||
## Widgets
|
||||
[[widgets.homepage]]
|
||||
type = "search"
|
||||
|
||||
[[widgets.homepage]]
|
||||
type = "archives"
|
||||
|
||||
[widgets.homepage.params]
|
||||
limit = 5
|
||||
|
||||
[[widgets.homepage]]
|
||||
type = "categories"
|
||||
|
||||
[widgets.homepage.params]
|
||||
limit = 10
|
||||
|
||||
[[widgets.homepage]]
|
||||
type = "tag-cloud"
|
||||
|
||||
[widgets.homepage.params]
|
||||
limit = 10
|
||||
|
||||
[[widgets.page]]
|
||||
type = "toc"
|
||||
|
||||
[opengraph.twitter]
|
||||
site = ""
|
||||
card = "summary_large_image"
|
||||
|
||||
[defaultImage.opengraph]
|
||||
enabled = false
|
||||
local = false
|
||||
src = ""
|
||||
|
||||
[colorScheme]
|
||||
toggle = true
|
||||
default = "auto"
|
||||
|
||||
[imageProcessing.cover]
|
||||
enabled = true
|
||||
|
||||
[imageProcessing.content]
|
||||
enabled = true
|
||||
|
||||
## Comments
|
||||
[comments]
|
||||
enabled = false
|
||||
provider = "cactus"
|
||||
|
||||
[comments.cactus]
|
||||
defaultHomeserverUrl = "https://matrix.cactus.chat:8448"
|
||||
serverName = "cactus.chat"
|
||||
siteName = ""
|
3
config/_default/permalinks.toml
Normal file
|
@ -0,0 +1,3 @@
|
|||
# Permalinks format of each content section
|
||||
post = "/p/:slug/"
|
||||
page = "/:slug/"
|
12
config/_default/related.toml
Normal file
|
@ -0,0 +1,12 @@
|
|||
# Related contents configuration
|
||||
includeNewer = true
|
||||
threshold = 60
|
||||
toLower = false
|
||||
|
||||
[[indices]]
|
||||
name = "tags"
|
||||
weight = 100
|
||||
|
||||
[[indices]]
|
||||
name = "categories"
|
||||
weight = 200
|
8
content/_index.md
Normal file
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
menu:
|
||||
main:
|
||||
name: Home
|
||||
weight: 1
|
||||
params:
|
||||
icon: home
|
||||
---
|
10
content/categories/example-category/_index.md
Normal file
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
title: Example Category
|
||||
description: A description of this category
|
||||
image:
|
||||
|
||||
# Badge style
|
||||
style:
|
||||
background: "#2a9d8f"
|
||||
color: "#fff"
|
||||
---
|
37
content/page/about/index.md
Normal file
|
@ -0,0 +1,37 @@
|
|||
---
|
||||
title: About Me
|
||||
slug: about
|
||||
menu:
|
||||
main:
|
||||
weight: 5
|
||||
params:
|
||||
icon: person
|
||||
|
||||
readingTime: false
|
||||
license: false
|
||||
toc: false
|
||||
---
|
||||
Hi, I'm Radu, and this is my personal blog.
|
||||
|
||||
I'm a Mechanical Engineer by training, and a Software Developer by (current)
|
||||
trade.
|
||||
|
||||
This blog is a place where I document things I’ve built, explored, or
|
||||
learned — whether it’s through code, a side project, or just a good book or film.
|
||||
It’s part journal, part playground, and sometimes just a place to organize my
|
||||
thoughts.
|
||||
|
||||
The quality, quantity and length of posts will
|
||||
|
||||
### Data Privacy Policy
|
||||
|
||||
I don’t really expect this blog to get much traffic… or any, really. But since
|
||||
it’s a publicly accessible page—and given the limited resources I can allocate
|
||||
to it—I like to keep an eye on general activity.
|
||||
|
||||
I don’t need in-depth tracking or detailed analytics, so commercial tracking
|
||||
solutions aren’t a good fit here.
|
||||
|
||||
Instead, this site uses a self-hosted instance of
|
||||
[Umami](https://github.com/umami-software/umami) for basic analytics. All data
|
||||
is anonymized, stored locally, and never shared with third parties.
|
11
content/page/archives/index.md
Normal file
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
title: "Archives"
|
||||
date: 2022-03-06
|
||||
layout: "archives"
|
||||
slug: "archives"
|
||||
menu:
|
||||
main:
|
||||
weight: 2
|
||||
params:
|
||||
icon: archives
|
||||
---
|
38
content/page/links/index.md
Normal file
|
@ -0,0 +1,38 @@
|
|||
---
|
||||
title: Links
|
||||
links:
|
||||
- title: GitHub
|
||||
description: GitHub is the world's largest software development platform.
|
||||
website: https://github.com
|
||||
image: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png
|
||||
- title: TypeScript
|
||||
description: TypeScript is a typed superset of JavaScript that compiles to plain JavaScript.
|
||||
website: https://www.typescriptlang.org
|
||||
image: ts-logo-128.jpg
|
||||
menu:
|
||||
main:
|
||||
weight: 4
|
||||
params:
|
||||
icon: link
|
||||
|
||||
draft: true
|
||||
comments: false
|
||||
---
|
||||
|
||||
To use this feature, add `links` section to frontmatter.
|
||||
|
||||
This page's frontmatter:
|
||||
|
||||
```yaml
|
||||
links:
|
||||
- title: GitHub
|
||||
description: GitHub is the world's largest software development platform.
|
||||
website: https://github.com
|
||||
image: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png
|
||||
- title: TypeScript
|
||||
description: TypeScript is a typed superset of JavaScript that compiles to plain JavaScript.
|
||||
website: https://www.typescriptlang.org
|
||||
image: ts-logo-128.jpg
|
||||
```
|
||||
|
||||
`image` field accepts both local and external images.
|
13
content/page/search/index.md
Normal file
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
title: "Search"
|
||||
slug: "search"
|
||||
layout: "search"
|
||||
outputs:
|
||||
- html
|
||||
- json
|
||||
menu:
|
||||
main:
|
||||
weight: 3
|
||||
params:
|
||||
icon: search
|
||||
---
|
72
content/post/2025-04-07-hello-friend/index.md
Normal file
|
@ -0,0 +1,72 @@
|
|||
---
|
||||
title: Hello, Friend
|
||||
description: So I've decided to have a blog
|
||||
slug: hello-friend
|
||||
date: 2025-04-07 14:30:00+0200
|
||||
categories:
|
||||
- Technology
|
||||
- Projects
|
||||
tags:
|
||||
- homelab
|
||||
- self-hosting
|
||||
- docker-compose
|
||||
weight: 1
|
||||
draft: true
|
||||
---
|
||||
|
||||
## Introduction
|
||||
This is -- technically -- not my first time hosting a blog, but it *is* the first
|
||||
time this decade.
|
||||
|
||||
First time I've tried hosting a blog was in 2009, the year I got my domain. The
|
||||
domain came with an introductory offer of free web-hosting for a year. So I
|
||||
figured out just enough MySql and FTP to yeet a WordPress installation on
|
||||
there, and make it run. As I remember it, I got as far as installing a custom
|
||||
theme I really liked, and writing at most three posts, all of them in the first
|
||||
month. Then the blog just stayed up until my hosting expired, without any
|
||||
further updates.
|
||||
|
||||
Second time I tried a blog was a bit later, after I got into self-hosting. The
|
||||
internet archive says it's 2018 [[1]], so it must be true. That time I
|
||||
never ended up actually posting anything, since I was mainly just interested in
|
||||
deploying the site.
|
||||
|
||||
Which brings me to the present, and the third time I'm trying to set up a
|
||||
blog. This time, the marginal cost of me setting a blog is insignificant, since
|
||||
I'm already self-hosting plenty of services for my own use. This does not mean
|
||||
that I'm going to be more active than before, but the blog will probably stay
|
||||
up for more than a few months.
|
||||
|
||||
## Why a blog?
|
||||
|
||||
|
||||
|
||||
- Accountability for projects, whatever they might be
|
||||
- Sense of finality for projects
|
||||
- Reference older stuff
|
||||
- It's about the journey, not the destination
|
||||
- Random stuff that's longer form than a mastodon post
|
||||
|
||||
### Yes, but why a **blog**?
|
||||
A blog feels right for grouping, filtering, organization, content size limit, etc...
|
||||
|
||||
## How a blog
|
||||
Jekyll, Hugo, Ghost, and others.
|
||||
|
||||
### Different concepts (CMS vs static websites)
|
||||
### Different static website generators
|
||||
#### Jekyll
|
||||
#### Hugo
|
||||
|
||||
### Infrastructure
|
||||
#### Self hosting
|
||||
#### Git repository and CI
|
||||
|
||||
## Rules... Nay, guidelines
|
||||
- I don't do projects to write a blog post about them, I write a blog post to document a project
|
||||
- No promise of future posts, that NEVER works out (I'll explain why that's the case in a future post)
|
||||
|
||||
## What to expect, and how often can be expected
|
||||
No expectations whatsoever about frequency and/or quality of anything contained wihin this here page.
|
||||
|
||||
[1]: https://web.archive.org/web/20180810023635/http://martin.md/
|
|
@ -1,16 +0,0 @@
|
|||
services:
|
||||
|
||||
blog:
|
||||
image: git.martin.md/radu/blog:latest@sha256:7de45b21e33343b58cf29036c4f0818cb4e2e28325f1cb51ee05884f437c36fc
|
||||
restart: unless-stopped
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.blog.rule=Host(`${DC_BLOG_HOSTNAME:-blog.martin.md}`)"
|
||||
- "traefik.http.routers.blog.entrypoints=websecure"
|
||||
networks:
|
||||
- traefik
|
||||
|
||||
networks:
|
||||
traefik:
|
||||
external: true
|
||||
|
5
go.mod
Normal file
|
@ -0,0 +1,5 @@
|
|||
module github.com/CaiJimmy/hugo-theme-stack-starter
|
||||
|
||||
go 1.17
|
||||
|
||||
require github.com/CaiJimmy/hugo-theme-stack/v3 v3.30.0 // indirect
|
2
go.sum
Normal file
|
@ -0,0 +1,2 @@
|
|||
github.com/CaiJimmy/hugo-theme-stack/v3 v3.30.0 h1:uITC7EKGyfPjyi3C5At++E0Uu1qQXtqiwMV4pd7LkLs=
|
||||
github.com/CaiJimmy/hugo-theme-stack/v3 v3.30.0/go.mod h1:IPmCXiIxlFSLFYS0tOmYP6ySLviyeNVSabyvSuaxD+I=
|
|
@ -1,4 +0,0 @@
|
|||
---
|
||||
layout: home
|
||||
# Index page
|
||||
---
|
BIN
static/favicon.png
Normal file
After Width: | Height: | Size: 639 B |
54
tools/run.sh
|
@ -1,54 +0,0 @@
|
|||
#!/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"
|
|
@ -1,89 +0,0 @@
|
|||
#!/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
|