diff --git a/.gitignore b/.gitignore index 6817efec..1bd27ec0 100644 --- a/.gitignore +++ b/.gitignore @@ -133,3 +133,6 @@ typings/ # End of https://www.gitignore.io/api/node,hugo,intellij content/tutorials/kit-assembly.files + +# Don't commit hugo resource cache +resources/ diff --git a/config.yml b/config.yml index 220d1a81..aa51eaa7 100644 --- a/config.yml +++ b/config.yml @@ -39,3 +39,5 @@ outputs: - json buildFuture: true + +assetDir: static/ diff --git a/content/kit/motor-board.md b/content/kit/motor-board/index.md similarity index 97% rename from content/kit/motor-board.md rename to content/kit/motor-board/index.md index 95720cfe..d1da3695 100644 --- a/content/kit/motor-board.md +++ b/content/kit/motor-board/index.md @@ -34,7 +34,7 @@ The case measures 70x84x20mm. Don’t forget that the cables will stick out. ## Designs You can access the schematics and source code of the firmware on the motor board in the following places. You do not need this information to use the board but it may be of interest to some people. -- [Full Schematics](/docs/motor-schematic.pdf) +- [Full Schematics]({{% page_resource_link "motor-schematic.pdf" %}}) - [Firmware Source](https://github.com/sourcebots/motor-v4-fw) - [Hardware Source](https://github.com/sourcebots/motor-v4-hw) diff --git a/static/docs/motor-schematic.pdf b/content/kit/motor-board/motor-schematic.pdf similarity index 100% rename from static/docs/motor-schematic.pdf rename to content/kit/motor-board/motor-schematic.pdf diff --git a/content/kit/power-board.md b/content/kit/power-board/index.md similarity index 98% rename from content/kit/power-board.md rename to content/kit/power-board/index.md index 584d8e46..903e8a57 100644 --- a/content/kit/power-board.md +++ b/content/kit/power-board/index.md @@ -69,6 +69,6 @@ The case measures 83x99x24mm. Don’t forget that the cables will stick out. ## Designs You can access the schematics and source code of the firmware for the power board in the following places. You do not need this information to use the board but it may be of interest to some people. -- [Full Schematics](/docs/power-schematic.pdf) +- [Full Schematics]({{% page_resource_link "power-schematic.pdf" %}}) - [Firmware Source](https://github.com/sourcebots/power-v4-fw) - [Hardware Source](https://github.com/sourcebots/power-v4-hw) diff --git a/static/docs/power-schematic.pdf b/content/kit/power-board/power-schematic.pdf similarity index 100% rename from static/docs/power-schematic.pdf rename to content/kit/power-board/power-schematic.pdf diff --git a/content/rules/_index.md b/content/rules/_index.md index 75bef3d7..765a09d6 100644 --- a/content/rules/_index.md +++ b/content/rules/_index.md @@ -5,4 +5,4 @@ weight: 1 You can find the rules for Smallpeice 2021 competition here!: -# [Download the rules!](/rules.pdf) +# [Download the rules!]({{% page_resource_link "rules.pdf" %}}) \ No newline at end of file diff --git a/static/rules.pdf b/content/rules/rules.pdf similarity index 100% rename from static/rules.pdf rename to content/rules/rules.pdf diff --git a/layouts/partials/custom-header.html b/layouts/partials/custom-header.html index c37a1bb8..3cac5669 100644 --- a/layouts/partials/custom-header.html +++ b/layouts/partials/custom-header.html @@ -1 +1,2 @@ - +{{ $style := resources.Get "css/style.css" | resources.Minify | resources.Fingerprint }} + diff --git a/layouts/partials/logo.html b/layouts/partials/logo.html index 59b50605..fe1f3efc 100644 --- a/layouts/partials/logo.html +++ b/layouts/partials/logo.html @@ -1,3 +1,3 @@ diff --git a/layouts/shortcodes/page_resource_link.html b/layouts/shortcodes/page_resource_link.html new file mode 100644 index 00000000..2a615f56 --- /dev/null +++ b/layouts/shortcodes/page_resource_link.html @@ -0,0 +1,3 @@ +{{ $resource_name := .Get 0 }} + +{{ (.Page.Resources.GetMatch $resource_name).RelPermalink }} diff --git a/static/img/api/coordinate-spaces.svg b/static/img/api/coordinate-spaces.svg deleted file mode 100644 index 13420ab2..00000000 --- a/static/img/api/coordinate-spaces.svg +++ /dev/null @@ -1,262 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - z - y - - - - - z - x - View from above - View from left side - - rot_x - - rot_y - -