Skip to content

Commit 292e03f

Browse files
authored
Merge pull request #474 from ealmloff/fix-gh-pages-docs
Fix github pages publishing documentation
2 parents 5fc1383 + a0b73bf commit 292e03f

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

docs-src/0.6/src/cookbook/publishing.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,25 @@ Edit your `Dioxus.toml` to point your `out_dir` to the `docs` folder and the `ba
99
```toml
1010
[application]
1111
# ...
12-
out_dir = "docs"
13-
1412
[web.app]
1513
base_path = "your_repo"
1614
```
1715

1816
Then build your app and publish it to Github:
1917

2018
- Make sure GitHub Pages is set up for your repo to publish any static files in the docs directory
21-
- Build your app with:
19+
- Build your app into the `docs` directory with:
20+
```sh
21+
dx bundle --out-dir docs
22+
```
23+
- Move the static content from `docs/public` to `docs`
24+
```sh
25+
mv docs/public/* docs
26+
```
27+
- Make a copy of your `docs/index.html` file and rename the copy to `docs/404.html` so that your app will work with client-side routing:
2228
```sh
23-
dx build --release
29+
cp docs/index.html docs/404.html
2430
```
25-
- Make a copy of your `docs/index.html` file and rename the copy to `docs/404.html` so that your app will work with client-side routing
2631
- Add and commit with git
2732
- Push to GitHub
2833

0 commit comments

Comments
 (0)