Skip to content

Commit b67d676

Browse files
authored
docs: call out required leading slash in base path (#148)
1 parent 0c89704 commit b67d676

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

guide/hosting.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Then you can host it on [GitHub Pages](https://pages.github.com./), [Netlify](htt
1717

1818
### Base Path
1919

20-
To deploy your slides under sub-routes, you will need to pass the `--base` option. For example:
20+
To deploy your slides under sub-routes, you will need to pass the `--base` option. The `--base` path **must begin and end** with a slash `/`; for example:
2121

2222
```bash
2323
$ slidev build --base /talks/my-cool-talk/
@@ -139,13 +139,13 @@ Create `vercel.json` in your project root with the following content.
139139

140140
Then go to your Vercel dashboard and create a new site with the repository.
141141

142-
## GitHub Pages
142+
### GitHub Pages
143143

144144
- [GitHub Pages](https://pages.github.com./)
145145

146146
To deploy your slides on GitHub Pages:
147147
- upload all the files of the project in your repo (i.e. named `name_of_repo`)
148-
- create `.github/workflows/deploy.yml` with following content to deploy your slides to GitHub Pages via GitHub Actions. In this file, replace `<name_of_repo>` with `name_of_repo`.
148+
- create `.github/workflows/deploy.yml` with following content to deploy your slides to GitHub Pages via GitHub Actions. In this file, replace `<name_of_repo>` with `name_of_repo`. Make sure to leave the leading and trailing slashes in place.
149149

150150
```yaml
151151
name: Deploy pages
@@ -183,7 +183,7 @@ jobs:
183183
run: npm i -g @slidev/cli
184184

185185
- name: Build
186-
run: slidev build --base <name_of_repo>
186+
run: slidev build --base /<name_of_repo>/
187187

188188
- uses: actions/configure-pages@v3
189189

0 commit comments

Comments
 (0)