shift-org / shift-docs

Shift2Bikes: website and calendar for shift and pedalpalooza
https://shift2bikes.org
Other
22 stars 17 forks source link

figure out + implement + document hugo best practices #636

Closed fool closed 1 month ago

fool commented 8 months ago

Check and configure all the necessary things about hugo:

  1. if the version in the container is sufficient to our needs or if we want newer
  2. let's get it running without any errors from the command line
  3. maybe run it on container start, and then we can restart container whenever we deploy prod to get both new code and new frontend content?
  4. document any requirements so future local devs will be aware of how it is supposed to work and be used
ionous commented 8 months ago

one possible route would be to use npm run to manage the hugo version and its execution. in my "tooling" branch i have it setup for "build" but we could do similar for run.... something along the lines of

{
   "devDependencies": {
    "hugo-installer": "^4.0.1",
    ....
  },
  "scripts": {
    "postinstall": "hugo-installer --version 0.84.4",
    "run": "npm run build-hugo && npm run ./app/app.js",
    "build-hugo": "exec-bin bin/hugo/hugo -s site -d ./site/public",
    ....
  }
}
carrythebanner commented 8 months ago

See also #587 and #595