A simple static site generator in Python
- Python 54.9%
- HTML 29.7%
- CSS 15.4%
| layout | ||
| outputstructure | ||
| sample_site_design | ||
| src | ||
| .gitignore | ||
| article.py | ||
| buildpage.py | ||
| buildsite.py | ||
| config.toml | ||
| page.py | ||
| README.md | ||
| ssg.py | ||
ssg
A static site generator written in Python Instructor - Prof. Doolin Class - CIT 256 - Collab Dev Repository - The VCS for building the Static Site Generator.
SSG Command Examples
ssg create sitename
ssg page newpagename
ssg article newarticletitle
ssg article web~dev~/nodejs.html
ssg build
ssg build draft
ssg help
SSG Usage Steps
Step 1 - Create Website
ssg create mynewsite [template]
Creates the directory structure and starter files for a new SSG site
Step 2 - Customize Template
emacs template.html
(or other preferred editor)
- make changes to template HTML document
Step 3 - Create New Page/Article
ssg page about.html
- Automatically gets saved in ./pages/ directory
- It is NOT a complete HTML document. Just maybe a header and a paragraph.
emacs pages/about.html
- Developer write/builds the page (main content only)
ssg article debian_13.html
- Create a new document in ./articles/
ssg article security/change-google-password.html
- Creates a new document in ./articles/security/
- If sub-directory does not exist, confirm with user to create it
- Again, it is NOT a complete HTML document
Step 4 - Build the Site
ssg build
-
In the ./build/ directory, creates site structure, generates HTML
documents by placing content file data inside template. Also fills in titles, meta data, which CSS file to tlink to based on theme
ssg build draft
- Builds a draft version of the site containing all draft articles/pages
- Perhaps in ./draft/
Objects
Article
- Author
- Title
- Dates (Pub/Creation)
- Content
- Featured Image
Page
Theme
Template
Sub-Directory Index??
Config