- Click the
Use this template
button and select where you would like to copy this repo to. - Next, open the
svelte.config.js
file in your new repo using GitHub editor and change the following lineto the name of your repository, e.g.,base: '/viewpoint';
my-repo
base: '/my-repo';
- Open the
src/lib/vars/constants.js
file in your new repo using GitHub editor and change the following lines:export const siteTitle = 'viewpoint'; export const siteDescription = 'embeddable iiif viewers with svelte-kit'; export const sampleManifests = [ 'https://purl.stanford.edu/wr796rv9498/iiif/manifest', 'https://gallica.bnf.fr/iiif/ark:/12148/btv1b90266728/manifest.json', 'https://iiif.bodleian.ox.ac.uk/iiif/manifest/e32a277e-91e2-4a6d-8ba6-cc4bad230410.json', 'https://jsonstorage.net/api/items/1a6e2d6e-fa90-4d44-95a5-35bb6c011aa2', 'https://www.e-codices.unifr.ch/metadata/iiif/bc-s-0007/manifest.json', 'https://www.e-codices.unifr.ch/metadata/iiif/bc-s-0058/manifest.json', 'https://www.e-codices.unifr.ch/metadata/iiif/snm-AG002760/manifest.json', 'https://www.e-codices.unifr.ch/metadata/iiif/hmtg-T09393/manifest.json' ];
- Go to your repo's homepage and navigate to
Settings
>Pages
(on the left panel). UnderSource
selectBranch gh-pages
and clickSave
.
Note: If
gh-pages
doesn't show up as an option, make sure you haveActions
enabled and that your firstgh-deploy.yml
action ran successfully in your Actions panel. This action creates the built site in thegh-pages
branch.
- Node Version Manager (NVM)
- Git
- Clone the repo
git clone [email protected]:middlicomp/viewpoint-template.git && cd viewpoint-template
- Install project node version (specified in
.nvmrc
)nvm install
- Install npm packages
npm install
- Run the dev server
npm run dev
- Open in browser at http://localhost:3000/viewpoint-template/
- Quit the server with
Ctrl-c
. - Auto-format code
npm run format
- Lint code
npm run lint