Skip to content

TetraTheta/TetraLogSource

Repository files navigation

TetraLogSource

This is the source of my blog, TetraLog, built with Hugo and the HB Card Theme.

Requirements

  • Hugo >= 0.127.0
  • Node.js >= 20
  • Python >= 3.12

I use mixed environment(Node.js + Python) because I want to focus more on writing article, rather than spending time solving various problems in Javascript.

After cloning, run these commands in order:

# Setup Node dependencies
npm ci
# Setup Python dependencies
python -m venv .venv
# Activate Python virtual environment (Windows)
# for Linux: source .venv/bin/activate
call .venv\Scripts\activate.bat
# Install Python dependencies in virtual environment
pip install -r requirements.txt

NPM script will run Python.

Note

This is a note for myself for later use.

Theme Overrides

For various reasons, I've overridden the Hugo and HB Card Themes' files. Here is a list of files that I've overridden and their original sources.

layouts
├─partials
│ ├─base
│ │   title.html
│ └─hb/modules
│   ├─breadcrumb
│   │   index.html
│   └─footer
│       powered-by.html
└─shortcodes
  │ collapse.html
  │ imgref.html
  │ spoiler.htmltwitter.htmltwitter_simple.htmlyoutube.html
  └─gallery
      image.html
      video.html

Image Icon Format

I can use a PNG image as a menu icon instead of an SVG image, but it must follow these rules:

  1. Image Size: 16x16 (32x32 for sub-menu)
  2. Image Round Radius:
  • 256x256: 55px
  • 400x400: 85px
  • 512x512: 109px

How to make a rounded square image in Photoshop

  1. Put a rounded rectangle layer below the image layer
  2. Right-click the image layer and set it as a clipping mask

No Git LFS

I tried Git LFS to see if it is really efficient. Now I despise Git LFS.

  • Very slow push speed
    I tried to push repository to other machine in private network. Its uploading speed was ~250KB/s which is very unbearable. I couldn't find any way to speed up the uploading speed.