当前位置:网站首页>Nanny level tutorial on building personal home page (II)
Nanny level tutorial on building personal home page (II)
2022-04-23 01:49:00 【Dongyao】
Dry goods time
hexo Personal homepage series tutorials : This article mainly introduces how to set the theme , And how to write 、 Upload articles .
next The theme
Now? , We have to choose a beautiful theme , The author recommends using next The theme . On the one hand is next Integrated black and white simple style , Help readers focus on the reading of the article ; On the other hand is next There are many active people in the community , current 8.0 The theme of this version integrates the interfaces of many third-party plug-ins , User interaction can be carried out conveniently 、 Page beautification 、 Site statistics 、 Baidu push and other functions , Some dynamic sites , It covers almost everything .
Open the root directory of the personal home page project , open git bash window , Typing the following code will next Download to local blog/themes route :
git clone https://github.com/theme-next/hexo-theme-next themes/next

Open... In the root directory _config.yml Modify the theme , This file is the site configuration file .
# Site
title: Zhang San's happy life
subtitle:
author: Zhang San
language: zh-CN
timezone: Asia/Shanghai
# Change the theme to next
theme: next
It is worth noting that ,next The theme is divided again 4 Seed theme , Respectively Muse、Mist、Gemini、Pisces. How to set it ?
Enter the path blog/themes/next, find _config.yml, there _config.yml Is the theme profile .
# Schemes
#scheme: Muse
#scheme: Mist
#scheme: Pisces
scheme: Gemini
The author chose Gemini, Students can choose which one they want to choose and remove the annotation of which one they want , You can try them all to see the effect , Pick one you like .
After setting up , At the root blog Open down git bash, Type... In turn :
hexo clean
hexo g
hexo s
You can start your personal web service locally , Enter web address in browser :localhost:4000, Test your theme .
My first article
Our hardware facilities are ready , But the only thing on the web is hello world This article , How to write an article ?
We enter blog/source/_posts Folder , You can see hello world.md The initial article of this project . This path is where all your articles are saved .
At present, there are two ways to write articles
-
The first one is : We can use other
markdownEditing tools ( for exampleTypora) Edit in advance , Then drag the written article to_postsin . Then open it in the root directorygit bash, typehexo clean && hexo g && hexo s( Or useVScodeopenblogFolder , Type... In the terminalhexo clean; hexo g; hexo s, RecommendedVScodeMaintain your website , In the future, we shouldIDEExplain the standard ), You can sync to the local website . -
The second kind :
-
We entered ahead of time
blog/scaffoldsFolder , openpost.md, Replace it with :--- title: { { title } } date: { { date } } categories: tags: keywords: description: ---This
post.mdIt's the master of your article , What unified configuration do you want to make , Can be edited in the master . -
Type... In the terminal :
hexo new post ' My first article 'This command is used to initialize an article , Among them
postWrite but not write . So you can be in_postFound in folderMy first article .md了 . After finish , In the first wayhexo clean ...Command to regenerate the local file , openlocalhost:4000, You can see your own article .
-
Deploy to github
OK, Now we need to deploy all the locally generated project files to the remote warehouse , So that others can access your home page .
First , We type the following command to install the deployment plug-in :
npm install hexo-deployer-git --save
After installation , We enter blog/_config.yml Site profile , modify deploy Field :
deploy:
type: git
// repository Replace with your own warehouse name
repository: [email protected]:dongyaoo/dongyaoo.github.io.git
branch: master
Remember you github Warehouse name , Students do not remember the move : Build a personal home page, nanny level tutorial ( One ). Follow the method in the previous tutorial to find the warehouse name you bind ,
After configuration, the VSCode The input terminal :
hexo d
One click deployment to github. If some novice students report an error in this step , It should not be set git config --global user.email | user.name ). Type the following command in the terminal , again hexo d Just a moment .
git config --global user.email "gitHub mailbox "
git config --global user.name "gitHub user name "
Wait a moment , Type in the browser www.dongyaoo.github.io You can visit your personal web page ( Remember to dongyaoo Replace with your warehouse name ).
At this time , Your website is online , Enter this website on other devices and you can also see your own website ~~
Conclusion
Students who want to learn more high-quality content , Pay attention to the author's home page : Dongyao theory ~~
版权声明
本文为[Dongyao]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230144475482.html
边栏推荐
- 一些使用代理IP的小技巧。
- 关于C4D动画如何导入Lumion
- Analyze the three functions of static proxy IP.
- How to write the resume of Software Test Engineer so that HR can see it?
- npm——配置淘宝镜像
- Is the availability of proxy IP equal to the efficiency of proxy IP?
- 动态代理ip的测试步骤有哪些?
- NPM yarn startup error [resolved]
- 数字藏品平台入驻 数字藏品平台开发 数字藏品SaaS平台
- 【动手学深度学习V2】循环神经网络-1.序列模型
猜你喜欢

浅析一下隧道代理IP的优缺点。

关于C4D动画如何导入Lumion

W801/W800/W806唯一ID/CPUID/FLASHID

Leetcode 112 Total path (2022.04.22)
![[experience tutorial] Alipay balance automatically transferred to the balance of treasure how to set off, cancel Alipay balance automatically transferred to balance treasure?](/img/d5/6aa14af59144b8c99aa6a367479f6b.png)
[experience tutorial] Alipay balance automatically transferred to the balance of treasure how to set off, cancel Alipay balance automatically transferred to balance treasure?

Custom numeric input control

What are the common proxy IP problems?

教程】如何用GCC“零汇编”白嫖MDK

ESP32使用freeRTOS的消息队列

单片机和4G模块通信总结(EC20)
随机推荐
哪些代码需要做单元测试?
PID精讲
最长公共子序列(记录路径版)
What categories do you need to know before using proxy IP?
ESP32使用freeRTOS的消息队列
使用单元测试框架编写单元测试的好处?
什么是代理IP池,如何构建?
2022 Saison 6 perfect Kid Model IPA national race Leading the Meta - Universe Track
NR polar code VII - SCL (successful cancellation list coding)
Redis implements distributed locks
电子采购如何成为供应链中的增值功能?
Cc2541 emulator CC debugger tutorial
动态代理ip的测试步骤有哪些?
ESP32蓝牙Bluetooth Controller API介绍
J-Link RTT使用
Longest common subsequence (record path version)
W801/W800-wifi-socket开发(一)-UDP
安装mysql出问题求解决
【动手学深度学习V2】循环神经网络-1.序列模型
[experience tutorial] Alipay balance automatically transferred to the balance of treasure how to set off, cancel Alipay balance automatically transferred to balance treasure?