-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🧪 labsite: Re-write relative URLs (#450)
Re-write img and link URLs in labsite-gen tool from correct location of relative to source .md file to correct relative location to lab/index.html file when deployed. This change improves readability and generation of Markdown lab source files. In a preparatory step mark `lab/**/*.htmlf` as generated for linguist and PR reviews. This merges the following commits: * lab: Mark .htmlf as generated in linguist * labsite: Re-write img URLs * labsite: Re-write links to other labs * cli: Add --svg-width and --svg-height flags .gitattributes | 3 +- Makefile | 2 +- build-tools/labsite-gen/main.go | 45 +++++++++++++++++++ docs/usage.md | 27 ++++++----- frontend/docs/usage.html | 25 ++++++----- frontend/docs/usage.htmlf | 27 ++++++----- frontend/lab/samples/forloops/bubble.md | 2 +- frontend/lab/samples/forloops/forcircles.md | 10 ++--- .../lab/samples/forloops/img/10-lines.svg | 2 + .../lab/samples/forloops/img/20-lines.svg | 2 + frontend/lab/samples/forloops/img/4-lines.svg | 2 + .../lab/samples/forloops/img/50-lines.svg | 2 + frontend/lab/samples/forloops/img/bubble.svg | 2 + .../lab/samples/forloops/img/circle-cat.svg | 2 + .../samples/forloops/img/circle-outline.svg | 2 + .../lab/samples/forloops/img/circle-rand.svg | 2 + .../lab/samples/forloops/img/circle-wig.svg | 2 + frontend/lab/samples/forloops/img/lines.svg | 2 + frontend/lab/samples/forloops/img/zebra.svg | 2 + frontend/lab/samples/forloops/lines-show.md | 2 +- frontend/lab/samples/forloops/lines.md | 10 ++--- frontend/lab/samples/forloops/zebra.md | 2 +- frontend/lab/samples/ifs/alpha.md | 6 +-- frontend/lab/samples/ifs/bounce-show.md | 2 +- frontend/lab/samples/ifs/bounce.md | 13 +++--- frontend/lab/samples/ifs/img/2-squares.svg | 2 + frontend/lab/samples/ifs/img/apartments.svg | 2 + frontend/lab/samples/ifs/img/bauhaus.svg | 2 + frontend/lab/samples/ifs/img/blue-pattern.svg | 2 + frontend/lab/samples/ifs/img/bwrect.svg | 2 + frontend/lab/samples/ifs/img/grass.svg | 2 + frontend/lab/samples/ifs/img/house.svg | 2 + frontend/lab/samples/ifs/img/mondrian.svg | 2 + frontend/lab/samples/ifs/img/monster.svg | 2 + frontend/lab/samples/ifs/img/perspective.svg | 2 + frontend/lab/samples/ifs/img/pulse-step-1.svg | 2 + frontend/lab/samples/ifs/img/pulse-step-2.svg | 2 + .../ifs/img/quarter-circle-triangle.svg | 2 + .../lab/samples/ifs/img/quarter-circle.svg | 2 + frontend/lab/samples/ifs/img/randrect.svg | 2 + .../ifs/img/red-dot-two-squares-alpha.svg | 2 + .../samples/ifs/img/red-dot-two-squares.svg | 2 + .../lab/samples/ifs/img/red-green-squares.svg | 2 + frontend/lab/samples/ifs/img/stripes.svg | 2 + frontend/lab/samples/ifs/img/target-blue.svg | 2 + frontend/lab/samples/ifs/img/tetris.svg | 2 + frontend/lab/samples/ifs/img/warm-squares.svg | 2 + frontend/lab/samples/ifs/img/window.svg | 2 + frontend/lab/samples/ifs/pi.md | 4 +- frontend/lab/samples/ifs/pulse.md | 10 ++--- frontend/lab/samples/ifs/rectangles.md | 28 ++++++------ frontend/lab/samples/intro/circles.md | 16 +++---- frontend/lab/samples/intro/coords.md | 2 +- .../lab/samples/intro/img/circles-anika.svg | 2 + .../samples/intro/img/circles-bottom-left.svg | 2 + .../intro/img/circles-bottom-right.svg | 2 + .../lab/samples/intro/img/circles-camh.svg | 2 + .../lab/samples/intro/img/circles-kathi.svg | 2 + .../lab/samples/intro/img/circles-mali.svg | 2 + .../samples/intro/img/circles-top-left.svg | 2 + .../samples/intro/img/circles-top-right.svg | 2 + .../lab/samples/intro/img/coords-30-60.svg | 2 + .../lab/samples/intro/img/move-6circles.svg | 2 + frontend/lab/samples/intro/move.md | 10 ++--- frontend/lab/samples/loops/gradient-show.md | 4 +- .../lab/samples/loops/img/gradient-line.svg | 2 + .../lab/samples/loops/img/gradient-thick.svg | 2 + frontend/lab/samples/loops/img/target.svg | 2 + frontend/lab/samples/loops/target-show.md | 2 +- frontend/lab/samples/loops/target.md | 2 +- learn/pkg/learn/renderer.go | 2 +- main.go | 4 +- pkg/cli/runtime.go | 4 +- pkg/cli/runtime_test.go | 2 +- 74 files changed, 255 insertions(+), 105 deletions(-) Pull-request: #450
- Loading branch information
Showing
74 changed files
with
255 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
/frontend/**/*.htmlf linguist-generated=true | ||
/frontend/docs/**/*.html linguist-generated=true | ||
/frontend/docs/**/*.htmlf linguist-generated=true | ||
/frontend/learn/**/*.html linguist-generated=true | ||
/frontend/learn/**/*.htmlf linguist-generated=true | ||
/frontend/learn/index.html linguist-generated=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.