From aa014b2109a2ad7ee447d650ee61acbe5d7d0f3a Mon Sep 17 00:00:00 2001 From: Eric Vicenti Date: Wed, 16 Aug 2017 11:52:55 -0700 Subject: [PATCH] Basic blog guide (#59) --- docs/guides-blog.md | 43 +++++++++++++++++++++++++++++++++++++++++++ website/sidebars.json | 1 + 2 files changed, 44 insertions(+) create mode 100644 docs/guides-blog.md diff --git a/docs/guides-blog.md b/docs/guides-blog.md new file mode 100644 index 0000000000..b5dafe3c00 --- /dev/null +++ b/docs/guides-blog.md @@ -0,0 +1,43 @@ +--- +id: blog +title: Adding a Blog +--- + +## Initial Setup + +To setup your site's blog, start by creating a `blog` folder within your repo's `website` directory. + +Then, add a header link to your blog within `siteConfig.js`: + +``` +headerLinks: [ + ... + {href: '/blog', label: 'Blog'}, + ... +] +``` + +## Adding blog posts + +To publish in the blog, create a file within the blog folder with a formatted name of `YYYY-MM-DD-My-Blog-Post-Title.md`. The post date is extracted from the file name. + + +For example, we will create the following file `website/blog/2017-08-18-Introducing-Docusaurus.md`: + +``` +--- +author: Frank Li +authorURL: https://twitter.com/foobarbaz +authorFBID: 503283835 +title: Introducing Docusaurus +--- + +Lorem Ipusm.. +``` + +## Special blog post header options + +- `author` - The text label of the author byline +- `authorURL` - The url that the author name links to +- `authorFBID` - The Facebook ID that is used to extract the profile picture +- `title` - The blog post title \ No newline at end of file diff --git a/website/sidebars.json b/website/sidebars.json index 832522becd..92054bd615 100644 --- a/website/sidebars.json +++ b/website/sidebars.json @@ -7,6 +7,7 @@ ], "Guides": [ "navigation", + "blog", "translation", "search", "versioning"