{"componentChunkName":"component---node-modules-gatsby-theme-gine-blog-src-components-post-blog-post-js","path":"/posts/b4d62931e3b3438dab6dec5cfa7f475c","webpackCompilationHash":"abbc32fa0c65a814f292","result":{"data":{"siteConfig":{"title":"812lcl's Blog","commentDisqusShortname":"812lcl-notion-blog","commentOpen":true},"posts":{"public_date":"2013-10-29","name":"Octopress添加统计与SEO","tags":["Octopress","Blog","SEO"],"html":"<div data-block-id=\"81ab82f3-d4e0-4e93-8d78-21a90d47641e\" class=\"notion-selectable notion-text-block\" style=\"width: 100%; max-width: 608px; margin-top: 2px; margin-bottom: 1px;\"><div style=\"color: inherit; fill: inherit;\"><div style=\"display: flex;\"><div contenteditable=\"false\" spellcheck=\"true\" placeholder=\" \" data-root=\"true\" style=\"max-width: 100%; width: 100%; white-space: pre-wrap; word-break: break-word; caret-color: rgb(55, 53, 47); padding: 3px 2px;\">博客建好了，文章写出来，当然希望有人能看到，而且希望更多的人看到，这就需要让自己的博客可以在搜索引擎里面检索到，自己搭建的博客不像在CSDN、博客园写的文章，因为你的博客还没有被提交到搜索引擎，让它来抓取你，所以首先要到各个搜索引擎提交自己的博客地址。</div></div></div></div><div data-block-id=\"f2d656c1-82a5-4995-9a26-dd96c695bd21\" class=\"notion-selectable notion-text-block\" style=\"width: 100%; max-width: 608px; margin-top: 1px; margin-bottom: 1px;\"><div style=\"color: inherit; fill: inherit;\"><div style=\"display: flex;\"><div contenteditable=\"false\" spellcheck=\"true\" placeholder=\" \" data-root=\"true\" style=\"max-width: 100%; width: 100%; white-space: pre-wrap; word-break: break-word; caret-color: rgb(55, 53, 47); padding: 3px 2px;\">http://urlc.cn/tool/addurl.html</div></div></div></div><div data-block-id=\"8079f108-07a6-4a5b-9ab9-110e847657ac\" class=\"notion-selectable notion-text-block\" style=\"width: 100%; max-width: 608px; margin-top: 1px; margin-bottom: 1px;\"><div style=\"color: inherit; fill: inherit;\"><div style=\"display: flex;\"><div contenteditable=\"false\" spellcheck=\"true\" placeholder=\" \" data-root=\"true\" style=\"max-width: 100%; width: 100%; white-space: pre-wrap; word-break: break-word; caret-color: rgb(55, 53, 47); padding: 3px 2px;\">http://tool.lusongsong.com/addurl.html</div></div></div></div><div data-block-id=\"d2213a83-7f61-4e68-8ba0-9c72f852f35f\" class=\"notion-selectable notion-text-block\" style=\"width: 100%; max-width: 608px; margin-top: 1px; margin-bottom: 1px;\"><div style=\"color: inherit; fill: inherit;\"><div style=\"display: flex;\"><div contenteditable=\"false\" spellcheck=\"true\" placeholder=\" \" data-root=\"true\" style=\"max-width: 100%; width: 100%; white-space: pre-wrap; word-break: break-word; caret-color: rgb(55, 53, 47); padding: 3px 2px;\">提交到搜索引擎了，能搜索到你的文章了，你还需要做的是为你的网站、文章添加描述信息、关键字，来帮助用户准确的搜索到你的文章。关键字和描述是指网页head部分的元标签meta，是给搜索引擎看的，以此希望用户可以比较容易找到。</div></div></div></div><div data-block-id=\"ac2cde7b-86be-46c8-9db4-8a38a4fc5c55\" class=\"notion-selectable notion-text-block\" style=\"width: 100%; max-width: 608px; margin-top: 1px; margin-bottom: 1px;\"><div style=\"color: inherit; fill: inherit;\"><div style=\"display: flex;\"><div contenteditable=\"false\" spellcheck=\"true\" placeholder=\" \" data-root=\"true\" style=\"max-width: 100%; width: 100%; white-space: pre-wrap; word-break: break-word; caret-color: rgb(55, 53, 47); padding: 3px 2px;\">首先为你的每篇文章添加描述和关键字，本文的文件头如下：</div></div></div></div><div data-block-id=\"c37c798c-eda0-432e-81f8-0fd3d9ced48a\" class=\"notion-selectable notion-code-block\" style=\"width: 100%; max-width: 608px; margin-top: 4px; margin-bottom: 4px;\"><div style=\"display: flex;\"><div style=\"flex-grow: 1; border-radius: 3px; text-align: left; position: relative; background: rgb(247, 246, 243); min-width: 0px; width: 100%;\"><div class=\"line-numbers notion-code-block\" style=\"display: flex; overflow-x: auto;\"><div contenteditable=\"false\" spellcheck=\"false\" autocorrect=\"off\" autocapitalize=\"off\" data-root=\"true\" style=\"flex-grow: 1; flex-shrink: 1; text-align: left; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; font-size: 85%; tab-size: 2; padding: 30px 16px 30px 20px; min-height: 1em; color: rgb(55, 53, 47); white-space: pre;\">---\nlayout: post\ntitle: \"Octopress添加统计与SEO\"\ndate: \"2013-10-29\"\ncomments: true\ncategories: Octopress\ntags: [octopress, 博客, SEO]\nkeywords: seo, octopress, analytics, 站内搜索\ndescription: 为Octopress添加统计工具及SEO技巧\n---<span>\n</span></div></div><div style=\"position: absolute; top: 0px; right: 0px; color: rgba(55, 53, 47, 0.6); display: flex; align-items: center; justify-content: flex-end; height: 30px;\"></div><div style=\"position: absolute; bottom: 0px; right: 0px; color: rgba(55, 53, 47, 0.6); display: flex; align-items: center; justify-content: flex-end; height: 30px;\"><div role=\"button\" aria-disabled=\"true\" tabindex=\"-1\" style=\"user-select: none; transition: background 120ms ease-in 0s; display: inline-flex; align-items: center; white-space: nowrap; height: 20px; border-radius: 3px; font-size: 12px; line-height: 1.2; padding-left: 5px; padding-right: 5px; color: rgba(55, 53, 47, 0.6); margin-right: 5px;\">Plain Text<svg viewBox=\"0 0 30 30\" class=\"chevronDown\" style=\"width: 10px; height: 100%; display: block; fill: rgba(55, 53, 47, 0.3); flex-shrink: 0; backface-visibility: hidden; margin-left: 4px;\"><polygon points=\"15,17.4 4.8,7 2,9.8 15,23 28,9.8 25.2,7 \"></polygon></svg></div></div></div></div></div><div data-block-id=\"529a4ec6-2bd0-43c8-b60f-72c24b55907b\" class=\"notion-selectable notion-text-block\" style=\"width: 100%; max-width: 608px; margin-top: 1px; margin-bottom: 1px;\"><div style=\"color: inherit; fill: inherit;\"><div style=\"display: flex;\"><div contenteditable=\"false\" spellcheck=\"true\" placeholder=\" \" data-root=\"true\" style=\"max-width: 100%; width: 100%; white-space: pre-wrap; word-break: break-word; caret-color: rgb(55, 53, 47); padding: 3px 2px;\">这样就可以为你的文章添加关键字和描述，使搜索引擎更容易搜到你的文章。你还可以 为你的博客首页添加描述和关键字，在<span style=\"font-family:&quot;SFMono-Regular&quot;, Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace;line-height:normal;background:rgba(135,131,120,0.15);color:#EB5757;border-radius:3px;font-size:85%;padding:0.2em 0.4em\" data-token-index=\"1\">source/index.html</span>文件顶部添加即可，方法 如上。</div></div></div></div><div data-block-id=\"a8fbb904-c3f8-48fe-9cde-3d65232f2452\" class=\"notion-selectable notion-text-block\" style=\"width: 100%; max-width: 608px; margin-top: 1px; margin-bottom: 1px;\"><div style=\"color: inherit; fill: inherit;\"><div style=\"display: flex;\"><div contenteditable=\"false\" spellcheck=\"true\" placeholder=\" \" data-root=\"true\" style=\"max-width: 100%; width: 100%; white-space: pre-wrap; word-break: break-word; caret-color: rgb(55, 53, 47); padding: 3px 2px;\">如果你没有为文章添加描述，octopress会自动以文章的前150个字符作为描述，以为 每一篇文章都添加描述，octopress模板实现以上功能的代码在<span style=\"font-family:&quot;SFMono-Regular&quot;, Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace;line-height:normal;background:rgba(135,131,120,0.15);color:#EB5757;border-radius:3px;font-size:85%;padding:0.2em 0.4em\" data-token-index=\"1\">source/_includes/head.html</span>中： {% raw %}</div></div></div></div><div data-block-id=\"8513ad89-395e-478c-b9e7-4a4aeeb4c9a1\" class=\"notion-selectable notion-code-block\" style=\"width: 100%; max-width: 608px; margin-top: 4px; margin-bottom: 4px;\"><div style=\"display: flex;\"><div style=\"flex-grow: 1; border-radius: 3px; text-align: left; position: relative; background: rgb(247, 246, 243); min-width: 0px; width: 100%;\"><div class=\"line-numbers notion-code-block\" style=\"display: flex; overflow-x: auto;\"><div contenteditable=\"false\" spellcheck=\"false\" autocorrect=\"off\" autocapitalize=\"off\" data-root=\"true\" style=\"flex-grow: 1; flex-shrink: 1; text-align: left; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; font-size: 85%; tab-size: 2; padding: 30px 16px 30px 20px; min-height: 1em; color: rgb(55, 53, 47); white-space: pre;\">{% capture description %}{% if page.description %}{{ page.description }}{% else %}{{ content | raw_content }}{% endif %}{% endcapture %}&lt;meta name=\"description\" content=\"{{ description | strip_html | condense_spaces | truncate:150 }}\"&gt;{% if page.keywords %}&lt;meta name=\"keywords\" content=\"{{ page.keywords }}\"&gt;{% endif %}<span>\n</span></div></div><div style=\"position: absolute; top: 0px; right: 0px; color: rgba(55, 53, 47, 0.6); display: flex; align-items: center; justify-content: flex-end; height: 30px;\"></div><div style=\"position: absolute; bottom: 0px; right: 0px; color: rgba(55, 53, 47, 0.6); display: flex; align-items: center; justify-content: flex-end; height: 30px;\"><div role=\"button\" aria-disabled=\"true\" tabindex=\"-1\" style=\"user-select: none; transition: background 120ms ease-in 0s; display: inline-flex; align-items: center; white-space: nowrap; height: 20px; border-radius: 3px; font-size: 12px; line-height: 1.2; padding-left: 5px; padding-right: 5px; color: rgba(55, 53, 47, 0.6); margin-right: 5px;\">Plain Text<svg viewBox=\"0 0 30 30\" class=\"chevronDown\" style=\"width: 10px; height: 100%; display: block; fill: rgba(55, 53, 47, 0.3); flex-shrink: 0; backface-visibility: hidden; margin-left: 4px;\"><polygon points=\"15,17.4 4.8,7 2,9.8 15,23 28,9.8 25.2,7 \"></polygon></svg></div></div></div></div></div><div data-block-id=\"9a497cc9-85b3-4d78-9792-d992094afabb\" class=\"notion-selectable notion-text-block\" style=\"width: 100%; max-width: 608px; margin-top: 1px; margin-bottom: 1px;\"><div style=\"color: inherit; fill: inherit;\"><div style=\"display: flex;\"><div contenteditable=\"false\" spellcheck=\"true\" placeholder=\" \" data-root=\"true\" style=\"max-width: 100%; width: 100%; white-space: pre-wrap; word-break: break-word; caret-color: rgb(55, 53, 47); padding: 3px 2px;\">此外，也可以在<span style=\"font-family:&quot;SFMono-Regular&quot;, Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace;line-height:normal;background:rgba(135,131,120,0.15);color:#EB5757;border-radius:3px;font-size:85%;padding:0.2em 0.4em\" data-token-index=\"1\">_config.yml</span>里添加默认的<span style=\"font-family:&quot;SFMono-Regular&quot;, Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace;line-height:normal;background:rgba(135,131,120,0.15);color:#EB5757;border-radius:3px;font-size:85%;padding:0.2em 0.4em\" data-token-index=\"3\">description</span>和<span style=\"font-family:&quot;SFMono-Regular&quot;, Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace;line-height:normal;background:rgba(135,131,120,0.15);color:#EB5757;border-radius:3px;font-size:85%;padding:0.2em 0.4em\" data-token-index=\"5\">keywords</span>。</div></div></div></div><div data-block-id=\"6cb140ab-322b-47da-94d8-9fafc1881d58\" class=\"notion-selectable notion-sub_header-block\" style=\"width: 100%; max-width: 608px; margin-top: 1.4em; margin-bottom: 1px; color: rgb(55, 53, 47);\"><div style=\"display: flex; width: 100%; font-weight: 600; font-size: 1.5em; line-height: 1.3; color: inherit; fill: inherit;\"><div contenteditable=\"false\" spellcheck=\"true\" placeholder=\"Heading 2\" data-root=\"true\" style=\"max-width: 100%; width: 100%; white-space: pre-wrap; word-break: break-word; caret-color: rgb(55, 53, 47); padding: 3px 2px;\">统计工具</div></div></div><div data-block-id=\"0e06521e-b905-4027-aae6-b5b3915bdb41\" class=\"notion-selectable notion-text-block\" style=\"width: 100%; max-width: 608px; margin-top: 1px; margin-bottom: 1px;\"><div style=\"color: inherit; fill: inherit;\"><div style=\"display: flex;\"><div contenteditable=\"false\" spellcheck=\"true\" placeholder=\" \" data-root=\"true\" style=\"max-width: 100%; width: 100%; white-space: pre-wrap; word-break: break-word; caret-color: rgb(55, 53, 47); padding: 3px 2px;\">octopress模板里面默认带了Google Analytics工具，只需要注册<a href=\"http://www.google.com/analytics/\" style=\"text-decoration:underline;color:inherit;cursor:pointer;word-wrap:break-word\" target=\"_blank\" rel=\"noopener noreferrer\" data-token-index=\"1\">Google Analytics</a>， 获得一个google_analytics_tracking_id，添加到<span style=\"font-family:&quot;SFMono-Regular&quot;, Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace;line-height:normal;background:rgba(135,131,120,0.15);color:#EB5757;border-radius:3px;font-size:85%;padding:0.2em 0.4em\" data-token-index=\"3\">_config.yml</span>中对应位置，并对网站进行验证即可。然后可以通过Google Analytics分析网站的流量了。而且可以使用<a href=\"https://www.google.com/webmasters/tools/home?hl=zh-CN\" style=\"text-decoration:underline;color:inherit;cursor:pointer;word-wrap:break-word\" target=\"_blank\" rel=\"noopener noreferrer\" data-token-index=\"5\">Google站长工具</a>，对网站进行更全面的分析，进行SEO。</div></div></div></div><div data-block-id=\"2370a0ac-b15e-45b9-8ac4-9a9bd864ed6f\" class=\"notion-selectable notion-text-block\" style=\"width: 100%; max-width: 608px; margin-top: 1px; margin-bottom: 1px;\"><div style=\"color: inherit; fill: inherit;\"><div style=\"display: flex;\"><div contenteditable=\"false\" spellcheck=\"true\" placeholder=\" \" data-root=\"true\" style=\"max-width: 100%; width: 100%; white-space: pre-wrap; word-break: break-word; caret-color: rgb(55, 53, 47); padding: 3px 2px;\">对自己的网站进行验证，只需将网站提供的用于验证的代码添加到<span style=\"font-family:&quot;SFMono-Regular&quot;, Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace;line-height:normal;background:rgba(135,131,120,0.15);color:#EB5757;border-radius:3px;font-size:85%;padding:0.2em 0.4em\" data-token-index=\"1\">source/_includes/head.html</span>的<span style=\"font-family:&quot;SFMono-Regular&quot;, Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace;line-height:normal;background:rgba(135,131,120,0.15);color:#EB5757;border-radius:3px;font-size:85%;padding:0.2em 0.4em\" data-token-index=\"3\">&lt;head&gt;</span>标签之间，网站部署到网上后，过几分钟即可验证通过，其他需要验证的也同样操作。</div></div></div></div><div data-block-id=\"81b4dcf0-020e-48fe-9b8d-ab9620a2dbf4\" class=\"notion-selectable notion-text-block\" style=\"width: 100%; max-width: 608px; margin-top: 1px; margin-bottom: 1px;\"><div style=\"color: inherit; fill: inherit;\"><div style=\"display: flex;\"><div contenteditable=\"false\" spellcheck=\"true\" placeholder=\" \" data-root=\"true\" style=\"max-width: 100%; width: 100%; white-space: pre-wrap; word-break: break-word; caret-color: rgb(55, 53, 47); padding: 3px 2px;\">除了Google的统计工具，还有就是国内使用很广的<a href=\"http://zhanzhang.cnzz.com/\" style=\"text-decoration:underline;color:inherit;cursor:pointer;word-wrap:break-word\" target=\"_blank\" rel=\"noopener noreferrer\" data-token-index=\"1\">CNZZ</a>了，注册后，添加并验证你的网站就可以添加统计代码了，选好自己喜欢的样式，获得代码，可添加到<span style=\"font-family:&quot;SFMono-Regular&quot;, Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace;line-height:normal;background:rgba(135,131,120,0.15);color:#EB5757;border-radius:3px;font-size:85%;padding:0.2em 0.4em\" data-token-index=\"3\">source/_includes/custom/footer.html</span>中。即可查看每天你的博客的流量，进行相应的优化了。</div></div></div></div><div data-block-id=\"dbf8350c-a403-49df-9351-67df37f39b4d\" class=\"notion-selectable notion-text-block\" style=\"width: 100%; max-width: 608px; margin-top: 1px; margin-bottom: 1px;\"><div style=\"color: inherit; fill: inherit;\"><div style=\"display: flex;\"><div contenteditable=\"false\" spellcheck=\"true\" placeholder=\" \" data-root=\"true\" style=\"max-width: 100%; width: 100%; white-space: pre-wrap; word-break: break-word; caret-color: rgb(55, 53, 47); padding: 3px 2px;\">最后还要提的就是<a href=\"http://zhanzhang.baidu.com/site/index\" style=\"text-decoration:underline;color:inherit;cursor:pointer;word-wrap:break-word\" target=\"_blank\" rel=\"noopener noreferrer\" data-token-index=\"1\">百度站长工具</a>和<a href=\"http://tongji.baidu.com/web/welcome/login\" style=\"text-decoration:underline;color:inherit;cursor:pointer;word-wrap:break-word\" target=\"_blank\" rel=\"noopener noreferrer\" data-token-index=\"3\">百度统计了</a>，方法和CNZZ方法类似，统计代码也可以添加到<span style=\"font-family:&quot;SFMono-Regular&quot;, Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace;line-height:normal;background:rgba(135,131,120,0.15);color:#EB5757;border-radius:3px;font-size:85%;padding:0.2em 0.4em\" data-token-index=\"5\">source/_includes/custom/footer.html</span>中。但是我发现似乎百度统计并不太准确，并且百度很难搜的到我的博客。</div></div></div></div><div data-block-id=\"77796b3e-a048-4535-bccd-cd62801edcd2\" class=\"notion-selectable notion-text-block\" style=\"width: 100%; max-width: 608px; margin-top: 1px; margin-bottom: 1px;\"><div style=\"color: inherit; fill: inherit;\"><div style=\"display: flex;\"><div contenteditable=\"false\" spellcheck=\"true\" placeholder=\" \" data-root=\"true\" style=\"max-width: 100%; width: 100%; white-space: pre-wrap; word-break: break-word; caret-color: rgb(55, 53, 47); padding: 3px 2px;\">我的统计代码添加如下，包括百度统计和CNZZ： {% raw %}</div></div></div></div><div data-block-id=\"3f870d41-5294-4974-b31e-f1fa5953f2ab\" class=\"notion-selectable notion-code-block\" style=\"width: 100%; max-width: 608px; margin-top: 4px; margin-bottom: 4px;\"><div style=\"display: flex;\"><div style=\"flex-grow: 1; border-radius: 3px; text-align: left; position: relative; background: rgb(247, 246, 243); min-width: 0px; width: 100%;\"><div class=\"line-numbers notion-code-block\" style=\"display: flex; overflow-x: auto;\"><div contenteditable=\"false\" spellcheck=\"false\" autocorrect=\"off\" autocapitalize=\"off\" data-root=\"true\" style=\"flex-grow: 1; flex-shrink: 1; text-align: left; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; font-size: 85%; tab-size: 2; padding: 30px 16px 30px 20px; min-height: 1em; color: rgb(55, 53, 47); white-space: pre;\">&lt;p&gt;Copyright &amp;copy; {{ site.time | date: \"\"%Y\"\"&lt;span class=\"credit\"&gt;Powered by&lt;a href=\"http://octopress.org\"&gt;Octopress&lt;/a&gt;&lt;/span&gt;&lt;script type=\"text/javascript\"&gt;var _bdhmProtocol = ((\"https:\" == document.location.protocol) ? \" https://\" : \" http://\");document.write(unescape(\"%3Cscript src='\" + _bdhmProtocol + \"hm.baidu.com/h.js%3F25fb42e16458b238f8da9ba05d6b9d4d' type='text/javascript'%3E%3C/script%3E\"));&lt;/script&gt;&lt;script type=\"text/javascript\"&gt;var cnzz_protocol = ((\"https:\" == document.location.protocol) ? \" https://\" : \" http://\");document.write(unescape(\"%3Cspan id='cnzz_stat_icon_1000106316'%3E%3C/span%3E%3Cscript src='\" + cnzz_protocol + \"s22.cnzz.com/z_stat.php%3Fid%3D1000106316%26show%3Dpic' type='text/javascript'%3E%3C/script%3E\"));&lt;/script&gt;&lt;/p&gt;<span>\n</span></div></div><div style=\"position: absolute; top: 0px; right: 0px; color: rgba(55, 53, 47, 0.6); display: flex; align-items: center; justify-content: flex-end; height: 30px;\"></div><div style=\"position: absolute; bottom: 0px; right: 0px; color: rgba(55, 53, 47, 0.6); display: flex; align-items: center; justify-content: flex-end; height: 30px;\"><div role=\"button\" aria-disabled=\"true\" tabindex=\"-1\" style=\"user-select: none; transition: background 120ms ease-in 0s; display: inline-flex; align-items: center; white-space: nowrap; height: 20px; border-radius: 3px; font-size: 12px; line-height: 1.2; padding-left: 5px; padding-right: 5px; color: rgba(55, 53, 47, 0.6); margin-right: 5px;\">Plain Text<svg viewBox=\"0 0 30 30\" class=\"chevronDown\" style=\"width: 10px; height: 100%; display: block; fill: rgba(55, 53, 47, 0.3); flex-shrink: 0; backface-visibility: hidden; margin-left: 4px;\"><polygon points=\"15,17.4 4.8,7 2,9.8 15,23 28,9.8 25.2,7 \"></polygon></svg></div></div></div></div></div><div data-block-id=\"457f70ca-9248-42d9-8fef-ac27deef7289\" class=\"notion-selectable notion-sub_header-block\" style=\"width: 100%; max-width: 608px; margin-top: 1.4em; margin-bottom: 1px; color: rgb(55, 53, 47);\"><div style=\"display: flex; width: 100%; font-weight: 600; font-size: 1.5em; line-height: 1.3; color: inherit; fill: inherit;\"><div contenteditable=\"false\" spellcheck=\"true\" placeholder=\"Heading 2\" data-root=\"true\" style=\"max-width: 100%; width: 100%; white-space: pre-wrap; word-break: break-word; caret-color: rgb(55, 53, 47); padding: 3px 2px;\">摘要和语法高亮</div></div></div><div data-block-id=\"a1e43a86-74a6-41c3-b649-969fa5f17599\" class=\"notion-selectable notion-text-block\" style=\"width: 100%; max-width: 608px; margin-top: 1px; margin-bottom: 1px;\"><div style=\"color: inherit; fill: inherit;\"><div style=\"display: flex;\"><div contenteditable=\"false\" spellcheck=\"true\" placeholder=\" \" data-root=\"true\" style=\"max-width: 100%; width: 100%; white-space: pre-wrap; word-break: break-word; caret-color: rgb(55, 53, 47); padding: 3px 2px;\">如果想让文章在首页只显示一部分，只需要在文章中相应的位置添加<span style=\"font-family:&quot;SFMono-Regular&quot;, Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace;line-height:normal;background:rgba(135,131,120,0.15);color:#EB5757;border-radius:3px;font-size:85%;padding:0.2em 0.4em\" data-token-index=\"1\">&lt;!-- more --&gt;</span>即可，在<span style=\"font-family:&quot;SFMono-Regular&quot;, Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace;line-height:normal;background:rgba(135,131,120,0.15);color:#EB5757;border-radius:3px;font-size:85%;padding:0.2em 0.4em\" data-token-index=\"3\">_config.yml</span>中修改<span style=\"font-family:&quot;SFMono-Regular&quot;, Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace;line-height:normal;background:rgba(135,131,120,0.15);color:#EB5757;border-radius:3px;font-size:85%;padding:0.2em 0.4em\" data-token-index=\"5\">excerpt_link: \"继续阅读 &amp;rarr;\"</span>来修改继续阅读按钮的显示内容。</div></div></div></div><div data-block-id=\"f07c7285-d036-4eb5-89ec-627bd590622f\" class=\"notion-selectable notion-text-block\" style=\"width: 100%; max-width: 608px; margin-top: 1px; margin-bottom: 1px;\"><div style=\"color: inherit; fill: inherit;\"><div style=\"display: flex;\"><div contenteditable=\"false\" spellcheck=\"true\" placeholder=\" \" data-root=\"true\" style=\"max-width: 100%; width: 100%; white-space: pre-wrap; word-break: break-word; caret-color: rgb(55, 53, 47); padding: 3px 2px;\">octopress自带了语法高亮功能，使用的是<span style=\"font-family:&quot;SFMono-Regular&quot;, Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace;line-height:normal;background:rgba(135,131,120,0.15);color:#EB5757;border-radius:3px;font-size:85%;padding:0.2em 0.4em\" data-token-index=\"1\">pygements.rb</span>，使用方法见<a href=\"http://octopress.org/docs/plugins/backtick-codeblock/\" style=\"text-decoration:underline;color:inherit;cursor:pointer;word-wrap:break-word\" target=\"_blank\" rel=\"noopener noreferrer\" data-token-index=\"3\">Backtick Code Blocks</a>，支持的语言见<a href=\"http://pygments.org/docs/lexers/\" style=\"text-decoration:underline;color:inherit;cursor:pointer;word-wrap:break-word\" target=\"_blank\" rel=\"noopener noreferrer\" data-token-index=\"5\">Supported languages</a>。</div></div></div></div><div data-block-id=\"2ec7427e-2ea9-43a6-8b5b-c6085104b551\" class=\"notion-selectable notion-text-block\" style=\"width: 100%; max-width: 608px; margin-top: 1px; margin-bottom: 1px;\"><div style=\"color: inherit; fill: inherit;\"><div style=\"display: flex;\"><div contenteditable=\"false\" spellcheck=\"true\" placeholder=\" \" data-root=\"true\" style=\"max-width: 100%; width: 100%; white-space: pre-wrap; word-break: break-word; caret-color: rgb(55, 53, 47); padding: 3px 2px;\">其他方法见<a href=\"http://octopress.org/docs/plugins/include-code/\" style=\"text-decoration:underline;color:inherit;cursor:pointer;word-wrap:break-word\" target=\"_blank\" rel=\"noopener noreferrer\" data-token-index=\"1\">embed code from a file</a>、<a href=\"http://octopress.org/docs/plugins/gist-tag/\" style=\"text-decoration:underline;color:inherit;cursor:pointer;word-wrap:break-word\" target=\"_blank\" rel=\"noopener noreferrer\" data-token-index=\"3\">embed GitHub gists</a>或<a href=\"http://xiongbupt.github.io/blog/2012/06/08/octopressdai-ma-gao-liang/\" style=\"text-decoration:underline;color:inherit;cursor:pointer;word-wrap:break-word\" target=\"_blank\" rel=\"noopener noreferrer\" data-token-index=\"5\">Octopress代码高亮</a>。</div></div></div></div><div data-block-id=\"67f378b8-53d1-4b28-acc2-9bd6891e1a6f\" class=\"notion-selectable notion-sub_header-block\" style=\"width: 100%; max-width: 608px; margin-top: 1.4em; margin-bottom: 1px; color: rgb(55, 53, 47);\"><div style=\"display: flex; width: 100%; font-weight: 600; font-size: 1.5em; line-height: 1.3; color: inherit; fill: inherit;\"><div contenteditable=\"false\" spellcheck=\"true\" placeholder=\"Heading 2\" data-root=\"true\" style=\"max-width: 100%; width: 100%; white-space: pre-wrap; word-break: break-word; caret-color: rgb(55, 53, 47); padding: 3px 2px;\">站内搜索</div></div></div><div data-block-id=\"1bfe05af-5698-4eac-9011-d8dc44fc2595\" class=\"notion-selectable notion-text-block\" style=\"width: 100%; max-width: 608px; margin-top: 1px; margin-bottom: 1px;\"><div style=\"color: inherit; fill: inherit;\"><div style=\"display: flex;\"><div contenteditable=\"false\" spellcheck=\"true\" placeholder=\" \" data-root=\"true\" style=\"max-width: 100%; width: 100%; white-space: pre-wrap; word-break: break-word; caret-color: rgb(55, 53, 47); padding: 3px 2px;\">最后，还有一点我想实现但却始终没实现了的功能，就是站内搜索。octopress自带了google的搜索，在搜索栏中搜索后，相当于在google中指定搜索域为你的博客进行搜索，然后跳到Google页面，虽然能搜到你博客中的相关内容，但是作为有强迫症的我认为这和整个博客风格不太符。我想实现的效果是如<a href=\"http://yortz.it/about\" style=\"text-decoration:underline;color:inherit;cursor:pointer;word-wrap:break-word\" target=\"_blank\" rel=\"noopener noreferrer\" data-token-index=\"1\">这个博客</a>所实现的站内搜索一样。这就需要使用<a href=\"https://github.com/yortz/octopress-lunr-js-search\" style=\"text-decoration:underline;color:inherit;cursor:pointer;word-wrap:break-word\" target=\"_blank\" rel=\"noopener noreferrer\" data-token-index=\"3\">Octopress Lunr.js plugin</a>，但我安装安装方法试验了好几次，还是没有成功。</div></div></div></div><div data-block-id=\"7284893f-7f6d-43f3-b3b9-7735b488a803\" class=\"notion-selectable notion-text-block\" style=\"width: 100%; max-width: 608px; margin-top: 1px; margin-bottom: 1px;\"><div style=\"color: inherit; fill: inherit;\"><div style=\"display: flex;\"><div contenteditable=\"false\" spellcheck=\"true\" placeholder=\" \" data-root=\"true\" style=\"max-width: 100%; width: 100%; white-space: pre-wrap; word-break: break-word; caret-color: rgb(55, 53, 47); padding: 3px 2px;\">如果谁安装成功了，还希望指点我一下。</div></div></div></div><div data-block-id=\"48be9a33-2528-418e-b731-1117036e4576\" class=\"notion-selectable notion-divider-block\" style=\"width: 100%; max-width: 608px; margin-top: 1px; margin-bottom: 1px;\"><div class=\"notion-cursor-default\" style=\"display: flex; align-items: center; justify-content: center; pointer-events: auto; width: 100%; height: 13px; flex: 0 0 auto; color: rgb(228, 227, 226);\"><div style=\"width: 100%; height: 1px; visibility: visible; border-bottom: 1px solid rgba(55, 53, 47, 0.09);\"></div></div></div><div data-block-id=\"164b54c0-693b-428a-812e-0985a76570ef\" class=\"notion-selectable notion-text-block\" style=\"width: 100%; max-width: 608px; margin-top: 1px; margin-bottom: 1px;\"><div style=\"color: inherit; fill: inherit;\"><div style=\"display: flex;\"><div contenteditable=\"false\" spellcheck=\"true\" placeholder=\" \" data-root=\"true\" style=\"max-width: 100%; width: 100%; white-space: pre-wrap; word-break: break-word; caret-color: rgb(55, 53, 47); padding: 3px 2px;\">好了，关于octopress也写了好几篇文章了，主要想记录一下自己搭建博客的过程，怕自己忘掉，以后再搭还要从头再来。也是刚开始写博客，需要练习的过程，开始虽然写的不好，但坚持下来总是会有收获的。</div></div></div></div><div data-block-id=\"57c4345e-1de1-4ef3-8ded-746d16c44e2a\" class=\"notion-selectable notion-text-block\" style=\"width: 100%; max-width: 608px; margin-top: 1px; margin-bottom: 1px;\"><div style=\"color: inherit; fill: inherit;\"><div style=\"display: flex;\"><div contenteditable=\"false\" spellcheck=\"true\" placeholder=\" \" data-root=\"true\" style=\"max-width: 100%; width: 100%; white-space: pre-wrap; word-break: break-word; caret-color: rgb(55, 53, 47); padding: 3px 2px;\">参考文章：</div></div></div></div><div data-block-id=\"1304331e-c748-4c6b-a7e2-3fe11b4aa1e0\" class=\"notion-selectable notion-bulleted_list-block\" style=\"width: 100%; max-width: 608px; margin-top: 1px; margin-bottom: 1px;\"><div style=\"display: flex; align-items: flex-start; width: 100%; padding-left: 2px; color: inherit; fill: inherit;\"><div style=\"margin-right: 4px; width: 24px; display: flex; align-items: center; justify-content: center; flex-grow: 0; flex-shrink: 0; min-height: calc((1.5em + 3px) + 3px); padding-right: 2px;\"><div style=\"width: 6px; height: 6px; border-radius: 6px; background: currentcolor; margin-top: 0.1em;\"></div></div><div style=\"flex: 1 1 0px; min-width: 1px; display: flex; flex-direction: column;\"><div style=\"display: flex;\"><div contenteditable=\"false\" spellcheck=\"true\" placeholder=\"List\" data-root=\"true\" style=\"max-width: 100%; width: 100%; white-space: pre-wrap; word-break: break-word; caret-color: rgb(55, 53, 47); padding-top: 3px; padding-bottom: 3px; text-align: left;\"><a href=\"http://codemacro.com/2012/09/06/octopress-seo/\" style=\"text-decoration:underline;color:inherit;cursor:pointer;word-wrap:break-word\" target=\"_blank\" rel=\"noopener noreferrer\" data-token-index=\"0\">Octopress中的SEO</a></div></div></div></div></div><div data-block-id=\"4fbd16a0-3c1e-44e8-93c5-e52cdc930c32\" class=\"notion-selectable notion-bulleted_list-block\" style=\"width: 100%; max-width: 608px; margin-top: 1px; margin-bottom: 0px;\"><div style=\"display: flex; align-items: flex-start; width: 100%; padding-left: 2px; color: inherit; fill: inherit;\"><div style=\"margin-right: 4px; width: 24px; display: flex; align-items: center; justify-content: center; flex-grow: 0; flex-shrink: 0; min-height: calc((1.5em + 3px) + 3px); padding-right: 2px;\"><div style=\"width: 6px; height: 6px; border-radius: 6px; background: currentcolor; margin-top: 0.1em;\"></div></div><div style=\"flex: 1 1 0px; min-width: 1px; display: flex; flex-direction: column;\"><div style=\"display: flex;\"><div contenteditable=\"false\" spellcheck=\"true\" placeholder=\"List\" data-root=\"true\" style=\"max-width: 100%; width: 100%; white-space: pre-wrap; word-break: break-word; caret-color: rgb(55, 53, 47); padding-top: 3px; padding-bottom: 3px; text-align: left;\"><a href=\"http://www.cnblogs.com/hswg/archive/2013/01/15/2860952.html\" style=\"text-decoration:underline;color:inherit;cursor:pointer;word-wrap:break-word\" target=\"_blank\" rel=\"noopener noreferrer\" data-token-index=\"0\">Octopress技巧之设置关键字和描述</a></div></div></div></div></div>","slug":"b4d62931e3b3438dab6dec5cfa7f475c","keywords":["博客"]}},"pageContext":{"isCreatedByStatefulCreatePages":false,"slug":"b4d62931e3b3438dab6dec5cfa7f475c"}}}