做分销商城网站的,app案例网站,服装品牌,wordpress 同步es1 介绍
博客整体效果。在线预览我的博客#xff1a;https://taot-chen.github.io
支持特性 简约风格博客Powered By Jekyll博客文章搜索自定义社交链接网站访客统计Google Analytics 网站分析Gitalk评论功能自定义关于about页面支持中文布局支持归档与标签
2 新建博客 git…1 介绍
博客整体效果。在线预览我的博客https://taot-chen.github.io
支持特性 简约风格博客Powered By Jekyll博客文章搜索自定义社交链接网站访客统计Google Analytics 网站分析Gitalk评论功能自定义关于about页面支持中文布局支持归档与标签
2 新建博客 git 仓库 首先你要在 github 上新建自己博客仓库用来生成和存放博客文章。你可以直接 fork/clone 我的博客仓库。这样你马上有了自己的博客仓库。在新建仓库的时候需要把仓库的名称设置为固定的格式username.github.io 其中 username 是你的 github 用户名github page解析的时候找的是这个 username.github.io的仓库名 版权声明fork/clone 之后 _posts 文件夹内容是我的博客文章版权归我所有。你可以选择删除里面的文章替换上自己的或者转载附上链接注明出处 此时不出意外的话打开域名https://username.github.io 就能看到你刚搭建的博客了 这个时候也可能会出现 404 页面或者是渲染失败的源码页面。这种情况可能是 Jekyll build 失败造成的。实际上每次仓库有更新之后Jekyll 都会重新 build 整个项目当仓库更新有不恰当的内容例如语法错误时Jekyll 就会 build 失败导致博客页面渲染失败。此时只需要查看 Jekyll 的 build 日志找到报错的地方 fix 并更新仓库即可
3 博客配置
仓库根目录下的 _config.yml 文件是博客配置文件根据自己的信息进行修改并更新到仓库即可博客名称和描述 # Name of your site (displayed in the header)name: taots blog# Short bio or description (displayed in the header)description: 分享编程资源 | 学习路线 | 记录学习历程社交链接 这里配置社交链接按钮没配的不显示 # Includes an icon in the footer for each username you enterfooter-links:#weibo: frommidworld #请输入你的微博个性域名 https://www.weibo.com/thispart# behance: # https://www.behance.net/usernamedribbble:# zhihu: ning-meng-cheng-31-94email: 1624024615qq.comfacebook:flickr:github: Taot-chengoogleplus: # anything in your profile username that comes after plus.google.com/instagram:linkedin:pinterest:rss: # just type anything here for a working RSS iconstackoverflow: # your stackoverflow profile, e.g. users/50476/bart-kierstumblr: # https://username.tumblr.com#twitter: frommidworldyoutube:配置gitalk 这个是评论功能的配置。评论功能基于gitalk在配置文件中找到gitalk配置项目修改规则如下 gitalk:clientID: 你的clientIDclientSecret: 你的clientSecretrepo: 你的repository名称owner: 你的GitHub用户名原理是利用github的issues评论文章Google站长统计 使用谷歌分析账号它可以统计你博客网站的访问人数访问来源等非常丰富的网站数据 # Enter your Google Analytics web tracking code (e.g. UA-2110908-2) to activate trackinggoogle_analytics: UA-XXXXXXX-X博客网址配置 # Your website URL (e.g. http://barryclark.github.io or http://www.barryclark.co)# Used for Sitemap.xml and your RSS feedurl: https://yourname.github.iodone! 不出意外的话现在访问上面提到的博客地址就可以看到自己的博客。
4 如何写博客
文章用 markdown 语法写好统一放在 _post 文件夹下上传git page 会自动从 github 仓库拉取并重新 build Jekyll解析成网页之后就能在博客网页浏览。关于文章的命名格式博客文章必须按照统一的命名格式 yyyy-mm-dd-blogName.md并且文章开头必须有统一的 head例如本文的文件名为 2023-12-29-build_blog_with_gitpages.md文件开头内容为 ---layout: posttitle: build_blog_with_gitpagesdate: 2023-12-29---