Well hello there again- site's abit new(?). I really like this new layout haha. The old site is still up here- just it won't be getting any new blog posts.
A few notable changes:
Post images in
/images/post-<number>/
should contain two images:- Images for dark mode must be named
post-<number>-dark
. - And images for light mode must be named
post-<number>-light
.
- Images for dark mode must be named
Latest Post(s) layout in the home page ustilises
flex-grow
for more dynamic look.Posts now have a button for copying the url of the page with ease.
Code blocks will now display the tokyo-night-dark.css theme.
(Soon: Copy button to code blocks will come soon).
Setup
- Clone the repo-
git clone https://github.com/zoclhas/blog.git
- Install the dependencies and run-
Node:
npm install
npm run dev
Yarn:
yarn install
yarn run dev
Make your changes:
- Urls
- Branding
- Links
- Colours
- Themes
Creating posts:
- Add your post files in
/posts/<post-name>.md
. - Copy the frontmatter template from this file's lines 1-10.
markdown-it
doesn't support raw HTML code- :(- For links that are meant to be opened in a new tab, add
{.ext}
after the link. - Check the installed plugins for
markdown-it
in the/pages/post/[slug].js
file. Visit their npm-js or GitHub pages for usage.
- Add your post files in
Push the changes.
Host on Vercel or similar.
Final words
That should be fairly simple. Now before you can publish it- please include attributes to me in the footer by linking zocs.space or the GitHub Repo. If you'd like to suggest any changes or add new features please make a PR.
That's all for this post. Have a great day 💜!