From 01ee05f956f6d4e86b15bc765d0a4d0653c4fcfe Mon Sep 17 00:00:00 2001 From: Murilo Cunha Date: Fri, 7 Jul 2023 10:57:17 +0200 Subject: [PATCH] add info on base paths --- .github/workflows/publish.yaml | 2 +- README.md | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 593fb10..ffb1f54 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -3,7 +3,7 @@ on: push: branches: [main] env: - BASE: slidev-addon-asciinema + BASE: /slidev-addon-asciinema jobs: publish: runs-on: ubuntu-latest diff --git a/README.md b/README.md index 52995b4..b7bb870 100644 --- a/README.md +++ b/README.md @@ -106,6 +106,21 @@ All the[ `asciinema-player`'s options](https://github.com/asciinema/asciinema-pl ``` +### Base paths + +If you are building your slides for [static hosting](https://sli.dev/guide/hosting.html#static-hosting) and you are using a different [base path](https://sli.dev/guide/hosting.html#base-path) (i.e.: you're using GitHub Pages). The component should work as expected, but remember to include the base path in your `vite.config.js` file. + +```sh +slidev build --base /your-base-path +``` + +```js +export default { + base: '/your-base-path', +}; + +``` + ## Known issues There are a couple of issues already identified