Markdown is a lightweight markup language that allows people to write plain text documents in an easy-to-read manner.
Markdown documents are written in .md or .markdown extensions. Documents written in Markdown can be exported to HTML, Word, Png, PDF, Epub, and many other formats.
Markdown also can be used to write e-books, such as Gitbook. Markdown is now widely used by many websites to help write files or to post messages on forums. Examples include GitHub, Reddit, Diaspora, Stack Exchange, OpenStreetMap, and SourceForge, etc,.
Syntax
Below I have provided the basic syntax of Markdown.
Front-matter
The following writing method is only applicable to Butterfly theme, it may not work on other themes and may even report errors.
Page Metadata (En)
Variables
Values
Option
Meaning
Default
title
Chr
Required
Page Title
NA
date
Date
Required
Page creation date
NA
type
Chr
Required
Tags, categories and links pages need to be configured
NA
updated
Date
Optional
Page update date
NA
description
CHr
Optional
Page Description
NA
keywords
Chr
Optional
Page Keywords
NA
comments
T/F
Optional
Show page comments module
T
top_img
Pic
Optional
Page top image
NA
mathjax
T/F
Optional
Show mathjax (only required when setting per_page: False for mathjax)
F
katex
T/F
Optional
Show katex (only required when setting per_page: False for katex)
F
aside
T/F
Optional
Show sidebar
T
aplayer
T/F
Optional
Load aplayer’s js and css on the desired page
NA
highlight_shrink
T/F
Optional
Configure whether the code box is expanded (True/False)
NA
Post Metadata (En)
Variables
Values
Option
Meaning
Default
title
Chr
Required
Option
Post Title
date
Date
Required
Post Creation Date
NA
updated
Date
Optional
Post Update Date
NA
tags
Chr
Optional
Post Tags
NA
categories
Chr
Optional
Post Categories
NA
keywords
Chr
Optional
Post Keywords
NA
description
Chr
Optional
Post Description
NA
top_img
Pic
Optional
Post Top Image
NA
cover
Pic
Optional
Post thumbnail (if not set top_img, the top of the Post page will display thumbnails, can be set to false/image address/leave blank)
NA
comments
T/F
Optional
Show Post comment section
T
toc
T/F
Optional
Show Post TOC(The default is the enable configuration of toc in the settings)
NA
toc_number
T/F
Optional
Show toc_number(Default is the number configuration of toc in the settings)
NA
toc_style_simple
T/F
Optional
Show toc simple mode
NA
copyright
T/F
Optional
Show Post copyright module(The default is the enable configuration of post_copyright in the settings)
NA
copyright_author
T/F
Optional
Post author of the Post copyright module
NA
copyright_author_href
T/F
Optional
Post author links in the Post copyright module
NA
copyright_url
T/F
Optional
Links to Posts in the Post copyright module
NA
copyright_info
T/F
Optional
Copyright notice text for Post copyright module
NA
mathjax
T/F
Optional
Show mathjax (configuration is required when setting per_page: false for mathjax)
F
katex
T/F
Optional
Show katex (only required when setting per_page: false for katex)
F
aplayer
Optional
Load the aplayer js and css in the required page, please refer to the Post below the music configuration
NA
highlight_shrink
T/F
Optional
Configure whether the code box is expanded (true/false) (default is the configuration of highlight_shrink in the settings)
The tag plugin is a unique feature of Hexo, and is not in standard Markdown format.
The following writing method is only applicable to Butterfly theme, it will not work on other themes and may even report errors. Please pay attention before using.
Although the plugin brings some additional features and UI enhancements to the theme, there are obvious limitations to the tabbed plugins, so please be aware of them when using them.
{% hideToggle Butterfly Theme Installation %} In the root directory of your blog folder, do git clone -b master https://github.com/jerryc127/hexo-theme-butterfly.git themes/Butterfly
If you want to install a newer dev branch, you can do
git clone -b dev https://github.com/jerryc127/hexo-theme-butterfly.git themes/Butterfly {% endhideToggle %}
[url] : Links [text] : Button text [icon] : [Optional] Icon [color] : [Optional] Button background color (when default style is selected) Button fonts and border colors (when outline is selected), default/blue/pink/red/purple/orange/green [style] : [Optional] Button Style Default Solid outline/leave blank [layout] : [Optional] Button layout Default to line block/leave blank [position] : [Optional] Button position, only works if layout is set to block. Default:left, center/right/leaveblank [size] : [Optional] Button size larger/leave blank
Demo
1 2 3 4 5 6 7 8
This is my website, click the button {% btn 'https://singsongaftermath.com/',Click here %} This is my website, click the button {% btn 'https://singsongaftermath.com/',Click here,far fa-hand-point-right %} This is my website, click the button {% btn 'https://singsongaftermath.com/',Click here,,outline %} This is my website, click the button {% btn 'https://singsongaftermath.com/',Click here,far fa-hand-point-right,outline %} This is my website, click the button {% btn 'https://singsongaftermath.com/',Click here,far fa-hand-point-right,larger %} {% btn 'https://singsongaftermath.com/',Click here,far fa-hand-point-right,block %} {% btn 'https://singsongaftermath.com/',Click here,far fa-hand-point-right,block center larger %} {% btn 'https://singsongaftermath.com/',Click here,far fa-hand-point-right,block right outline larger %}
Unique name : Unique name of tabs block tag without comma. Will be used in #id's as prefix for each tab with their index numbers. If there are whitespace in name, for generate #id all whitespace will replaced by dashes. Only for current url of post/page must be unique!
[index] : Index number of active tab. If not specified, first tab (1) will be selected. If index is -1, no tab will be selected. It's will be something like spoiler. Optional parameter. [Tab caption] : Caption of current tab. If not caption specified, unique name with tab index suffix will be used as caption of tab. If not caption specified, but specified icon, caption will empty. Optional parameter. [@icon] : FontAwesome icon name (full-name, look like 'fas fa-font') Can be specified with or without space; e.g. 'Tab caption @icon' similar to 'Tab caption@icon'. Optional parameter.