- Install dependencies with
npm install
(orpnpm install
oryarn
) - Start a development server:
npm run dev
This is a portfolio/blog built using SvelteKit. Hosted on Netlify.
Visit: wentallout.io.vn
A website made with SvelteKit is just incredibly fast even compared to other framework-based websites like React/Next/Vue and has great SEO out-of-the-box. You won't need a backend or CMS though, the blog posts are just markdown files you can store on your computer (see routes/blog
).
All imported images are automatically converted to webp
and lazy loaded to optimize performance.
Visitors can also comment on your blogs using GitHub discussion (you might want to customize Comments.svelte
component so that it works on your repo)
- HTML: Semantic and SEO-focused
- CSS: Vanilla CSS with BEM naming scheme
- JS: VanillaJS/Svelte
- Linting optimized for aesthetics: alphabetical style perfectionist.dev
- eslint-plugin-svelte
src/styles
reset.css
custom CSS Reset by joshwcomeauglobal.css
global styles and importing all other css filesspacing.css
spacing formargin
,padding
and the whole page layout in general. Check out utopia.fyi for more information about this spacing system.typography.css
typography-related stuff likefont-size
,line-height
,letter-spacing
,font-weight
color.css
text colors, border colors, background colors (2 color schemes:light
anddark
)animation.css
for anything animate.
page | path |
---|---|
Home | / |
Project | /project |
Blog | /blog |
Resource | /resource |
Contact | /contact |
Slug
- /project/
[slug]
- /blog/
[slug]
⭐ SEO
⭐ Responsive
⭐ PWA: Works OFFLINE
⭐ Dark/Light Mode Toggle Button
⭐ Dynamic Breadcrumb (Breadcrumb.svelte
)
⭐ Font Optimization
- Self-host: Google Web Font Helper
- font-family: Inter. Read more about Inter
- Subset: Subset Variable Font Guide
- Reduce Font CLS (Cumulative Layout Shift): Automatic font matching
⭐ Icons
unplugin-icons
- Icon family: phosphoricons
- Browse phosphor icons
⭐ Images
- Compressed and Converted into
webp
usingvite-imagetools
loading = 'lazy'
⭐ Routing: built-in filesystem-based router
⭐ Page Transition Animation
svelte/transiton
- nprogress
⭐ RSS
⭐ Working Contact Form (need Netlify setup)
⭐ Increased Defense against attacks: bot projectection, SQL injection, Cross-site scripting and more; works better than Web Application Firewall (WAF) Read more
- Use markdown to write blogs mdsvex
- use
categories
(#hashtag) to filter blogs - multiple markdown-related plugins installed:
rehype
andremark
⭐ Blog: Automatic Table of Contents
⭐ Blog: Code Highlight
- Choose a theme: prism-themes then paste into
styles/prism.css
⭐ Blog: Search, Pagination
⭐ Blog: Categories/Tags
⭐ Blog: Prev/Next Button
⭐ Blog: Comment using Giscus
Featured on: portfolioshub.com