-
Notifications
You must be signed in to change notification settings - Fork 3
Migrate some content to page resources #109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
4f9eaca
7d3ce68
f2bf148
633a512
0e1691c
e32bfd2
d0932b3
b778c30
5a1b5ef
c6769b0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,3 +38,7 @@ outputs: | |
- json | ||
|
||
buildFuture: true | ||
|
||
imaging: | ||
resampleFilter: Lanczos | ||
quality: 100 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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. | ||
|
||
 | ||
|
||
{{% resource_img src="coordinate-spaces.svg" alt="A diagram showing the coordinate spaces" %}} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 %}} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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) | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 %}} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 %}} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
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" }}"/> |
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> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Curiosity: what does There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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