Skip to content

DarwinOnLine/DarwinOnLine.github.io

Repository files navigation

Darwin On Line - Personal Blog

A multilingual static blog powered by Quarkdown and GitHub Pages.

Languages

  • French (/fr) — default
  • English (/en)
  • Auto-detection based on browser language

Project Structure

/
├── index.html              # Main HTML shell
├── 404.html                # 404 fallback (same Quarkdown init)
├── init.js                 # Quarkdown configuration & custom renderHome
├── styles.css              # Site-specific styles (imports Quarkdown theme)
├── build-og.js             # OG meta pages generator
├── build-rss.js            # RSS feed generator
├── server.py               # Custom dev server with 404 support
├── hooks/
│   └── pre-commit          # Git hook (builds OG pages & RSS feeds)
├── home-en.md              # English home page
├── home-fr.md              # French home page
├── src/                    # Quarkdown engine (copied from Quarkdown repo)
├── themes/
│   └── default.css         # Quarkdown default theme
├── posts/
│   ├── en/
│   │   ├── index.json      # English articles index
│   │   └── *.md            # English articles
│   └── fr/
│       ├── index.json      # French articles index
│       └── *.md            # French articles
└── assets/
    └── images/

Adding a New Article

1. Create the Markdown file

  • English: posts/en/my-new-article.md
  • French: posts/fr/mon-nouvel-article.md

2. Add to index

Edit posts/{lang}/index.json:

{
  "slug": "my-new-article",
  "title": "My New Article",
  "date": "2026-02-04",
  "description": "Short description",
  "tags": ["Tech"],
  "i18nSlugs": { "fr": "mon-nouvel-article" }
}

The i18nSlugs field maps each translated language to its corresponding slug.

Local Development

Recommended: Have Node.js installed.

# Start the dev server (default: port 8080)
npx http-server

# Or specify a custom port
npx http-server -p 3000

Alternative (Python): If you can't or don't want to install Node.js:

# Start the dev server (default: port 8000)
python3 server.py

# Or specify a custom port
python3 server.py 3000

Git Hooks

Hooks are stored in hooks/ and need to be enabled after cloning:

git config core.hooksPath hooks

The pre-commit hook automatically rebuilds OG pages and RSS feeds before each commit.

OG Meta Pages

OG pages are rebuilt automatically on each commit via a pre-commit hook.

To rebuild manually:

node build-og.js

RSS Feeds

RSS feeds are generated for each language:

  • French: /fr/feed.xml
  • English: /en/feed.xml

RSS feeds are rebuilt automatically on each commit via the pre-commit hook.

To rebuild manually:

node build-rss.js

Analytics

Analytics are handled by Quarkdown's built-in provider-agnostic module. Page views are tracked automatically on every SPA route change.

Currently configured with Umami in init.js:

analytics: {
    provider: 'umami',
    websiteId: 'c9b3d661-b931-412b-a358-cf555b2239ce',
},

Switching Provider

Replace the analytics object in init.js. Examples:

// Plausible
analytics: { provider: 'plausible', domain: 'darwinonline.github.io' },

// Fathom
analytics: { provider: 'fathom', siteId: 'YOUR_SITE_ID' },

// Google Analytics 4
analytics: { provider: 'gtag', measurementId: 'G-XXXXXXXXXX' },

// Custom
analytics: { provider: 'custom', trackPageView: (url) => { /* ... */ } },

See the Quarkdown documentation for full details on supported providers.

Customization

Theme

Override CSS custom properties in styles.css:

:root {
  --qd-accent: #ff3333;
  --qd-bg: #111;
  --qd-heading: #fff;
}

See themes/default.css for all available variables.

Translations

Edit the translations object in init.js.

Site-specific styles

styles.css imports the Quarkdown theme and adds site-specific styles (home header, avatar, social links).

Deployment

  1. Push to main
  2. GitHub Pages serves from main / root
  3. Live at https://darwinonline.github.io

About

Personal page — powered by https://github.com/DarwinOnLine/quarkdown.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors