Skip to content

thec6rpse/thec6rpse.github.io

Repository files navigation

~/c6rpse

A multilingual personal blog built with Hugo using the Hextra theme. Content in Portuguese (PT), English (EN), Spanish (ES), and Italian (IT). Deployed to GitHub Pages.

Tech Stack

Tool Version
Hugo (extended) 0.154.4
Hextra 0.12.1
Ruby 3.x
CI/CD GitHub Actions
Hosting GitHub Pages

Development

Prerequisites

  • Hugo (extended version with SCSS/Sass support)
  • Go (for Hugo modules)
  • Ruby (for index generation scripts)

Quick Start

git clone https://github.com/thec6rpse/thec6rpse.github.io.git
cd thec6rpse.github.io

# Install Hugo module dependencies
hugo mod tidy

# Start dev server with drafts
./scripts/dev.sh server
# Or manually: hugo server -D

# Production build
./scripts/dev.sh build
# Or manually: hugo --gc --minify

# Regenerate homepage indexes
./scripts/dev.sh generate-index

Preview at http://localhost:1313. The -D flag includes draft content.

Content Structure

content/
├── _index.md         # PT homepage (auto-generated)
├── _index.en.md      # EN homepage (auto-generated)
├── _index.es.md      # ES homepage (auto-generated)
├── _index.it.md      # IT homepage (auto-generated)
├── YYYY/             # Year directories
│   └── MM/
│       └── DD/
│           └── slug/
│               ├── index.md        # Post content (PT — Hugo leaf bundle)
│               ├── index.en.md     # English variant
│               ├── index.es.md     # Spanish variant
│               └── index.it.md     # Italian variant
├── terms/            # Glossary (shared across languages)
├── lf/               # Logical fallacies reference
└── archives/         # Archive listing

Posts are Hugo leaf bundles organized by date. Language variants live alongside the PT version as index.{lang}.md in the same leaf bundle. Each post gets an aliases frontmatter entry for backward compatibility with old URLs.

Adding Content

Create a new post as a Hugo leaf bundle:

mkdir -p content/$(date +%Y/%m/%d)/my-post-slug

Then create content/YYYY/MM/DD/my-post-slug/index.md with TOML frontmatter:

+++
title = 'My Post Title'
date = '2026-05-12'
draft = true
description = 'Brief description'
tags = ['tag1', 'tag2']
categories = ['category']
+++

To add translations, create index.en.md, index.es.md, index.it.md alongside index.md in the same leaf bundle directory.

Post Checklist

  • Frontmatter complete (title, date, draft, categories, tags)
  • Content written
  • Images added to static/images/[slug]/ if needed
  • Set draft = false when ready to publish
  • Run ./scripts/dev.sh generate-index to update homepages

Configuration

All site settings in hugo.yaml:

  • Navigation: Menu items in menu.main
  • Comments: Giscus (GitHub Discussions)
  • Languages: PT, EN, ES, IT — all share contentDir: content
  • Author: Name, email, social links in params.author
  • Bitcoin tips: params.bitcoin.onchain, params.bitcoin.lightning

Scripts

Script Purpose
scripts/dev.sh Dev server, build, and index generation
scripts/generate_index.rb Auto-generates _index.md files for all languages
scripts/migrate_to_date_dirs.rb Migration tool (flat .md → date-based leaf bundles)
scripts/move_lang_to_shared.rb Migration tool (separate → shared contentDir)

CI/CD

GitHub Actions builds and deploys to GitHub Pages on every push to master. Manual trigger via workflow_dispatch also available.

Build: hugo --gc --minify (Hugo 0.154.4, Go 1.26.1, Dart Sass 1.97.2, Node.js 24.12.0)

References

Contact

License

CC BY-NC-SA 4.0

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

CC BY-NC-SA 4.0


© 2025-2026 c6rpse

About

Everything you are not interested to read you have in this blog.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors