Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions content/blog/first-blog-post-using-netlify-cms.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
+++
title = "First Blog Post using Netlify CMS"
date = 2018-10-27T03:49:50.077Z
publishdate = 2018-10-27T03:49:50.078Z
thumbnail = "/img/blog/bot-ca-rot-la-mot-san-pham-da-cong-dung.jpg"
tags = ["blog-post", "netlify-cms"]
+++
I've long been a big fan of gohugo static site generator. However, everytime I tried to introduce the workflow of editing and creating a new blog post for a non-tech colleague, it's always a pain in the ass.

Therefore, I'm so happy that I found Netlify CMS, probably one of the best CMS for static site out there. I could set this up and running in my local under 1 hour and I'm already writing my very first blog post on Netlify CMS admin interface without touch my Webstorm IDE!

No more weird looks from my co-workers ever again!

P/S: I'm gonna insert an image just to illustrate how easy it is to use for media files as well!

![uploaded using netlify cms - dalafarm](/img/blog/Ba-bau-nen-an-gi-de-con-thong-minh(3).png)

{{< youtube fb3TKFxpfU4 >}}
26 changes: 26 additions & 0 deletions static/admin/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
backend:
name: github
repo: LeeU1911/dalafarm # path to github repo

display_url: http://localhost:1313
publish_mode: editorial_workflow
media_folder: "static/img/blog" #Media files for blogging
public_folder: "/img/blog" #src attribute for uploaded media files will begin with /img/blog

collections:
- name: "blog"
label: "Blog"
format: toml-frontmatter
folder: "content/blog"
create: true
slug: "{{slug}}"
filter:
field: language
value: vi
fields:
- {label: "Title", name: "title", widget: "string"}
- {label: "Date", name: "date", widget: "datetime"}
- {label: "Publish Date", name: "publishdate", widget: "datetime"}
- {label: "Thumbnail", name: "thumbnail", widget: "image"}
- {label: "Tags", name: "tags", widget: "list"}
- {label: "Body", name: "body", widget: "markdown"}
13 changes: 13 additions & 0 deletions static/admin/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Content Manager</title>
<script src="https://identity.netlify.com/v1/netlify-identity-widget.js"></script>
</head>
<body>
<!-- Include the script that builds the page and powers Netlify CMS -->
<script src="https://unpkg.com/netlify-cms@^2.0.0/dist/netlify-cms.js"></script>
</body>
</html>