In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "what is the method of building a Hexo blog". The content of the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what is the method of building a Hexo blog?"
The git and node.js environments have been installed by default in this article
Release notes: git version 2.16.2.windows.1, node.js v8.9.4
What is Hexo?
Hexo is a fast, concise and efficient blog framework, there is no introduction here, lose a link, interested to see it: Hexo Chinese official website, which contains more things, not only hexo documentation, but also many hexo plug-ins and topics.
Effect picture of my Hexo blog home page
Welcome to visit ~ Yizhu Station
Install Hexo$ npm install-g hexo-cli to establish a default theme blog $hexo init blog$ cd blog$ npm install
Blog stores folder names for blogs, which can be named at will. This article takes blog as an example. It is best to name the same as the GitHub Pages warehouse name, save the later modification, but all are small case
Open localhost:4000 and you can see the Hexo blog with the default theme.
Select theme
There are 200 + themes to choose from on the official website. I recommend some personal favorites.
Simple money
Hexo-theme-next
Maupassant-hexo
Hexo-theme-melody
Cool style
Black-blue
Hexo-theme-nebula
Practical money
Hexo-theme-pure
Application theme
After selecting the theme, go to the corresponding github project home page, and there will usually be README files to help complete the subsequent construction. If not, please refer to the following steps to check out the theme files under the previously built blog theme file directory (this article is: blog/themes/).
$git clone https://github.com/xxxx
Then modify the blog configuration file _ config.yml to add the following line
Theme: xxx
Note: ① xxx is the topic name
② is not a configuration file for the theme. It's in the root directory of the blog folder.
Detailed explanation of configuration file
In the whole process of building the blog, there are two configuration files, which are very important, one is the blog configuration file, and the other is that the theme configuration file is stored in their respective root directory, and the file name is _ config.yml.
Blog profile
# Hexo configuration # Sitetitle: Hexo # Hexo blog site title subtitle: # Hexo blog site subtitle description: # Hexo blog site description keywords: # Hexo blog keywords author: John Doe # author language: # language timezone: # time zone # URLurl: http://yoursite.com # website URL root: / # website root directory permalink:: year/:month/:day/:title/ # article permanent link format permalink_defaults: # permanent link default value for each part Generally, # Directorysource_dir: source # resource file storage directory public_dir: public # public folder is not set. Static website generation directory tag_dir: tags # tag directory archive_dir: archives # article directory category_dir: categories # classification directory code_dir: downloads/code # code directory i18n_dir:: lang # i18n internationalization skip_render:# Writingnew_post_name:: title.md # new blog article name case Type default_layout: post # default layout titlecase: false # whether the title is lowercase external_link: true # whether to open the link filename_case: 0 # conversion file name 1: lowercase 2: uppercase render_drafts: false # shows draft post_asset_folder: false # relative_link: false # whether to use a relative path as a connection future: true # whether to show future articles highlight: # Code highlight setting enable: true line _ number: true auto_detect: false tab_replace: # Home page settingindex_generator: # Home page setting path:''# blog root directory per_page: 10 # Page size order_by:-date # sort Default date # Category & Tagdefault_category: uncategorized # default Category category_map: # Category Collection tag_map: # tag Collection # Date / Time formatdate_format: YYYY-MM-DD # date format time_format: HH:mm:ss # time format # Paginationper_page: 10 # Page size pagination_dir: page # Paging Directory # Extensionstheme: landscape # theme # Deploymentdeploy: # deployment type: # Category: git
The theme configuration file, which is the configuration file for the black-blue theme, has been more detailed and has been posted directly.
# > Basic Setup | basic settings Conments comment system
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.