Skip to content

john-cd/cheatsheets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cheatsheets

John's Cheatsheets

John's Main Website

Repo structure

This website is generated using MkDocs and Material for MkDocs.

The source Markdown files are found in the docs folder. The resulting HTML / JS is found in site. There is also a drafts folder for Markdown files that are not ready for publication.

.devcontainer contains the Dev Container file and associated Docker Compose and Dockerfile setup. github/workflows contains the GitHub Action continuous deployment workflow.

Contributing

Install

If you use Visual Studio Code, install the Dev Container extension. Otherwise, consider the Dev Container CLI. Dev Container allows you to edit and test the web site within a Docker container.

Alternatively, install the required tools on your development machine directly, including Python, []

python -m pip install mkdocs --user
python -m pip install mkdocs-material --user

Basic MkDocs Commands

  • mkdocs new [dir-name] - Create a new project.
  • mkdocs serve - Start the live-reloading docs server.
  • mkdocs build - Build the documentation site.
  • mkdocs help - Print the help message.

Within a Dev Container, you may need to use mkdocs serve --dev-addr 0.0.0.00:8000.

Docker Compose

To test the Docker Compose setup, try

docker compose -f .devcontainer/compose.yaml -f .devcontainer/compose.override.yaml up --build
docker compose down

and

docker compose -f .devcontainer/compose.yaml -f .devcontainer/compose-ci.yaml up --build
docker compose down

You may also build the image directly, e.g.: docker build --file .devcontainer/Dockerfile --target dev --tag johncd/cheatsheets:latest . To push an image to your registry, use docker push myregistry.com/myapp.

Consult Docker's getting started docs for more detail on building and pushing.