This project is a simple static site generator that converts markdown files into HTML pages using a specified template. It also copies static files (like CSS and images) to the output directory.
- Converts markdown files to HTML
- Uses a template to generate consistent HTML pages
- Copies static files to the output directory
- Supports nested directories for content
├── content
│ └── index.md
├── public
│ └── (generated HTML files and copied static files)
├── static
│ ├── index.css
│ └── images
│ └── rivendell.png
├── template.html
├── src
│ ├── main.py
│ ├── generatepage.py
│ ├── markdown_blocks.py
│ ├── htmlnode.py
│ ├── copystatic.py
│ └── (other source files)
└── main.sh
- Python 3.x
- markdown library (install using pip install markdown)
- Clone the repo
git clone https://github.com/yourusername/static-site-generator.git
cd static-site-generator
- Install the required packages
pip install markdown
-
Place your markdown content files in the content directory.
-
Customize the template.html file to define the structure of your HTML pages.
-
Add any static files (CSS, images, etc.) to the static directory.
-
Run the main.sh script to generate the site and start a local web server:
./main.sh
-
Open your web browser and navigate to http://localhost:8888 to view the generated site.