Skip to content

A Python static site generator that converts Markdown files into HTML pages, using templates for styling and outputting them to /public. Includes a local server for previewing.

License

Notifications You must be signed in to change notification settings

predrag-milanovic/static-site-generator-py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

static-site-generator-py

About

This project is a lightweight Python static site generator (SSG) that transforms Markdown files into a deployable website. It processes content from /content, injects it into templates, and outputs optimized HTML to /public. Static assets are copied over to ensure the site is fully functional and ready for preview with a simple local server.

To serve the contents of the public directory change directories to the public directory and use Python's built-in HTTP server:

cd public                       
python3 -m http.server 8888 &   

The & detaches the process to the background. Run fg to brig it back, then Ctrl+C.

Features

  • Converts Markdown content into HTML pages.
  • Uses a customizable HTML template for consistent styling.
  • Automatically copies static assets (CSS, images, etc.).
  • Outputs ready-to-serve files into the /public directory.
  • Supports local preview via Python’s built-in HTTP server.

References

A quick reference for all the HTML and Markdown syntax you'll need for a project like this:

To get really good at using regex, use regexr for interactive regex testing. It breaks down each part of the pattern and explains what it does.

About

A Python static site generator that converts Markdown files into HTML pages, using templates for styling and outputting them to /public. Includes a local server for previewing.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages