Skip to content

brentvollebregt/nitratine.net

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

This repo is the source for nitratine.net. The files in the gh-pages branch are hosted using GitHub pages. The Python module nitratine can be used to locally host and build the site into the build folder.

Structure

📁 nitratine.net
┣ 📁 .github                 GitHub related files (like workflows)
┣ 📁 .vscode                 vs-code related settings
┣ 📁 nitratine               Main module that runs locally and freezes the site
┃ ┣ 📁 external              Functions that interact outside of the site
┃ ┣ 📁 markdown_extensions   Extensions for the markdown library used
┃ ┣ 📁 static                CSS, JavaScript and image files
┃ ┣ 📁 templates             Jinja templates for pages
┃ ┣ 📁 tools                 Tools that can be called from the modules CLI
┃ ┣ 📜 __main__.py           Module entrypoint to build and develop site
┣ 📁 posts                   Posts (markdown based)
┣ 📁 tests                   Tests associated with the module that runs the site locally
┣ 📜 .env.example            An example of the environment variables required

This diagram contains a subset of all folders and files

Setup

  1. Create a virtual env: python -m venv .venv
  2. Activate the Python venv: .venv/Scripts/activate.bat
  3. Install Python dependencies: python -m pip install -r requirements.txt
  4. Create a .env file: cp .env.example .env
  5. Populate .env:

Usage

Execute python -m nitratine --help to identify the functions that this module can perform and their arguments:

  • run: Run the development site locally
  • build: Build site to static files
  • serve: Serve the locally built site
  • new: Create a new post. Will setup a folder containing a .md file and an empty feature image.
  • stats: Get stats for the latest build

Deployment

Automated deployment is done using GitHub actions. The workflow to build and deploy the site can be found in main.yml.

Testing

Tests can be run by executing python -m unittest discover -s tests in the root of the project.

About

Site files for nitratine.net

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published