In order to use this template, you need to know the basics of SvelteKit + Tailwind CSS. Below is a quick note on how to install this, and where to look for changes and customizations.
# Clone this repository
$ git clone
# Go into the repository
$ cd sveltekit-tailwind-blog-template
# Install dependencies
$ npm install
# Run the app
$ npm start
tailwind.config.cjs
and src/app.css
contain the tailwind stylesheet and the default css settings which can be modified to change the overall look and feel of the site.tailwind.config.cjs
src/app.css
src/lib/config.js
.env.example
Pre-rendering
is ON for all pages by default. You can change that from /src/routes/+layout.svelte
file by changing setting export const prerender = false;
.sr/lib/config.js
- contains most of the site related information which should be modified for a user's need.content
folder.static/img
folder.config.js
file.content/authors
folder. If you only have one user for your blog, you can set multiuser: false
in the config.js
file, and set the admin user into in the same file in the user
section.static/logo.svg
, static/logo.png
, static/favicon.ico
, and static/icon-xxx.png
with your own logo.routes
: read the SvelteKit documentation for all routing information.app.html
and linked from Google Fonts, and set in tailwind's config file. For a better site performance and ranking consider hosting your own fonts.src/lib/fonts
.markdown
is supported in all blog posts and project pages. Markdown configurations are set in mdsvex.config.js
file.rehype
and remark
Plugins can be used to extend the formatting.rehype-external-links
to open all content links in a new tab<youtube id="dQw4w9WgXcQ" title="The Best Cat Video Ever" />
.Follow Netlify's Documentation to deploy your site on Netlify, or Vercel's Documentation to deploy on Vercel Platform
As mentioned before, all content files (Blog Posts, Author Information, and Projects) are saved under the content
folder. These content types can simply be modified / extended / removed, and other content types can be added. For that, you can simply modify / add / remove markdown files in these folders.
Netlify CMS is not required for editing the content, but it would make life much easier. After setting up Netlify CMS, you can simply use yoursite.com/admin
to manage all your content from a simple web UI. Adding Netlify CMS is as easy as adding a couple of static files to your website. You can find these files under static/admin
, and can access the web interface from https://yoursite.com/admin
. You can simply delete this folder if you're not using Netlify CMS.
After deploying your site on Netlify:
Settings
> Identity
Services
section of that page, enable Git Gateway
Settings
> Registration
> Invite Only
Settings
> Identity
> Invite User
Accept the Invite
. It takes you to your site to a broken link. Add "/admin" to the domain and before "#invite_token"You're all set, and can access your site admin from yousite.com/admin
. You can also invite more users and editors from the same page (Settings
> Identity
> Invite User
);
Beside all the open-source packages used for this starter, I used or were inspired by the following:
Geoff Rich's Creative dynamic social card images with Svelte components
and of course, HBO's Silicon Valley