Some appointments about this blog
This blog is based on the Butterfly theme.
This post is for me, as a memo to the blog.
General article settings
The part is wrapped with ---
at the top of the markdown article.
1 |
|
No comment
1 |
|
Categories appointment
Update at any time.
Tags appointment
Conventions on the definition and scope of use of fixed and special tags.
Translate
Articles translated by myself, whether from Chinese to English or from English to Chinese.
Original
Articles summarized by myself.
Repost
Repost articles written by others to my blog, which may be supplemented.
……
Update at any time.
Blog directory structure
Need to rely on plug-ins to solve the problem of image relative paths. See the appendix for details.
Example
Appointment
Article dir
- Structure - /[blog root path]/source/_posts/[category dir]/[sub category dir]/[series dir]/[article dir]/[article dir inner structure]
- [category dir] - Folder created based on categories appointment. It can be multi-level, and series articles will also be classified folders.
- [article dir] - Directory named after the article title.
[Article dir inner structure]
It usually consists of one markdown file and two folders.
- [file] index.md - Fixed name. Post’s markdown source file.
- [dir] index - Fixed name. Resource folder, storing pictures or files to be referenced in articles. The folder name must same as the post’s markdown source file.
- [dir] ref - Reference folder. Storing process files, like “reference material”, “mind map”, “outline” and so on. They won’t be released unless use the
.md
format to store them.
Article title structure
Separate words with a
-
.If it is a series of articles: [series name] + [space] + [-] + [space] + [seq number] + [.] + [article title name]
The [seq number] is Optional.
Example - series article
directory structure: _post/[category dir]/[sub category dir]/[series dir]/[article dir]/*
directory case: _post/life/travel/china/1-delicious-food/*
article dir: 1-delicious-food
article title: china - 1.delicious-food
Release steps and commands
1 | 1. Complete the article based on 'directory structure'. |
Appendix
Tips
Blog theme based on https://butterfly.js.org
Inside the
_post
folder, including subfolders, each MD file will be compiled as a post for publishing.When an image is on the Internal Site and used a relative path in the post, the image file should be saved to the resource folder[501], otherwise, the images cannot be copied to the publishing directory when publishing.
When a file is on the Internal Site and used a relative path in the post, the file should be saved to the resource folder. When referring to a file in an article, the path should not include the resource folder[502].
When need to refer to articles on this site, use the
{% post_link %}
function.Use ‘hexo-reference’ plug-in process footnotes.
1
npm install hexo-reference --save
Notice Footnotes can only use numbers, not words.
Use ‘hexo-generator-index-pin-top’ plug-in process article top.
1
2
3cd [blog-path]
npm uninstall hexo-generator-index --save
npm install hexo-generator-index-pin-top --saveThen, use ‘top’ property on Front-matter, value is ‘true’ or number, the larger the number, the higher the article.
About image path
Use a plug-in to solve the problem of using relative paths for images in the Internal Site, so that the images on the site can be displayed correctly in the editing and publishing status.
The images outside the station can be directly used by the full path.
Install the plugin and configure the Hexo
Open the asset folder function in Hexo’s _config.yml
1
post_asset_folder: true
Install the “hexo-renderer-marked” plugin in the blog root path
1
npm install hexo-renderer-marked --save
Modify the code of the plugin
In the /node_modules/hexo-renderer-marked/lib/renderer.js
, modify the code as shown below.
About links within the post
Quote Internal Site file (pdf)
Quote the Internal Site Page参考
- Butterfly theme setting about “post front-matter”
- Handle image path of hexo + typora
- About links in post
- 201.Is just about life. ↩
- 202.Some views or phenomena are based on thinking about life. ↩
- 203.Some fragments of life, like social media sharing. ↩
- 204.Is just about the code world. ↩
- 205.Some Thoughts on Technical Management. ↩
- 206.Technology-oriented articles. ↩
- 207.The in-depth analysis of some valuable interview questions collected at ordinary times and used during the interview. ↩
- 208.Sharing is generated by reading, such as reading notes and book pieces. ↩
- 299.Other articles such as this post do not belong to the above categories. ↩
- 501.Folder with the same name and level as the article. ↩
- 502.The first level directory needs to be removed manually. ↩