Atomic-Sveltekit-Template
March 25, 2024 ยท View on GitHub
- Simple boilerplate / template for a blog, portfolio, sales page, documentation page, knowledge base
- Built with
@tomic/svelte+sveltekit. - Content can be easily managed using AtomicServer CMS, open source alternative to Notion.
Features
- ๐ Fast: both static pages and dynamic pages are incredibly fast.
- ๐ Full-text search: fuzzy search and various operators, often <3ms responses.
- ๐ Breadcrumbs: hierarchical content, editable navigation bar menu items.
- ๐ Synchronization using websockets: build collaborative, real-time apps.
- ๐ SEO-friendly: with social previews, sitemap.
- ๐ง Custom data models: create your own classes and forms. All verified and sharable using Atomic Schema.
- ๐ File management: support for files / attachments.
- ๐ป Deploy using Netlify: fast, cheap (often free) and very easy to use.
Example sites
Launching a website and managing content
- Create a new drive on Atomic Server.
- Create a new
Argu Site. This serves as an entrypoint. - Make sure the site is publicly available: context menu, share, public, save.
- Modify the
siteConfigs.tsfile, set the link to thesiteResourceusing the URL of theArgu Sitecreated above. - You might need to restart the local front-end
pnpm dev
- Create a new
- Managing content
- Press
cmd+eorctrl+eto open the editor for an article.
- Press
Dev info
Developing
(replace pnpm with bun if you like speed)
pnpm i
pnpm run dev
Building static pages
pnpm build
Deploy using Netlify
- Create a free account on netlify
- Install netlify cli
pnpm install netlify-cli -g - Authenticate
netlify login - Run locally, test
netlify dev - Create site
netlify unlink && netlify sites:create - Deploy
netlify deploy --build -s <site-name>
Deploy using Cloudflare
- Create account on Cloudflare
- install wrangler v3
npm install wrangler -gorpnpm install wrangler -g - run
wrangler login - add or uncommend cloudflare adapter
import adapter from '@sveltejs/adapter-cloudflare';in svelte.config.js - configure adapter:
adapter: adapter({
// See below for an explanation of these options
routes: {
include: ['/*'],
exclude: ['<all>']
}
}),
- build locally
pnpm run build - run locally
wrangler pages dev .svelte-kit/cloudflare - deploy
wrangler pages publish