Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Daily Ledger

A professional news site generated from Markdown. Node.js reads files under news/, converts them to HTML, and writes a matching tree under public/.

Layout

news/                     Markdown sources (nested sections)
  national/
  regional/
  international/
  sports/
  science/
  technology/
public/                   Generated HTML (created by the build)
themes/                   Colour themes (classic, midnight, slate)
site.config.js            Site title, default theme, base URL
src/build.js              Static site generator

Section folders can nest further (for example news/science/space/). The public tree mirrors that structure, with .html instead of .md.

Commands

npm install
npm run build    # convert Markdown → public/
npm start        # build, then serve public/ at http://localhost:3000

Front matter

Each article may begin with YAML. These fields drive titles, social tags, and JSON-LD:

---
title: Parliament advances election transparency bill
description: A one- or two-sentence summary for search and social cards.
author: Priya Raman
date: 2026-08-28
keywords: elections, parliament, transparency
section: National
image: /images/hero.jpg
canonical: https://www.dailyledger.example/national/election-transparency-bill.html
robots: index,follow
---

draft: true excludes a file from the build. Missing description falls back to an excerpt of the body.

Theme

Set the default in site.config.js:

theme: "classic", // or "midnight" or "slate"

Add a new file in themes/ (CSS custom properties only) and it appears in the header theme menu after the next build. Readers can also switch themes in the browser; the choice is stored in localStorage.

Markup

Article pages use <header>, <nav>, <main>, <article>, and <section>. Category indexes are built from the same directory tree as the navigation.

About

A simple news website based on markdown

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages