From 506a8a85a41a0541b049086a9da3d21fdb7bf6b3 Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Tue, 19 Jan 2021 22:16:57 +0100 Subject: [PATCH] Merge setup and run into makefile --- README.md | 23 +++-------------------- makefile | 15 +++++++++++++++ 2 files changed, 18 insertions(+), 20 deletions(-) create mode 100644 makefile diff --git a/README.md b/README.md index 8159ca0f..1e907deb 100644 --- a/README.md +++ b/README.md @@ -2,34 +2,17 @@ > https://varia.zone -## Getting Started - -### Clone +## Hackity Hack Hack ``` $ git clone https://git.vvvvvvaria.org/varia/varia.website.git $ cd varia.website -$ git clone https://github.com/getpelican/pelican-plugins/ -$ git clone https://git.vvvvvvaria.org/varia/plugins-custom -``` - -### Install - -``` -$ python3 -m venv .venv -$ source .venv/bin/activate -$ pip install -r requirements.txt -``` - -### Serve - -``` -$ pelican --autoreload +$ make ``` Visit the website at [localhost:8000](http://localhost:8000) -## Tools +## Our Tools The Varia website is made with Pelican, a static site generator written in Python. This means that the website is first generated on a computer (using diff --git a/makefile b/makefile new file mode 100644 index 00000000..3d4492f4 --- /dev/null +++ b/makefile @@ -0,0 +1,15 @@ +default: run + +core-plugins: + @if [ ! -d "pelican-plugins" ]; then git clone https://github.com/getpelican/pelican-plugins; fi + +custom-plugins: + @if [ ! -d "plugins-custom" ]; then git clone https://git.vvvvvvaria.org/varia/plugins-custom; fi + +dependencies: + @if [ ! -d ".venv" ]; then python3 -m venv .venv && .venv/bin/pip install -r requirements.txt; fi + +run: core-plugins custom-plugins dependencies + @.venv/bin/pelican --autoreload + +.PHONY: core-plugins custom-plugins dependencies run