Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
command: git submodule sync && git submodule update --init
- run:
name: Install Hugo
command: wget https://github.com/gohugoio/hugo/releases/download/v0.33/hugo_0.33_Linux-64bit.deb -O /tmp/hugo.deb && sudo dpkg -i /tmp/hugo.deb
command: wget https://github.com/gohugoio/hugo/releases/download/v0.36.1/hugo_0.36.1_Linux-64bit.deb -O /tmp/hugo.deb && sudo dpkg -i /tmp/hugo.deb
- restore_cache:
key: node-{{ checksum "package.json" }}
- run:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
URL: http://docs.sourcebots.co.uk

## Requirements
- [Hugo](https://gohugo.io) (>=0.33)
- [Hugo](https://gohugo.io) (>=0.36.1)
- [NodeJS](https://nodejs.org/) (>=6) (required for tests only)

## Style notes
Expand Down
4 changes: 4 additions & 0 deletions config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,7 @@ outputs:
- json

buildFuture: true

imaging:
resampleFilter: Lanczos
quality: 100
6 changes: 0 additions & 6 deletions content/api/vision/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,3 @@ The markers in the list have some useful attributes:
{{% notice tip %}}
A marker's position can be represented using both the [Cartesian](coordinates/#cartesian-coordinates) and [spherical](coordinates/#spherical-coordinates) coordinate systems.
{{% /notice %}}

## Marker PDFs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we removing this? This is a potentially breaking change for people used to coming to this page for these links.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's removed mostly to remove the duplicated content. Perhaps adding a link would've been better? The markers are already a top-level section (theyre in the navbar), so finding the links isn't difficult

You can download PDF files of all markers:

- [Large markers](/docs/large-tags.pdf), Containing Wall and Column markers (250x250mm, should be printed on A3)
- [Small markers](/docs/small-tags.pdf), Containing Token markers (100x100mm, should be printed on A4)
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,5 @@ robot, exactly 1 metre away.
The following diagram shows the orientation of the Cartesian axes relative to
the camera as well as the angles which describe the spherical coordinate space.

![A diagram showing the coordinate spaces](/img/api/coordinate-spaces.svg)

{{% resource_img src="coordinate-spaces.svg" alt="A diagram showing the coordinate spaces" %}}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Original file line number Diff line number Diff line change
Expand Up @@ -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)
- {{% resource_link src="motor-schematic.pdf" %}}Full Schematic{{% /resource_link %}}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

- [Firmware Source](https://github.com/sourcebots/motor-v4-fw)
- [Hardware Source](https://github.com/sourcebots/motor-v4-hw)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,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)
- {{% resource_link src="power-schematic.pdf" %}}Full Schematic{{% /resource_link %}}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

- [Firmware Source](https://github.com/sourcebots/power-v4-fw)
- [Hardware Source](https://github.com/sourcebots/power-v4-hw)
11 changes: 4 additions & 7 deletions content/markers/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@ Our vision system uses the [AprilTag](https://april.eecs.umich.edu/software/apri

Here you can download PDF files of all markers:

| PDF | Marker Size | Paper Size |
|-----------------------------------|-------------|------------|
| [Large markers][large-marker-pdf] | 250x250mm | A3 |
| [Small markers][small-marker-pdf] | 100x100mm | A4 |

[large-marker-pdf]: /docs/large-tags.pdf
[small-marker-pdf]: /docs/small-tags.pdf
| PDF | Marker Size | Paper Size | Contents |
|---------------------------------|-------------|------------|--------------|
| [Large markers](large-tags.pdf) | 250x250mm | A3 | Wall, Column |
| [Small markers](small-tags.pdf) | 100x100mm | A4 | Token |
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion content/rules/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ weight: 1

You can find the rules for SourceBots 2018 below:

# [Download the rules!](/rules.pdf)
# {{% resource_link src="rules.pdf" %}}Download the rules{{% /resource_link %}}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

File renamed without changes.
19 changes: 19 additions & 0 deletions layouts/shortcodes/resource_img.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{ $original := .Page.Resources.GetMatch (.Get "src") }}
{{ $options := .Get "options" }}

{{ .Scratch.Set "image" $original }}

{{ if $options }}
{{ $command := (default "Resize" (.Get "command")) }}
{{ if eq $command "Fit"}}
{{ .Scratch.Set "image" ($original.Fit $options) }}
{{ else if eq $command "Resize"}}
{{ .Scratch.Set "image" ($original.Resize $options) }}
{{ else if eq $command "Fill"}}
{{ .Scratch.Set "image" ($original.Fill $options) }}
{{ end }}
{{ end }}

{{ $image := .Scratch.Get "image" }}

<img src="{{ $image.RelPermalink }}" alt="{{ .Get "alt" }}"/>
2 changes: 2 additions & 0 deletions layouts/shortcodes/resource_link.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{{ $resource := .Page.Resources.GetMatch (.Get "src") }}
<a href="{{ $resource.RelPermalink }}">{{ .Inner }}</a>
6 changes: 3 additions & 3 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
command = "./scripts/build.sh"

[context.production.environment]
HUGO_VERSION = "0.33"
HUGO_VERSION = "0.36.1"
HUGO_ENV = "production"

[context.deploy-preview.environment]
HUGO_VERSION = "0.33"
HUGO_VERSION = "0.36.1"

[context.branch-deploy.environment]
HUGO_VERSION = "0.33"
HUGO_VERSION = "0.36.1"
2 changes: 1 addition & 1 deletion scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ rm -rf public/
rm -rf content/tutorials/kit-assembly.files
cp -r static/img/assembly content/tutorials/kit-assembly.files

hugo -v
hugo -v --gc
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curiosity: what does --gc do?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It removes the build cache of static files before building the site. Resizing images is fairly trivial, and this removes any issues which may come from changes in the resizing

4 changes: 2 additions & 2 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

with pkgs;

# Require hugo >= 0.33.
assert (builtins.compareVersions hugo.version "0.33") >= 0;
# Require hugo >= 0.36.1.
assert (builtins.compareVersions hugo.version "0.36.1") >= 0;

stdenv.mkDerivation {
name = "docs-env";
Expand Down