一行代码都不写!Github博客小白版入门教程
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">赖可 发自 凹非寺</p>量子位 <span style="color: black;">报告</span> | 公众号 QbitAI<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">GitHub不仅<span style="color: black;">能够</span>传代码,还<span style="color: black;">能够</span>建博客。利用GitHub Pages平台,就<span style="color: black;">能够</span>搭建非常好用的个人博客。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">然则</span>难点在于,你在要敲<span style="color: black;">非常多</span>代码<span style="color: black;">才可</span>搭出一个博客。<span style="color: black;">针对</span>小白和新手<span style="color: black;">来讲</span>,太不友好。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">不碍事</span>!<span style="color: black;">此刻</span><span style="color: black;">不消</span>写代码<span style="color: black;">亦</span><span style="color: black;">能够</span>了。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">不需要敲码,<span style="color: black;">不消</span>写<span style="color: black;">运用</span>命令行,<span style="color: black;">能够</span>自定义主题,还能有自己的域名。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">Fast.ai<span style="color: black;">供给</span>了模版,只要注册一个github账号,小白就能够完成搭建博客的操作。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">真是文科生友好~</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">下面是小白教程。</p>
<h2 style="color: black; text-align: left; margin-bottom: 10px;">创建存储库&创建主页</h2>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">首要</span>,你需要注册一个github账号,并<span style="color: black;">保证</span>在线。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">而后</span>,点击这个网页<span style="color: black;">位置</span>:https : //github.com/fastai/fast_template/generate</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">注册一个<strong style="color: blue;">存储库</strong>(repository),<span style="color: black;">便是</span>存储博客的<span style="color: black;">地区</span>。注册名字的格式是:<strong style="color: blue;">github上的名字+github.io</strong>;储存库的性质<span style="color: black;">选取</span><strong style="color: blue;">公共</strong>Public。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">倘若</span><span style="color: black;">选取</span>Private<span style="color: black;">便是</span>仅自己可见,<span style="color: black;">这般</span>需要付费</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><img src="https://mmbiz.qpic.cn/mmbiz_png/YicUhk5aAGtBHlxt7Zjbz5ficGqeyWOY5oGlMHliczzAiblgic28Ib6MmzhhPLHPK4bJUYJInytnCbeaR4nE6FZfPKA/640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=1&wx_co=1" style="width: 50%; margin-bottom: 20px;"></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">下面就<span style="color: black;">能够</span>进行博客主页的<span style="color: black;">有些</span>基本设置。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">进入主页,会看到的是一个名字为<strong style="color: blue;">index.md</strong>的文件,这是个Markdown文件。Markdown是一个<span style="color: black;">日前</span>创建格式化文本的<span style="color: black;">方便</span>又强大的<span style="color: black;">办法</span>。在输入普通文本的时候,只需要加入<span style="color: black;">有些</span>特定字符就<span style="color: black;">能够</span><span style="color: black;">增多</span>特定的样式。<span style="color: black;">例如</span>在一个一个词<span style="color: black;">或</span>短语前后都输入*,就<span style="color: black;">能够</span>使其变成斜体。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://mmbiz.qpic.cn/mmbiz_png/YicUhk5aAGtBHlxt7Zjbz5ficGqeyWOY5oericpoZvFYVQHL6bLQ2OSlicibxXRJ7Tq640YAO4XTibNbAwLQFm78eSSg/640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=1&wx_co=1" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">单击这个文件打开它,进入新的页面,点击<strong style="color: blue;">编辑按钮</strong>,即铅笔符号<span style="color: black;">起始</span>编辑。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://mmbiz.qpic.cn/mmbiz_png/YicUhk5aAGtBHlxt7Zjbz5ficGqeyWOY5oiaD1nZYHkv0NgnzibPFpdZic9MhuJZJCkdjjY9SxogibLQ1m5oc3r6MgFw/640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=1&wx_co=1" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">点击<strong style="color: blue;">Preview changes</strong><span style="color: black;">能够</span>浏览文本效果</p><strong style="color: blue;"><img src="https://mmbiz.qpic.cn/mmbiz_png/YicUhk5aAGtBHlxt7Zjbz5ficGqeyWOY5ogzSu8a8Ekn95icr646jFERzAw9Sc9nC0wia6CBW6Qzd35ZT3GghjSxbw/640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=1&wx_co=1" style="width: 50%; margin-bottom: 20px;">△</strong>blog被设置成斜体<img src="https://mmbiz.qpic.cn/mmbiz_png/YicUhk5aAGtBHlxt7Zjbz5ficGqeyWOY5oAuUibRI454mf75nNbOOYWBYxWVxR07mDgMT0phIOib2QP2KUWdD6Mlgg/640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=1&wx_co=1" style="width: 50%; margin-bottom: 20px;">
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">滚动到底部并单击<strong style="color: blue;">Commit changes</strong>绿色按钮来提交。在GitHub上,“提交”<span style="color: black;">寓意</span>着将其<span style="color: black;">保留</span>到GitHub服务器。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">博客的域名<span style="color: black;">便是</span>,<strong style="color: blue;">**github上注册的名字+github.io</strong>,页面就会<span style="color: black;">表示</span>刚才输入的内容。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://mmbiz.qpic.cn/mmbiz_png/YicUhk5aAGtBHlxt7Zjbz5ficGqeyWOY5owfu4ABtUvyW5uWOnRnM8MQQdG8EhnsqlP1yfcUuZ4icq9uibDBCoxRyw/640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=1&wx_co=1" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">还<span style="color: black;">能够</span>对博客进行其它设置,单击名为<strong style="color: blue;">_config.yml </strong> 的文件,<span style="color: black;">而后</span>像之前<span style="color: black;">同样</span>单击<strong style="color: blue;">编辑按钮</strong>,在冒号后面输入相应的内容,<span style="color: black;">能够</span>更改标题,描述和GitHub用户名值。输入的内容就会在主页<span style="color: black;">表示</span>。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://mmbiz.qpic.cn/mmbiz_png/YicUhk5aAGtBHlxt7Zjbz5ficGqeyWOY5oR2eJibokudibusCZu25du5gMib4H1SfarA9YOH8o3pGYvQHib5IveQHs7A/640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=1&wx_co=1" style="width: 50%; margin-bottom: 20px;"></p>
<h2 style="color: black; text-align: left; margin-bottom: 10px;">写<span style="color: black;">文案</span></h2>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">下面<span style="color: black;">能够</span>写博客<span style="color: black;">文案</span>了!</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">所有的<span style="color: black;">文案</span>都会放在<strong style="color: blue;">_posts</strong>文件夹中。单击它,<span style="color: black;">而后</span>单击<strong style="color: blue;">创建文件</strong>按钮,创建一个新的文件。文件名命名的格式是:year-month-day-name.md,其中year是四位数,而month和day是两位数。“name”<span style="color: black;">能够</span>自定义,扩展名md则用于Markdown。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://mmbiz.qpic.cn/mmbiz_png/YicUhk5aAGtBHlxt7Zjbz5ficGqeyWOY5o9tSictPGiatqzpfFqvicMcUlGUCgP1lOCzWUgzqLymJrN8iaKV01My6reQ/640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=1&wx_co=1" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">写<span style="color: black;">文案</span>的时候<span style="color: black;">亦</span>用Markdown来标注格式。<span style="color: black;">第1</span>行<span style="color: black;">做为</span>一级标题,开头加上#,<span style="color: black;">倘若</span><span style="color: black;">文案</span>里面还需要小标题,##用于二级标题,###用于三级标题。点击<strong style="color: blue;">Preview</strong><span style="color: black;">能够</span>浏览。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://mmbiz.qpic.cn/mmbiz_png/YicUhk5aAGtBHlxt7Zjbz5ficGqeyWOY5ohJTuo0c8q7bnGUszqhB5N9ouf2kib6lExXxNIiaIsW8LTbKCNnTwKTcQ/640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=1&wx_co=1" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">一样</span>,点击绿色按钮<strong style="color: blue;">Commit new file</strong>来提交。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://mmbiz.qpic.cn/mmbiz_png/YicUhk5aAGtBHlxt7Zjbz5ficGqeyWOY5osRMncGQxfjA2icWCIRlzs4JlD9NiaKyGwr4ibn9GaxnGneOE5RNMAafGA/640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=1&wx_co=1" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">提交完成后,<span style="color: black;">文案</span>就会出<span style="color: black;">此刻</span>博客主页上:</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://mmbiz.qpic.cn/mmbiz_png/YicUhk5aAGtBHlxt7Zjbz5ficGqeyWOY5oLzw0s4aRJps0RriaVckicicboXY5icvC9W8yHRCu5Oa4OfxOElD8PZia6uw/640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=1&wx_co=1" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">点进去的<span style="color: black;">文案</span>界面是<span style="color: black;">这般</span>:</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://mmbiz.qpic.cn/mmbiz_png/YicUhk5aAGtBHlxt7Zjbz5ficGqeyWOY5oy1IACbEHeSb8ghInbTeKL9BP0GOMDxWbExeyB9lRzsFjNm3FKsdOow/640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=1&wx_co=1" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">想删除<span style="color: black;">文案</span>,<span style="color: black;">一样</span>进入<strong style="color: blue;">_posts</strong>文件夹,找到对应的文件,进行操作。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://mmbiz.qpic.cn/mmbiz_png/YicUhk5aAGtBHlxt7Zjbz5ficGqeyWOY5ohaib6mu5JtzDuO5zCxeCITicM7LrZkBiaRlzqHLibx9v6Q7bmM6e465O1Q/640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=1&wx_co=1" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">记住</strong>,和写<span style="color: black;">文案</span><span style="color: black;">同样</span>,点完了删除后,还需要点击绿色的<strong style="color: blue;">commit</strong>,才算操作成功。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">倘若</span>想在<span style="color: black;">文案</span>里面加入<span style="color: black;">照片</span>,需要先把<span style="color: black;">照片</span>上传:</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://mmbiz.qpic.cn/mmbiz_png/YicUhk5aAGtBHlxt7Zjbz5ficGqeyWOY5om2FxJsxO9vHOAbeib1SX7spsKKia9a1awMPq08sGatcsItxtYq2vz1cA/640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=1&wx_co=1" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">而后</span>在<span style="color: black;">文案</span>中以如下字符串来加入:</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">!(images/filename.jpg</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">倘若</span>想加博客<span style="color: black;">文案</span>索引目录,输入下面两行</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">1. TOC</p>{:toc}
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">之前写的博文标题(以#标志的一级标题)就会自动出<span style="color: black;">此刻</span>目录里,并且自带超链接。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">倘若</span>想加入数学符号,<span style="color: black;">能够</span>用LaTeX的格式。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">首要</span>在<strong style="color: blue;"> _config.yml</strong>文件中进行设置,将<strong style="color: blue;">use_math</strong>进行简单的修改,变成<span style="color: black;">这般</span>:</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">use_math: true</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">只需要在字符串前后各加一个<strong style="color: blue;">$</strong>,<span style="color: black;">例如</span><span style="color: black;">$\sum_n (x)$</span>,<span style="color: black;">或</span>想让它单行<span style="color: black;">表示</span>的时候,在上下两行各加<strong style="color: blue;">$$</strong>,像<span style="color: black;">这般</span>:</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">$$</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">\sum_n (x)</p>$$
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">表示</span>出来就会是:</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://mmbiz.qpic.cn/mmbiz_png/YicUhk5aAGtBHlxt7Zjbz5ficGqeyWOY5o9PiaiafeNKpD8UPdPQDazZXrtH3oph2DraATd6T2iacgZssb1ibstIFbRQ/640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=1&wx_co=1" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">以上~</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">学会这些内容,你就<span style="color: black;">成为了</span>Github pages博客初级玩家,是不是超级易懂易上手?</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">倘若</span>你想用玩转博客,<span style="color: black;">亦</span>可继续钻研,说不定玩着玩着就<span style="color: black;">发掘</span>,已然沉迷于技术~</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://mmbiz.qpic.cn/mmbiz_gif/YicUhk5aAGtBHlxt7Zjbz5ficGqeyWOY5o6o6nhiccibsNYjLKJBa51Z3KDzSAgGNibiaIicoYpU1vIlXzJPOuIV1fYLA/640?wx_fmt=gif&tp=webp&wxfrom=5&wx_lazy=1" style="width: 50%; margin-bottom: 20px;"></p>
<h2 style="color: black; text-align: left; margin-bottom: 10px;">传送门</h2>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">https://www.fast.ai/2020/01/16/fast_template/</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">作者系网易新闻·网易号“各有态度”签约作者</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">— <strong style="color: blue;">完</strong> —</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">AI内参|把握AI发展新机遇</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">拓展<span style="color: black;">优秀</span>人脉,获取最新AI<span style="color: black;">新闻</span>&论文教程,欢迎加入AI内参社群<span style="color: black;">一块</span>学习~</p><img src="https://mmbiz.qpic.cn/mmbiz_jpg/YicUhk5aAGtDgjn9BmMiazHlrpGkNnribDjqYte2iahJOX1WMDHQicUZicA3oQYpkNW5Eic9ekeIZtbOOedzPCiaLXe02g/640?wx_fmt=jpeg&tp=webp&wxfrom=5&wx_lazy=1&wx_co=1" style="width: 50%; margin-bottom: 20px;">
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">跟大咖交流 | 进入AI社群</strong></p><img src="https://mmbiz.qpic.cn/mmbiz_png/YicUhk5aAGtDsibEFmM7SLq0EHX2djI01lZJ7VuJeElDybMHAibpt3N3K4vg3oNCw7iaibMgDfeMfY0cdtSGsa2ZLug/640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=1&wx_co=1" style="width: 50%; margin-bottom: 20px;"><img src="https://mmbiz.qpic.cn/mmbiz_jpg/YicUhk5aAGtDsibEFmM7SLq0EHX2djI01lwRn30VGqicwKzzibreTdPeP6QqrB55bDWUOwAb1ia7qG1GgY1cj8ACWHw/640?wx_fmt=jpeg&tp=webp&wxfrom=5&wx_lazy=1&wx_co=1" style="width: 50%; margin-bottom: 20px;">
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><strong style="color: blue;">量子位 </strong></span><span style="color: black;">QbitAI · 头条号签约作者</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">վᴗ ի <span style="color: black;">跟踪</span>AI技术和<span style="color: black;">制品</span>新动态</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">爱好</span>就点「在看」吧 !</p>
你的见解真是独到,让我受益匪浅。
页:
[1]