diff --git a/.github/workflows/hugo.yml b/.github/workflows/hugo.yml index 2bd97ea..b109f05 100644 --- a/.github/workflows/hugo.yml +++ b/.github/workflows/hugo.yml @@ -47,6 +47,9 @@ jobs: id: pages uses: actions/configure-pages@v5 + - name: Install Node.js dependencies + run: npm ci + - name: Build with Hugo env: HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache diff --git a/.gitignore b/.gitignore index 9724c76..4579f99 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,5 @@ Gemfile.lock # Hugo-generated files /public/ /.hugo_build.lock + +node_modules/ diff --git a/README.md b/README.md index 6ecf60b..44cdb7f 100644 --- a/README.md +++ b/README.md @@ -3,13 +3,13 @@ loot.github.io This repository acts as the main LOOT team repository, and holds all the issues that aren't specific to the code or any one game. In addition to that, it also holds LOOT's static website. -The static website uses [Material Design Lite](https://www.getmdl.io/) components and the [js-yaml](https://github.com/nodeca/js-yaml), [Octokit.js](https://github.com/octokit/rest.js) and [j-toml](https://github.com/LongTengDao/j-toml) libraries, which are provided by Cloudflare and Skypack CDNs. +The website is generated using [Hugo](https://gohugo.io), and uses [Material Design Lite](https://www.getmdl.io/), [js-yaml](https://github.com/nodeca/js-yaml), [j-toml](https://github.com/LongTengDao/j-toml) and [Octokit.js](https://github.com/octokit/rest.js), which are managed using NPM. The easiest way to build it is to: -The website is generated using [Hugo](https://gohugo.io). The easiest way to build it is to: - -1. Download a [prebuilt Hugo binary](https://github.com/gohugoio/hugo/releases/latest). -2. Add the binary to your `PATH`. -3. Run `hugo` from the root of this repository. +1. Download and install [Node.js](https://nodejs.org/en/download). +2. Download a [prebuilt Hugo binary](https://github.com/gohugoio/hugo/releases/latest). +3. Add the binary to your `PATH`. +4. Run `npm ci` from the root of this repository. +5. Run `hugo` from the root of this repository. Hugo will create the generated site in the `public` folder. diff --git a/content/convert-settings/convert.js b/content/convert-settings/convert.js index 4b0f2d8..ce56cf1 100644 --- a/content/convert-settings/convert.js +++ b/content/convert-settings/convert.js @@ -1,6 +1,6 @@ 'use strict'; -import { load } from 'https://cdnjs.cloudflare.com/ajax/libs/js-yaml/4.1.0/js-yaml.mjs'; -import TOML from 'https://cdn.skypack.dev/-/@ltd/j-toml@v1.33.3-g895G5Q2ba82bha6HlB9/dist=es2019,mode=imports/optimized/@ltd/j-toml.js'; +import { load } from 'js-yaml'; +import TOML from '@ltd/j-toml'; function upgradeOldYaml(yaml) { if (yaml['Debug Verbosity'] && !yaml.enableDebugLogging) { diff --git a/content/convert-settings/index.html b/content/convert-settings/index.html index 001c70c..e81030d 100644 --- a/content/convert-settings/index.html +++ b/content/convert-settings/index.html @@ -16,5 +16,3 @@ title: LOOT Settings File Converter
Note that the download link that appears above after converting YAML does not work in Internet Explorer or Edge. Users of those browsers will need to copy the content of the TOML text box into a settings.toml file they create themselves, or use a different browser.