A lightweight Flask template for building a news-style website from Markdown articles.
This project is designed for quick publishing workflows:
- Write article content in Markdown
- Add metadata in YAML front matter
- Render everything into a styled, article-first website
It includes example articles so you can clone, run, and start customizing immediately.
- Flask-based server with simple routing
- Markdown article rendering
- YAML front matter parsing for metadata
- Homepage feed with featured and sidebar sections
- Category filtering page
- Individual article page
- RTL-ready layout and Hebrew sample content
- Python
- Flask
- python-frontmatter
- Markdown (python-markdown)
- HTML + CSS templates (Jinja2)
.
|-- app.py
|-- articles/
| |-- food-review.md
| |-- lebanon-blunder.md
| |-- rabin-obituary.md
| `-- trump-iran.md
|-- static/
| |-- css/
| | `-- style.css
| `-- images/
`-- templates/
|-- article.html
`-- index.html
git clone https://github.com/<your-username>/haaretz_project.git
cd haaretz_projectWindows (PowerShell):
python -m venv .venv
.\.venv\Scripts\Activate.ps1macOS / Linux:
python3 -m venv .venv
source .venv/bin/activatepip install flask python-frontmatter markdownpython app.pyOpen:
http://127.0.0.1:5000
Each article is a Markdown file in the articles/ folder.
Article metadata is defined in YAML front matter.
titleauthorcategorydate
main_imagemain_caption
---
title: "My Headline"
author: "Your Name"
category: "News"
date: "2026-04-17"
main_image: "https://example.com/image.jpg"
main_caption: "Photo description"
---
This is the article body in Markdown.
You can use **bold**, lists, links, and other Markdown features./- Homepage with all articles/category/<name>- Category view/article/<slug>- Full article page
The slug is derived from the filename.
Example: articles/food-review.md -> /article/food-review
- Keep date format consistent for reliable sorting (recommended:
YYYY-MM-DD). - Categories are read directly from front matter.
- Templates are in
templates/, and styling is instatic/css/style.css.
- Replace the sample Markdown files with your own content
- Adjust colors, typography, and layout in CSS
- Update navigation category links in templates
- Add favicon, logo assets, and analytics as needed
This project is licensed under the MIT License.
See LICENSE for details.