$ git clone [email protected]:farskid/farzadyz.com.git
$ cd eng-blog
$ npm install -g yarn
$ yarn
$ yarn dev
Deploy to a draft URL by running yarn deploy
Deploy to prod by running yarn deploy:prod
Make sure you export the project before deploying
Blog posts are stored inside content/posts.
$ git checkout -b my-blog-post-branch-name
yarn post:create
to create a blog post following the CLI (command-line interface) prompts:$ yarn post:create
$ ^C
$ yarn dev
$ git commit -am "Add new blog post"
$ git push origin my-blog-post-branch-name
Use yarn post:edit
to update an existing blog post’s updatedAt frontmatter field. Follow the CLI prompts to choose an existing blog post from the list.
property | description |
---|---|
title | post title |
description | post description that shows on blog list view |
tags | tags relevant to the blog post |
publishedAt | date the post was first published |
updatedAt | date the post was last updated |
originalURL | original post URL if post has been copied from another platform |
draft | whether the post is published or draft |
$ yarn dev
yarn test:meta
to spawn an instance of localtunnel listening to the same port as the development server:$ yarn test:meta
your url is: https://exampleurl.com
There are a few shortcodes you can use to embed content in markdown.
Use the tweet id for the id
attribute. For example, in https://twitter.com/farskid/status/1461727317429043201
, 1461727317429043201
is the ID.
<Tweet id="1461727317429043201" />
Use the YouTube ID for the id
attribute. For example in https://www.youtube.com/watch?v=y6aGu0N8z9Q
, y6aGu0N8z9Q
is the ID.
<Youtube id="y6aGu0N8z9Q" />