{"repo":"metonym/sveltekit-gh-pages","free":true,"listed":false,"github":"https://github.com/metonym/sveltekit-gh-pages","clone":"git clone https://github.com/metonym/sveltekit-gh-pages.git","description":"Minimal SvelteKit set-up made deployable to GitHub Pages.","language":"JavaScript","stars":112,"topics":["github-pages","gh-pages","svelte","sveltekit","svelte-kit"],"license":null,"category":"saas-starters-boilerplates","readme_excerpt":"sveltekit-gh-pages Minimal static SvelteKit set-up made deployable to GitHub Pages. 1) Use the static adapter Install the SvelteKit static adapter to prerender the app. package.json svelte.config.js Ensure your top-level +layout.js exports prerender = true . Note that for SvelteKit version 2, trailingSlash should be set to \"always\" so that the app does not redirect the URL to /about . 2) Modify paths.base in the config kit.paths.base should be your repo URL subpath (see the Vite docs). In the example below, replace /sveltekit-gh-pages with your repository name. Note: You will also need to prepend relative paths with the SvelteKit base path so that your app can build successfully for production. 3) Add a .nojekyll file to the /static folder The last step is to add an empty .nojekyll file to the static folder to bypass Jekyll on GitHub Pages. SvelteKit will copy static assets to the final build folder. package.json The deploy script The deploy script instructs gh-pages to do the following: - -d build : Publish the build folder - -t : Include dotfiles (e.g., .nojekyll ) --- Quick start Use degit to quickly scaffold a new project from this repository: Deploying to GitHub Pages First, build the app by running npm run build . Then, run npm run deploy to deploy the app to GitHub Pages.","default_branch":null,"files":null,"tree":[],"storefront":"/r/metonym","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/metonym/sveltekit-gh-pages/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}