您的位置:首页 > 新闻 > 会展 > 网页设计心得体会免费_网店代运营哪家公司好_全媒体广告代理加盟靠谱吗_优化seo软件

网页设计心得体会免费_网店代运营哪家公司好_全媒体广告代理加盟靠谱吗_优化seo软件

2025/3/13 15:12:44 来源:https://blog.csdn.net/weixin_44001799/article/details/144453920  浏览:    关键词:网页设计心得体会免费_网店代运营哪家公司好_全媒体广告代理加盟靠谱吗_优化seo软件
网页设计心得体会免费_网店代运营哪家公司好_全媒体广告代理加盟靠谱吗_优化seo软件

1、安装好git
2、安装好npm、node
3、切换npm的源,现在阿里的cnpm不行了,要切换成新的:

npm config set registry https://registry.npmmirror.com
npm config get registry

4、安装hexo-cli

npm install -g hexo-cli查看是否安装成功: 
hexo -v

5、博客初始化:创建一个文件夹,进入该文件夹

 hexo init
在博客文件夹的根目录右键打开 GitBash
hexo s
在浏览器输入localhost:4000查看

在这里插入图片描述

新建文章

hexo new “标题”

切换主题

去hexo模板市场 更换,然后放进来themes文件夹,修改_config.yml里面的themes配置即可

发布到github上

1、npm install --save hexo-deployer-git
2、在github创建仓库,名为:xxx.github.io xxx是你的github名字
3、修改_config.yml

# URL
## Set your site url here. For example, if you use GitHub Page, set url as 'https://username.github.io/project'
url: https://你的github名.github.io/
permalink: :year/:month/:day/:title/
permalink_defaults:
pretty_urls:trailing_index: true # Set to false to remove trailing 'index.html' from permalinkstrailing_html: true # Set to false to remove trailing '.html' from permalinks...# Deployment
## Docs: https://hexo.io/docs/one-command-deployment
deploy:type: gitrepository: https://github.com/你的github名/你的github名.github.io.gitbranch: master

修改代码后推送到github

清楚缓存

hexo clean

重新构建页面

hexo g

推送到github

hexo d

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com