Total Pageviews

Saturday, 21 December 2024

搭建静态博客程序yohe

npm install yohe -g

yohe init yohe-blog
cd yohe-blog
yohe new test
显示:
create new post test sucessfully! Go to edit file source/_posts/test.md
root@racknerd-626f077:~/yohe-blog# nano source/_posts/test.md
root@racknerd-626f077:~/yohe-blog# cat source/_posts/test.md
---
title: 测试
date: 2024-12-22,00:24:32
layout: post
comment: true
tags: [blog]
categories: code
---

这是测试。

看看如何?

root@racknerd-626f077:~/yohe-blog# yohe build (此命令会在当前目录下,生成public目录)
root@racknerd-626f077:~/yohe-blog# cd public
root@racknerd-626f077:~/yohe-blog/public# ls
2024 about archives assets categories index.html page tags
root@racknerd-626f077:~/yohe-blog/public#
(可见~/yohe-blog/public就是静态网站的根目录)
root@racknerd-626f077:~/yohe-blog/public# netlify deploy
root@racknerd-626f077:~/yohe-blog/public# netlify deploy --prod
root@racknerd-626f077:~/yohe-blog/public# vc --cwd .
(https://briteming.blogspot.com/2016/12/vpsnetlifycom.html) 
演示网站:
https://yhb-5o2tlvigw-luckypoems-projects.vercel.app/
https://yohe.netlify.app/
项目地址:
https://github.com/laoqiren/yohe  
https://github.com/briteming/yohe
这静态博客程序搞得不错,中国人就是聪明,值得点赞。
  
  
 
 
  
 
  

 

 

No comments:

Post a Comment