Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vittxr/portfolio
https://github.com/vittxr/portfolio
i18n svelte tailwindcss typescript
Last synced: about 2 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/vittxr/portfolio
- Owner: vittxr
- Created: 2021-10-15T00:56:59.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-11-05T16:16:13.000Z (12 days ago)
- Last Synced: 2024-11-05T17:27:12.814Z (12 days ago)
- Topics: i18n, svelte, tailwindcss, typescript
- Language: Svelte
- Homepage: https://vitvitvit.com.br
- Size: 58.3 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Deploy
Sources:
- https://kit.svelte.dev/docs/adapter-netlify
I host the website on Netlify. The deployment process is straightforward: when the GitHub repository updates, Netlify automatically deploys the new version of the repository.
Since I use SSR, I need to set up the Svelte-Netlify adapter. By default, Svelte uses the Svelte-Auto adapter, but we need to change it to the Netlify adapter to make it work on their server. The following are the required steps to set up this adapter:
1. Add the `"@sveltejs/adapter-netlify": "^4.1.0",` dependency in `package.json`.
2. Update the adapter in the `svelte.config.js` file:```js
import adapter from '@sveltejs/adapter-netlify';/** @type {import('@sveltejs/kit').Config} */
const config = {
kit: {
adapter: adapter({
edge: false,
split: false,
}),
},
};export default config;
```# Troubleshoot:
## 1. svelte-i18n
error: `Cannot format a message without first setting the initial locale`
this occurs if you access the i18n content before it loads. You need to ensure that the content is loaded before accessing it:
```html
vschirmer / {$isLoading ? 'loading' : $_('utils.nav.home')}
```