Skip to content
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

Fix: broken links of Example programs #2003

Merged
merged 2 commits into from
Apr 14, 2023
Merged
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
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -201,11 +201,6 @@ jobs:
version: "13.0"
cached: "${{ steps.cache-llvm.outputs.cache-hit }}"

- name: Build the mdbook
run: |
cd main
make docs

- name: Make runtime
run: |
cd main
Expand All @@ -226,6 +221,11 @@ jobs:
make html-examples
make demo-example

- name: Build the mdbook
run: |
cd main
make docs

- name: Setup Pages
uses: actions/configure-pages@v3
if: >-
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ _build.*/
*.agdai
.agda/
agda2hs/
docs/examples/html/.*
docs/*.html
*.cabal
/src/Juvix/Utils/OldParser.hs
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ PREFIX="$(PWD)/.stack-work/prefix"
UNAME := $(shell uname)

EXAMPLEMILESTONE=examples/milestone
EXAMPLEHTMLOUTPUT=_docs/examples/html
EXAMPLEHTMLOUTPUT=docs/examples/html
EXAMPLES= Collatz/Collatz.juvix \
Fibonacci/Fibonacci.juvix \
Hanoi/Hanoi.juvix \
Expand Down Expand Up @@ -79,7 +79,7 @@ demo-example:
# -- MDBook

.PHONY: docs
docs:
docs: html-examples
@cp $(METAFILES) docs/
@cp -r assets/ docs/
@mdbook build
Expand Down
12 changes: 6 additions & 6 deletions docs/examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ The following links are clickable versions of their corresponding Juvix
programs. The HTML output can be generated by running
`juvix html --recursive FileName.juvix`.

- [HelloWorld.juvix](https://docs.juvix.org/examples/html/HelloWorld/HelloWorld.html)
- [Fibonacci.juvix](https://docs.juvix.org/examples/html/Fibonacci/Fibonacci.html)
- [Hanoi.juvix](https://docs.juvix.org/examples/html/Hanoi/Hanoi.html)
- [PascalsTriangle.juvix](https://docs.juvix.org/examples/html/PascalsTriangle/PascalsTriangle.html)
- [Collatz.juvix](https://docs.juvix.org/examples/html/Collatz/Collatz.html)
- [TicTacToe.juvix](https://docs.juvix.org/examples/html/TicTacToe/CLI/CLI.TicTacToe.html)
- [HelloWorld.juvix](./html/examples/html/HelloWorld/HelloWorld.html)
- [Fibonacci.juvix](./html/examples/html/Fibonacci/Fibonacci.html)
- [Hanoi.juvix](./html/examples/html/Hanoi/Hanoi.html)
- [PascalsTriangle.juvix](./html/examples/html/PascalsTriangle/PascalsTriangle.html)
- [Collatz.juvix](./html/examples/html/Collatz/Collatz.html)
- [TicTacToe.juvix](./html/TicTacToe/CLI/CLI.TicTacToe.html)

The [Juvix standard library](https://anoma.github.io/juvix-stdlib/)
contains common functions that can be used in Juvix programs.
12 changes: 6 additions & 6 deletions docs/reference/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ The following links are clickable versions of their corresponding Juvix
programs. The HTML output is generated by running
`juvix html --recursive FileName.juvix`.

- [HelloWorld.juvix](https://docs.juvix.org/examples/html/HelloWorld/HelloWorld.html)
- [Fibonacci.juvix](https://docs.juvix.org/examples/html/Fibonacci/Fibonacci.html)
- [Hanoi.juvix](https://docs.juvix.org/examples/html/Hanoi/Hanoi.html)
- [PascalsTriangle.juvix](https://docs.juvix.org/examples/html/PascalsTriangle/PascalsTriangle.html)
- [Collatz.juvix](https://docs.juvix.org/examples/html/Collatz/Collatz.html)
- [TicTacToe.juvix](https://docs.juvix.org/examples/html/TicTacToe/CLI/CLI.TicTacToe.html)
- [HelloWorld.juvix](./../examples/html/HelloWorld/HelloWorld.html)
- [Fibonacci.juvix](./../examples/html/Fibonacci/Fibonacci.html)
- [Hanoi.juvix](./../examples/html/Hanoi/Hanoi.html)
- [PascalsTriangle.juvix](./../examples/html/PascalsTriangle/PascalsTriangle.html)
- [Collatz.juvix](./../examples/html/Collatz/Collatz.html)
- [TicTacToe.juvix](./../examples/html/TicTacToe/CLI/CLI.TicTacToe.html)
4 changes: 2 additions & 2 deletions docs/tutorials/learn.md
Original file line number Diff line number Diff line change
Expand Up @@ -743,8 +743,8 @@ case tail' lst
You have now learnt the very basics of Juvix. To consolidate your
understanding of Juvix and functional programming, try doing some of
the following exercises. To learn how to write more complex Juvix
programs, see the [advanced
tutorial](https://docs.juvix.org/examples/html/Tutorial/Tutorial.html)
programs, see the
[advanced tutorial](./../examples/html/Tutorial/Tutorial.html)
and the [Juvix program examples](../reference/examples.md).

1. Define a function `prime : Nat -> Nat` which checks if a given
Expand Down