-
Notifications
You must be signed in to change notification settings - Fork 154
How to write a blog
The KubeEdge website is generated by using Hugo framework and deployed using Netlify.
The website is designed using the Academic Theme.
Follow the how to contribute guide for steps on forking the repository.
Now lets get started.
hugo new --kind post blog/my-article-name
Then edit the newly created file content/blog/my-article-name.md with your full title and content.
Alternatively you can create a folder in the content/blog folder with the slug of the post as the name of the folder. You can have an index.md file inside this folder. To display a featured image in content pages, simply drag an image named featured.* (e.g. featured.jpg or featured.png) into your page’s folder.
# page or post bundle
content/blog/my-article-name/
# the file name can be index.md. The post title will be picked up from the **title** field in the front matter
content/blog/my-article-name/index.md
# Featured images can be placed like this. Fore more details refer the Note Section below.
content/blog/my-article-name/featured.jpg
Hugo will automatically generate summaries of posts that appear on the homepage. If you are dissatisfied with an automated summary, you can either limit the summary length by appropriately placing in the article body, or completely override the automated summary by adding a summary parameter to the +++ preamble such that:
summary = "Summary of my post."
To disable commenting for a specific post, you can add disable_comments = true to the post +++ preamble. Or to disable commenting for all posts, you can either set disqusShortname = "" or disable_comments = true in config.toml.
Content can be written using Markdown, LaTeX math, and Hugo Shortcodes. Additionally, HTML may be used for advanced formatting. An overview of the most common formatting options can be found here: Writing Content
Some tips on managing different types on content and page contents can be found here: Managing Content
The front matter for a blog post looks something like this:
The title
, date
and lastmod
fields are mandatory and should contain appropriate values.
Don't add the Hugo declarative draft = true
to the page front matter, because that will prevent the auto-deployment of the content preview.
+++
title = "KubeEdge v0.2 is out now"
date = 2019-03-05
lastmod = 2019-03-05
draft = false
# Authors. Comma separated list, e.g. `["Bob Smith", "David Jones"]`.
authors = ["KubeEdge"]
# Tags and categories
# For example, use `tags = []` for no tags, or the form `tags = ["A Tag", "Another Tag"]` for one or more tags.
tags = ["KubeEdge", "kubeedge", "edge computing", "kubernetes edge computing", "K8S edge orchestration", "edge computing platform", "release v0.2", "v0.2"]
categories = ["General", "Announcements"]
summary = "KubeEdge is a Kubernetes Native Edge Computing Framework. KubeEdge v0.2 is released today."
# Featured image
# To use, add an image named `featured.jpg/png` to your page's folder.
[image]
# Caption (optional)
caption = "KubeEdge v0.2 is out. Try it now!"
# Focal point (optional)
# Options: Smart, Center, TopLeft, Top, TopRight, Left, Right, BottomLeft, Bottom, BottomRight
focal_point = "Center"
+++
Once you have written the blog post in your fork raise a PR to the KubeEdge Website repository.
One of the maintainers will review and publish the story based on the publish schedule.