Skip to content

Python script to handle a website build step for a static website templated with jinja2

License

Notifications You must be signed in to change notification settings

gspivey/jinja2-template-processor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

jinja2-template-processor

Python script to hande a website build step for a static website templated with jinja2. by Gerard Spivey

Goal

A simple tool to aid websites that have grown. After your site grows past 4-5 static pages maintaining it may become cumbersome. At this point using a static site generator such as jekyll may be problematic or have limitations based on your initial implementation.

This tool looks to aid in bringing website template capabilities to in production sites. This script can easily be used along with a continous integration (CI) server or manually ran before site publication.

Install dependencies:

pip install jinja2

Ensure you have the correct directory structure

Directory Structure:
Script expects to be run from basedir
/basedir
    /templates
        .templateignore
        base.html
        index.html
        template_processor.py
    /.public

Ignore files in the templates directory that will not create a html file

Ignored files in .templateignore:
Add any file in templates directory that will not produce a final html file
Ex:
    .templateignore
     base.html
     template_processor.py

About

Python script to handle a website build step for a static website templated with jinja2

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages