A Python SSG for building websites and web applications from Markdown files.
Downtown is a lightweight static site generator (SSG) written in Python that allows you to create websites from Markdown files. It provides a simple way to convert your Markdown content into HTML, with support for custom templates, CSS, and JavaScript. The framework is designed to be easy to use and highly configurable, making it suitable for a variety of web development projects.
A Static Site Generator (SSG) is a tool that generates a full static HTML website based on raw data and a set of templates. Unlike dynamic websites that generate pages on-the-fly using server-side code, SSGs pre-build the entire site, resulting in faster load times and improved security. SSGs are particularly popular for blogs, documentation sites, and portfolios. Some well-known SSGs include Jekyll, Hugo, and Gatsby with each having its own unique features and use cases respectively.
- Convert Markdown files to HTML.
- Easy configuration through a simple
Sitefile/.SiteJSONC file. - Use Javascript and CSS for enhanced interactivity and styling.
- Customizable HTML templates for consistent site layout.
- Supports additional configuration files for specific pages.
- Simple command-line interface for building the site.
You can install Downtown by cloning the repository, installing dependencies using pip:
git clone https://github.com/sirruserror/downtown.git
cd downtown
pip install -r requirements.txt- Edit the
Sitefilein the config directory to customize your site settings. - Place your Markdown files in the
build/markdirectory. - Optional: Create additional
.Siteconfiguration files in thebuild/configsdirectory for specific pages. - Optional: Add a README for your site in the
builddirectory. - Optional: Edit the template HTML file in the
src/templatedirectory to change the basic layout of your site. - Optional: Add any custom Javascript or CSS files in the build directory respectively and add them to your Sitefile/.Site file/s.
- Run the main script to generate your website: For POSIX systems:
bash cmd/build.shFor Windows systems:
cmd\build.bat- The generated HTML files alongside the copied optional CSS or JS files will be available in the
build/outdirectory.
Contributions are welcome! Please fork the repository and submit a pull request with your changes.
This project is licensed under the BSD-3-Clause License. See the LICENSE file for details. Free for use and modification. Attribution is appreciated but not required. No warranty is provided.