当前位置:网站首页>Hugo blog building tutorial
Hugo blog building tutorial
2022-06-12 18:39:00 【Cun Yuyao】
Preface
With utilization Hexo、docsify、vuepress Wait for the framework to build the blog experience , Let's take a look today Hugo.Hugo It's based on Go Language and the implementation of the static web site generator , It is simple and easy to use 、 Efficient and easy to expand 、 Features of rapid deployment .
Let's start with Hugo Official documents in Chinese and English , It is convenient for everyone to consult when encountering problems :
Let's take a look , How to use it Hugo To build a blog .
Set up process
install Hugo
Since you want to use Hugo, You need to install it first . If you want to install through binary installation package , First of all, you need to choose the installation package suitable for your platform , Then download it .
Here is not only suitable for Windows Installation package of platform , It also includes Linux The platform and macOS Installation package of platform . More Than This , For different users , Also carefully provided 32 Bit and 64 Bits to choose from . Even for chips of different architectures, corresponding installation packages are provided , Can be said to be very careful .
But my demonstration here is mainly based on macOS platform , So I will not install it in the form of installation package , Through here homebrew One line of command can be easily done .
brew install hugo If your macOS Is not installed on homebrew, Then hurry to install it .
Here's a warm reminder , Domestic users shall comply with homebrew Basically, the installation through the official website will fail , So here is another installation method , Install through the following script .
/bin/bash -c "$(curl -fsSL https://gitee.com/ineo6/homebrew-install/raw/master/install.sh)"Check for success
Although after installation through the above command , The console prompts us that the installation is successful , But we have no idea , Just want to see if the low installation is successful . At this time, you can view Hugo The way the version number is , Laique Hugo Is the installation successful .
hugo version If the installation is successful , Then after executing the order, it will be like the above , Prompt you for the installed Hugo Version of .
Initialize the website
Now that it's installed , The next step is to initialize our website directory . By the following command , We can accomplish Hugo The project is initialized !
hugo new site [ Project name ]hugo new site JavaParkAfter the project is initialized , The resulting directory is as follows .
Here we need to pay attention to config.toml , This is the configuration file for the project , Mainly used to configure Hugo, The configuration in this file will be valid for the whole project .theme The directory is mainly used to place topics , There is usually one inside theme.toml, Used to configure the theme .
By default ,config.toml There will only be the following three configurations .
Set the theme
To style our website , We need to choose a favorite topic .Hugo It's not like Hexo Provides more topics , But there are still many good ones , You can go to the skin list to find .
Here I choose a skin m10c, Enter the project we initialized , Then use the following command to download the topic to theme Under the folder .
git clone https://github.com/vaga/hugo-theme-m10c.git themes/m10c Then go to the project configuration file config.toml in , Set the theme .
theme = "m10c"preview
After setting the theme , You can preview ! Start with the following command Hugo The server , Then enter http://localhost:1313 You can preview !
hugo server -Dsummary
The above is how to use Hugo Set up a blog , Mainly from Hugo install 、 Initialize project 、 Theme Settings 、 Preview and other aspects Hugo Use , The rest is writing . It's a very difficult thing , I hope you can stick to it . Actually Hugo There are many other ways to play , I won't introduce them one by one here , You can go to the official website to explore more ways to play .
边栏推荐
- SCI Writing - Methodology
- Review of MySQL (10): three paradigms of database
- Review of MySQL (4): sorting operation
- Virtual Lab Basic Experiment tutoriel - 4. Diffraction à fente unique
- CEPH deploy offline deployment of CEPH cluster and error reporting FAQ
- 配送交付时间轻量级预估实践-笔记
- GD32F4xx 与符合DLT645的电能表通信_2
- Comparison of disk mapping tools for network disk and object cloud storage management
- 309. the best time to buy and sell stocks includes the freezing period
- How to modify the authorization of sina Weibo for other applications
猜你喜欢

Title 66: input 3 numbers a, B, C, and output them in order of size.

Mise en œuvre de l'ACL réflexe dans le simulateur Cisco Cisco Packet Tracer

Machine learning series (5): Naive Bayes

VirtualLab基礎實驗教程-4.單縫衍射

PHP:Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocat

Review of MySQL (V): Joint table query and sub query

Review of MySQL (IX): index

Basic SQL statement - select (single table query)

What is SAP support package stack

Common methods and examples of defect detection based on Halcon
随机推荐
torch. New usage of where (old but ignored usage)
Installation and configuration of window version pytorch entry depth learning environment
Review of MySQL (VIII): Transactions
从源码解析 MobX 响应式刷新机制
Quickly copy the request in browser F12 to postman/ or generate the corresponding code of the relevant language
吃饭咯 干锅肥肠 + 掌中宝!
Basic SQL statement - select (single table query)
Remote gadget putty (Alibaba cloud mirror station address sharing)
C language practice (4) -- multiplication and division of large numbers
Go init initialization function
Gossip about the source code of redis 89
Summary of interview questions
VirtualLab basic experiment tutorial -6 Blazed grating
MySQL advanced learning notes
Implementing reflexive ACL in Cisco packet tracker
This shift, I still have to go
每日一博 - 微服务权限一二事
Topic 66: input array, exchange the largest element with the first element, exchange the smallest element with the last element, and output array.
Gd32f4xx communicates with electric energy meter conforming to dlt645_ two
Extracting strings with grep awk