Skip to content

HmonWutt/Static_website_generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Static website generator

This is python programme that parse markdown files and convert them into a single/multiple page static website. The webpage uses my favourite catppuccin palette. A Generated webpage looks something like this link that can be deployed to github pages.

Nested formatting like this _**hello**_ does not work right now. You can use the formatting below.

The following are block-level formatting meaning they require a blank line before and after so that the parser recognises it as a separate block.

Headings

# Page heading

## Sub heading

Ordered List

1. First item
2. Second item
3. Third item

Unordered list

- First item
- Second item
- Third item

Code snippets

```
print("Hello world")
```

Quote with no author

> quote (no author)

Quote with author name

> quote
> author

The following in-line formatting can be used within a block and do not require blank lines. They work within a paragraph or a sentence.

**bold**
_italic_
[link](url)
![alt-text](imagefile)

1. You can place image files in static/image

2. Create content directory by running this command in the terminal.

mdkir content

3. Create markdown files in content directory. Feel free to create subfolders. The directory should look like this. You can name the subdirectories anything you like but markdown files must be named index.md

content/
├── subdir/
│   └── index.md
└── subdir1/
    └── index.md

4. Create docs directory. This is where generated html files will go.

mkdir docs

5. Run this command from the root of the project to test the webpage locally. The webpage is available at: http://localhost:8888

./main.sh / static content docs

6. Run this command from the root of the project to build the project.

./build.sh "https://<username>.github.io/<repo name>/" static content docs

7. Click settings on your repo.

Screenshot.

8. Create github pages by following this guideGithub pages documentation.

9. Choose main branch and use the folder dropdown menu to select docs for your publishing source.

~~That's all for now. Hope you gave it a try. Thanks for stopping by ❤️

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors