sveltekit-blog

Latest SvelteKit v.2 blog - can create page or blog with Markdown or Jodit(wysiwyg editor) - Created pages and blogs are in header and they are server-side rendered for SEO and client-side for interaction

MIT License

Stars
12
Committers
1

Blog made with SvelteKit

Svelte blog which using Markdown, FE Svelte - SvelteKit, BE Express + SQLite

Set .env in main directory and in /server

  • adminEmail - email which can add/edit/remove pages and blogs

  • disqusSrc - optional to have comments from disqus

  • cookieSecret, cookieName, TOKEN_KEY - random string

  • works with Node.js v.18+

npm run build cd server npm run dev Server and Client run on the same port - it should check if the build exist and if yes, it will include SSR Sveltekit if (fs.existsSync('../build/handler.js')) { const {handler} = await import('../build/handler.js'); app.use(handler); }

  • Use jsonwebtoken for the Authorization

  • Use express-session for the session management in Express

  • Use language switch with svelte-i18n

  • Pages and Blogs creation with marked

    test - privatelibrary.eu

    With Docker

    • build docker: docker build -t sveltekit-blog:0.5.1 . (docker build --platform linux/amd64 -t sveltekit-blog:0.5.1 .)
    • from dockerhub: docker pull pararel/sveltekit-blog:0.5.1
    • docker run -it -d -v $PWD/server/database:/usr/src/app/server/database --env-file $PWD/.env --network=host sveltekit-blog:0.5.1