langurmonkey/website-source
1
2
Fork
You've already forked website-source
1
My personal website. https://tonisagrista.com
  • JavaScript 73.7%
  • HTML 19%
  • CSS 6.2%
  • GLSL 0.5%
  • Handlebars 0.3%
  • Other 0.2%
Find a file
2026年06月19日 12:38:34 +02:00
archetypes feat: remove theme, add everything to main site. 2025年01月31日 08:45:08 +01:00
assets/icons feat: Add cool wisemonkey page. 2026年06月09日 08:56:59 +02:00
content feat: Add uvx installation for wisemonkey. 2026年06月19日 12:38:34 +02:00
data feat: Add cool wisemonkey page. 2026年06月09日 08:56:59 +02:00
gallery-theme fix: gallery theme, now for real. 2022年09月13日 10:02:07 +02:00
layouts feat: Add cool wisemonkey page. 2026年06月09日 08:56:59 +02:00
resources/_gen/assets Trying out themes 2019年02月26日 19:58:22 +01:00
scripts feat: Replace obsolete forkawesome with own SVG font. 2026年06月03日 11:10:33 +02:00
static feat: Add uvx installation for wisemonkey. 2026年06月19日 12:38:34 +02:00
.gitignore feat: Replace obsolete forkawesome with own SVG font. 2026年06月03日 11:10:33 +02:00
.gitmodules Trying out themes 2019年02月26日 19:58:22 +01:00
config.toml feat: Add cool wisemonkey page. 2026年06月09日 08:56:59 +02:00
deploy.sh feat: Replace clien-side search lunr.js with pagefind, which is faster and requires less setup. 2026年01月20日 20:12:14 +01:00
justfile feat: Replace obsolete forkawesome with own SVG font. 2026年06月03日 11:10:33 +02:00
LICENSE Initial commit 2014年03月29日 07:18:55 -07:00
package.json feat: add some shots to gallery, plus new lenses. 2024年01月18日 09:50:47 +01:00
README.md feat: Replace obsolete forkawesome with own SVG font. 2026年06月03日 11:10:33 +02:00
server.sh feat: add hostname to config (finally), remove it from sitemap and rss templates. Add server script for local usage. 2023年02月01日 10:23:39 +01:00
thumbsup-config.json feat: update gallery to run with docker, and add a few pictures. 2025年01月21日 13:52:33 +01:00
thumbsup-run.sh feat: update gallery to run with docker, and add a few pictures. 2025年01月21日 13:52:33 +01:00
updatestats.sh fix: remove jquery from site bundle, as pages that need it already include it specifically. 2024年09月25日 10:45:18 +02:00

tonisagrista.com

My website project, online at tonisagrista.com.

Deployment

The master branch of this repository contains the Hugo sources. These need to be generated into the static website using hugo. To do so, a handy justfile is provided, so you just need to do:

just generate

The site is deployed to a nearlyfreespeech server. To generate and deploy the site, use just deploy. The deploy.sh script deploys the (generated) site to the server via rsync. The deploy-codeberg.sh is the old deploy script, which deployed the site to different branches in Codeberg Pages.

Minify

In order to minify the JS and CSS, you need minify. It can be installed from the AUR.

paru -S minify

If any of the CSS files are modified, the site bundle is auto-generated by the build process, but you can use this specific target:

just minify

Same with the JavaScript files:

cd $WEB/themes/langurmonkey/static/js
uglifyjs darkmode.js jquery.min.js skel.min.js codeblock.js util.js main.js > site-bundle.js

To minify everything at once, do:

just minify

Note that you need to run this script in order for the CSS to be applied, as the website itself only links the minified bundle file!

Choose CSS theme

The minifcation step includes the theme. By default, theme-pink-blue is used. If you want to change it, just pass it as an argument to minify-all.sh:

# The theme is the file name without the .css extension
scripts/minify-all.sh theme-name

In order to generate the static gallery I use thumbsup. To run it, I use the docker method. Make sure that you have docker installed first, and then start the service.

pacman -S docker
systemctl start docker

Then, just run the provided thumbsup-run.sh script. If you get a permission error, you need to add your user to the docker group:

sudo usermod -aG $USER
newgrp docker

Now you can run the script.

# Run directly
./thumbsup-run.sh
# You can also run it with just
just thumbsup

The original photos are hosted in gaiasandbox's ARI page. Since HUGO in Codeberg Pages does not allow any folder called /public within /static, rename it to /assets. The generated index.html file already points to the renamed folder, so no need to replace any strings.

You can then copy the contents of ./output-folder to $WEB/static/photo-gallery/ and commit.

Mathematical formulas

The MathJax JavaScript library is not included by default in the pages. If you need to use Latex-like formulas in a post, you must include the JavaScript file in the post source.

Either do it in the header,

js = ["/js/mathjax3.js"]

or using the script tag in the body,

<!-- Loading MathJax -->
<script type="text/javascript" id="MathJax-script" async src="/js/mathjax3.js"></script>

Icon generation

We generate our own icon font from the SVG icons in /assets/icons. You can get more icons at Iconify. There is a just target that runs the whole thing and puts the output in the required directory. You first need to install svgtofont (see below).

just iconfont

If you need to add new icons, just put them in /assets/icons and re-run the target.

Details

To generate the font, first install svgtofont in the /script directory.

cd script
npm install --save-dev svgtofont

And then run:

npx svgtofont --config svgtofont.config.js --output ./font --sources .icons