This Svelte template provides a starting point for building web applications using the Svelte framework. It is designed with built-in compatibility for deploying your application to GitHub Pages.
Make sure you have the following installed on your system:
To use this template, follow these steps:
Clone or download the repository to your local machine.
Set the remote URL to your own repository like this:
git remote set-url origin <your-repository-url>
Open a terminal and navigate to the project directory.
Install the project dependencies by running the following command:
npm install
Start the development server with the following command:
npm run dev
Begin developing your Svelte application by modifying the files in the src
directory.
To build your application for production, and deploy it to GitHub Pages, follow these steps:
dist
directory, and create (or update) a "gh-pages" branch containing all the dist
files. This will also automatically enable GitHub Pages for your site, and set the location to the "gh-pages" branch so you don't have to worry about that.npm run deploy
// https://vitejs.dev/config/ export default defineConfig({ base: "/svelte-github-pages-template/", // name of your github site plugins: [svelte()] })
It is very important that you switch out "svelte-github-pages-template", with ***YOUR*** repository name (do not delete the "//", it has to be there)
# Customization
Feel free to modify this template to suit your specific needs. You can add additional packages, configure routing, customize the build process, or extend the functionality as required.
# Resources
* [Svelte Documentation](https://svelte.dev/docs/introduction)
* [GitHub Pages Documentation](https://docs.github.com/en/pages)
# Important Notes
This is **NOT** SvelteKit, and the original project was made by running `npm init vite` and selecting the `svelte` option.
# License
This template is open source and available under the [MIT License](https://opensource.org/license/mit/). Feel free to use, modify, and distribute it as needed.