当前位置:网站首页>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
markdown
Editing tools ( for exampleTypora
) Edit in advance , Then drag the written article to_posts
in . Then open it in the root directorygit bash
, typehexo clean && hexo g && hexo s
( Or useVScode
openblog
Folder , Type... In the terminalhexo clean; hexo g; hexo s
, RecommendedVScode
Maintain your website , In the future, we shouldIDE
Explain the standard ), You can sync to the local website . -
The second kind :
-
We entered ahead of time
blog/scaffolds
Folder , openpost.md
, Replace it with :--- title: { { title } } date: { { date } } categories: tags: keywords: description: ---
This
post.md
It'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
post
Write but not write . So you can be in_post
Found 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
边栏推荐
- UVC camera encapsulation class
- NPM yarn startup error [resolved]
- Android sqliteopenhelper data table structure upgrade
- 在使用代理IP前需要了解哪些分类?
- 《维C中国》乡村助农暖人心第三站嘉宝果农场
- Jerry's AI server [chapter]
- FL studio20.8最新中文版本安装下载图文教程
- Dimension C China helping farmers in rural areas warms people's hearts the third stop is jiabaoguo farm
- What business scenarios will the BGP server be used in?
- JSP基础知识总结
猜你喜欢
[registration] tf54: engineer growth map and excellent R & D organization building
CDR2022首发全新版本性能介绍
W801/W800/W806唯一ID/CPUID/FLASHID
力扣(LeetCode)112. 路径总和(2022.04.22)
W801/W800-wifi-socket开发(一)-UDP
Server 2019 the available memory of the server is half of the actual memory
When should I write unit tests? What is TDD?
DO447管理用户和团队的访问
如何对代理IP进行分类?
腾讯云接口进行人脸检测 和签名出错问题
随机推荐
What is BGP server and what are its advantages?
教程】如何用GCC“零汇编”白嫖MDK
Basic knowledge of software testing, you can meet the interviewer after reading it
Jerry's AI server [chapter]
What is a makefile file?
代理IP可用率是不是等同于代理IP的效率?
CC2541的仿真器CC Debugger使用教程
C语言中如何“指名道姓”的进行初始化
什么是代理IP池,如何构建?
客户端项目管理经常面临的挑战
Jerry's CPU performance test [chapter]
Sqlserver data transfer to MySQL
2022第六季完美童模 IPA国民赛领跑元宇宙赛道
【动手学深度学习V2】循环神经网络-1.序列模型
Error in face detection and signature of Tencent cloud interface
《维C中国》乡村助农暖人心第三站嘉宝果农场
Linux系统下以RPM方式如何安装mysql-5.7.9
角色个人属性英文缩写
[tutorial] how to use GCC "zero assembly" for white whoring MDK
批处理多个文件合成一个HEX