Skip to content

XanderXAJ/static-site-helpers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Static Site Helpers

Utilities for helping maintain static sites.

Usage

# Migrates dates from the file name to the post's frontmatter
./migrate_post_date.py <post_files>

Development

This project uses python3.

This project uses pipenv to isolate its environment. Install it with:

python3 -m pip install --user pipenv

Then install the project's dependencies:

pipenv install

This project uses unittest for testing. To run the tests:

pipenv run python -m unittest

Use pipenv run to run commands inside the virtualenv from outside the virtualenv. Use pipenv shell to get a shell inside the virtualenv.

Writing tests

The tests use Python's built-in unittest module. Add new files prefixed with test_ to the tests directory. Mirror the structure of the code.

Running Tests

From the root of the repository, run:

# Outside the virtualenv
pipenv run python -m unittest
# Inside the virtualenv
python -m unittest

To run a specific module, specify it after the command:

# Outside the virtualenv
pipenv run python -m unittest tests/lib/test_post.py
# Inside the virtualenv
python -m unittest tests/lib/test_post.py

Refer to the unittest docs or use the --help option to get further help.

About

Helper utilities for static site generators

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages