Wowchemy Cheat Sheet
Publish date: May 21, 2023
Last updated: May 29, 2024
Last updated: May 29, 2024
Metadata
show_date: true
private: true # hide page in search results
Page resources (attachments and links)
links:
- icon_pack: fab
icon: twitter
name: Follow
url: "https://twitter.com/Twitter"
- icon_pack: fab
icon: medium
name: Originally published on Medium
url: "https://medium.com"
Private pages
_build:
render: always
list: never
Add in cms:
- label: Build
name: _build
required: false
widget: object
fields:
- label: "Render"
name: "render"
widget: "hidden"
default: "always"
- label: "List"
name: "list"
widget: "select"
options: ["always", "never"]
default: "always"
Un-publish authors
To un-publish author pages from your site, create a content/authors/\_index.md
file with the following:
_build:
render: never
cascade:
_build:
render: never
list: always
Highlight authors in author lists
highlight_name: true
Widget archive
content:
archive:
enable: true
text: See all blog posts
link: post/
Add author notes for affiliations and contributions
authors:
- "Someone"
- "Someone else"
author_notes:
- "Equal contribution"
- "Equal contribution"
Add common searches
Create data/search_queries.yaml
file.
- data
- search_queries.yaml
Add these.
- query: Blog
link: /blog/
- query: Blog post 1
link: /blog-post-1/
- query: Blog post 9
link: /blog-post-1/
- query: Projects
link: /projects/
- query: About
link: /about/
- query: Contact
link: /contact/
Change CMS title
Create layouts/wowchemycms/single.html
file.
- layouts
- wowchemycms
- single.html
- wowchemycms
Add these.
<!doctype html>
<html lang="en-us">
<head>
<meta content="noindex" name="robots">
<meta charset="utf-8">
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<title>Your Title</title>
<!-- Include Netlify Identity for authentication. -->
<script src="https://identity.netlify.com/v1/netlify-identity-widget.js"></script>
</head>
<body>
<!-- Include the latest Netlify CMS v2.x.x script that builds the admin panel. -->
<script src="https://cdn.jsdelivr.net/npm/netlify-cms@2/dist/netlify-cms.min.js"></script>
</body>
</html>
Add menu icon
social:
- icon: twitter
icon_pack: fab
link: https://twitter.com/user
label: Follow Me
display:
header: true
Add menu button
Make sure your navbar is aligned left.
header:
navbar:
enable: true
align: l
In menu.toml add these lines.
main_right:
- name: <span class="btn btn-primary d-none d-lg-inline-block mb-3 mb-md-0" style="padding:.3rem"><span>Get Started</span></span>
url: "/get-started/"
weight: 10
Add announcement bar feature
In front matter:
announcement:
text: 'Hello World!️'
Filter cms_exclude in cms
Add cms_exclude
filter in collection:
collections:
- name: 'blog'
label: 'Blog'
folder: 'content/post'
path: '{{slug}}/index'
filter: {field: "cms_exclude"}
To exclude a page, add this param in front matter:
cms_exclude: true
Change cms timezone
- {label: "Publish Date", name: "date", widget: "datetime", picker_utc: false, format: "YYYY-MM-DDTHH:mm:ss+08:00"}
Add shortcodes in cms
Add the following after the script tag of Decap cms in body element.
<script src="https://sharadcodes.github.io/hugo-shortcodes-netlify-cms/dist/hugo_shortcodes_netlify_cms.js"></script>