Skip to content

techaibuilder/python_ssg

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Static Site Generator

A static site generator that converts markdown files into a served website.

Watch the video

Features

  • Converts markdown files to HTML
  • Supports nested folder structure for subpages
  • Serves the generated site locally
  • Copies static assets (images, CSS, etc.)
  • Uses customizable HTML template

Prerequisites

  • Python 3.x
  • Required Python packages (installed automatically by the script)

Setup and Usage

  1. Clone the repository:
git clone https://github.com/jradziejewski/python_ssg.git
cd python_ssg
  1. Add your content:

    • Place markdown (.md) files in the content directory
    • Add static assets (images, CSS, JS) to the static directory
    • Customize template.html in root directory to define page layout
    • Create subdirectories for nested pages if desired
    • Example structure:
    content/
    ├── index.md
    ├── about.md
    └── blog/
        ├── post1.md
        └── post2.md
    
  2. Run the generator:

./main.sh
  1. Access your site:
    • Open your browser and navigate to http://localhost:8888
    • Your markdown files will be served as formatted HTML pages

File Structure

python_ssg/
├── content/        # Place your markdown files here
├── static/         # Static assets (images, CSS, JS)
├── template.html   # HTML template for all pages
├── main.sh         # Main script to run the generator
└── src/            # Source code for the generator

Contributing

Submit a pull request

If you'd like to contribute, please fork the repository and open a pull request to the main branch.

About

A static site generator that converts markdown files into a served website.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 94.9%
  • CSS 3.9%
  • Other 1.2%