TomConner / tree105

Home Page:https://troop105treedrive.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tree105

Static site for Pembroke Troop 105 Christmas Tree Drive.

Local Testing

Stack

This is a weird mash of a Hugo static site and a flask server. In 2022, it was just the Hugo piece with some javascript, and in 2023, in implementing Stripe, I made it a flask service and allowed the flask service to serve the static content too. So first, Hugo renders the markdown into HTML, and then Flask can render the HTML and any other templates into HTTP responses. Also and more importantly, Flask implements the API called by the payment and address forms as well as the webhooks that Stripe calls.

Hugo

Depends on Hugo and uses a theme via a git submodule. First time after cloning you may have to

git submodule update --init --recursive

Then to run locally, install Hugo and its prerequisites and then hugo server.

go version
sass --version # or brew install sass/sass/sass
hugo version # or brew install hugo
hugo server

Flask

Start local Hugo and Flask servers:

hugo server &
cd server
python server.py

To stop, Ctrl-C to stop Flask and kill %1 to stop Hugo (assuming it started as job 1).

About

https://troop105treedrive.com/


Languages

Language:JavaScript 34.5%Language:HTML 30.4%Language:Python 26.3%Language:Shell 4.2%Language:CSS 4.1%Language:Dockerfile 0.5%