Skip to content

adamhu714/static-site-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Static Site Generator From Markdown

A static website generator that serves a website given a folder of markdown files.

Contents

Usage

Prerequisites

Ensure you have Python 3 installed on your system.

Static and Content Directories Preparation.

You need to prepare a "static" folder and a "content" folder in your project root directory.

The 'static' folder should contain any files that will be referenced by your webpages. Ensure index.css file should be at the top of the directory, since all generated pages will reference this as their stylesheet. The file structure of the static folder will be reflected in the public folder that contains the generated pages.

The 'content' folder should contain all markdown files you would like to generate into webpages. The file structure of the 'content' folder will be reflected in the public folder that contains the generated pages.

For more guidance on the 'static' and 'content' folders, please follow the example at Example Demonstration and study the contents of the example files.

Running the Application

From the project's root directory, use the main.sh shell script to run the application and start your web server on port 8888:

./main.sh

Back To Top

Example Demonstration

Copy the example 'static' and 'content' directories to your workspace by running the following command in your project's root directory.

cp -r ./example/* .

Generate your webpages to a 'public' folder and serve them to port 8888 using the main.sh shell script. To do so run the following command in your project's root directory.

./main.sh

You can now view the generated pages at the following URLs:

http://localhost:8888
http://localhost:8888/majesty/

To stop the script, press Ctrl + C in the terminal you ran it in.

Back To Top

Unit Tests

For effortless devlopment and maintenance, this project uses a high coverage of unit tests throughout development:

image

Back To Top

About

Markdown to Website Tool

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages