代码拉取完成,页面将自动刷新
Hexo生成个人博客。
软件架构说明:Hexo 读音:[hek so]
theme: landscape
DannideMacBook-Pro:git danni$ git clone https://github.com/ppoffice/hexo-theme-hueman
title: Hexo
author: John Doe
DannideMacBook-Pro:danni3 danni$ hexo new use-hexo INFO Created: ~/work/svn/git/danni3/source/_posts/use-hexo.md
date: 2019-02-09 15:13:52,如果不添加date,就会用当前时间,每天都变。
新启page
hexo new page use-hexo
新启草稿
hexo new draft use-hexo
草稿开发时调试
hexo server --draft
发布草稿到post里
hexo publish draft newpage
关于我
hexo new page about
DannideMacBook-Pro:git danni$ hexo -v
hexo-cli: 1.1.0
os: Darwin 16.0.0 darwin x64
http_parser: 2.8.0
node: 10.13.0
v8: 6.8.275.32-node.36
uv: 1.23.2
zlib: 1.2.11
ares: 1.14.0
modules: 64
nghttp2: 1.34.0
napi: 3
openssl: 1.1.0i
icu: 62.1
unicode: 11.0
cldr: 33.1
tz: 2018e
DannideMacBook-Pro:git danni$ hexo init danni3
FATAL ~/work/svn/git/danni3 not empty, please run `hexo init` on an empty folder and then copy your files into it
FATAL Something's wrong. Maybe you can find the solution here: http://hexo.io/docs/troubleshooting.html
Error: target not empty
at Context.initConsole (/Users/danni/.nodejs/lib/node_modules/hexo-cli/lib/console/init.js:30:27)
at Context.tryCatcher (/Users/danni/.nodejs/lib/node_modules/hexo-cli/node_modules/bluebird/js/release/util.js:16:23)
at Context.<anonymous> (/Users/danni/.nodejs/lib/node_modules/hexo-cli/node_modules/bluebird/js/release/method.js:15:34)
at /Users/danni/.nodejs/lib/node_modules/hexo-cli/lib/context.js:44:9
at Promise._execute (/Users/danni/.nodejs/lib/node_modules/hexo-cli/node_modules/bluebird/js/release/debuggability.js:313:9)
at Promise._resolveFromExecutor (/Users/danni/.nodejs/lib/node_modules/hexo-cli/node_modules/bluebird/js/release/promise.js:483:18)
at new Promise (/Users/danni/.nodejs/lib/node_modules/hexo-cli/node_modules/bluebird/js/release/promise.js:79:10)
at Context.call (/Users/danni/.nodejs/lib/node_modules/hexo-cli/lib/context.js:40:10)
at /Users/danni/.nodejs/lib/node_modules/hexo-cli/lib/hexo.js:68:17
at tryCatcher (/Users/danni/.nodejs/lib/node_modules/hexo-cli/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/Users/danni/.nodejs/lib/node_modules/hexo-cli/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/Users/danni/.nodejs/lib/node_modules/hexo-cli/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/Users/danni/.nodejs/lib/node_modules/hexo-cli/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/Users/danni/.nodejs/lib/node_modules/hexo-cli/node_modules/bluebird/js/release/promise.js:694:18)
at Promise._fulfill (/Users/danni/.nodejs/lib/node_modules/hexo-cli/node_modules/bluebird/js/release/promise.js:638:18)
at Promise._resolveCallback (/Users/danni/.nodejs/lib/node_modules/hexo-cli/node_modules/bluebird/js/release/promise.js:432:57)
DannideMacBook-Pro:danni3 danni$ hexo init myblog
INFO Cloning hexo-starter to ~/work/svn/git/danni3/myblog
Cloning into '/Users/danni/work/svn/git/danni3/myblog'...
remote: Enumerating objects: 68, done.
remote: Total 68 (delta 0), reused 0 (delta 0), pack-reused 68
Unpacking objects: 100% (68/68), done.
Submodule 'themes/landscape' (https://github.com/hexojs/hexo-theme-landscape.git) registered for path 'themes/landscape'
Cloning into '/Users/danni/work/svn/git/danni3/myblog/themes/landscape'...
remote: Enumerating objects: 1, done.
remote: Counting objects: 100% (1/1), done.
remote: Total 867 (delta 0), reused 0 (delta 0), pack-reused 866
Receiving objects: 100% (867/867), 2.55 MiB | 2.00 KiB/s, done.
Resolving deltas: 100% (459/459), done.
Submodule path 'themes/landscape': checked out '73a23c51f8487cfcd7c6deec96ccc7543960d350'
INFO Install dependencies
yarn install v1.12.3
info No lockfile found.
[1/4] 🔍 Resolving packages...
warning hexo > titlecase@1.1.2: no longer maintained
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
[4/4] 📃 Building fresh packages...
success Saved lockfile.
warning Your current version of Yarn is out of date. The latest version is "1.13.0", while you're on "1.12.3".
info To upgrade, run the following command:
$ curl --compressed -o- -L https://yarnpkg.com/install.sh | bash
✨ Done in 26.27s.
INFO Start blogging with Hexo!
DannideMacBook-Pro:danni3 danni$ hexo g
INFO Start processing
INFO Files loaded in 311 ms
INFO Generated: index.html
INFO Generated: archives/index.html
INFO Generated: fancybox/blank.gif
INFO Generated: fancybox/fancybox_loading.gif
INFO Generated: fancybox/jquery.fancybox.css
INFO Generated: fancybox/fancybox_sprite@2x.png
INFO Generated: fancybox/fancybox_overlay.png
INFO Generated: fancybox/fancybox_loading@2x.gif
INFO Generated: archives/2019/02/index.html
INFO Generated: fancybox/fancybox_sprite.png
INFO Generated: archives/2019/index.html
INFO Generated: css/fonts/fontawesome-webfont.eot
INFO Generated: js/script.js
INFO Generated: fancybox/helpers/jquery.fancybox-buttons.js
INFO Generated: fancybox/jquery.fancybox.pack.js
INFO Generated: fancybox/helpers/jquery.fancybox-buttons.css
INFO Generated: fancybox/helpers/jquery.fancybox-media.js
INFO Generated: fancybox/helpers/jquery.fancybox-thumbs.js
INFO Generated: css/style.css
INFO Generated: css/fonts/fontawesome-webfont.woff
INFO Generated: fancybox/helpers/jquery.fancybox-thumbs.css
INFO Generated: fancybox/helpers/fancybox_buttons.png
INFO Generated: css/fonts/FontAwesome.otf
INFO Generated: css/images/banner.jpg
INFO Generated: css/fonts/fontawesome-webfont.svg
INFO Generated: css/fonts/fontawesome-webfont.ttf
INFO Generated: 2019/02/09/hello-world/index.html
INFO Generated: fancybox/jquery.fancybox.js
INFO 28 files generated in 834 ms
DannideMacBook-Pro:danni3 danni$ hexo server
INFO Start processing
INFO Hexo is running at http://localhost:4000 . Press Ctrl+C to stop.
DannideMacBook-Pro:git danni$ git clone https://github.com/ppoffice/hexo-theme-hueman
Cloning into 'hexo-theme-hueman'...
remote: Enumerating objects: 25, done.
remote: Counting objects: 100% (25/25), done.
remote: Compressing objects: 100% (22/22), done.
error: RPC failed; curl 56 SSLRead() return error -9806ytes/s
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
DannideMacBook-Pro:danni3 danni$ hexo server
INFO Start processing
INFO Hexo is running at http://localhost:4000 . Press Ctrl+C to stop.
Unhandled rejection TypeError: /Users/danni/work/svn/git/danni3/themes/hexo-theme-hueman/layout/index.ejs:1
>> 1| <%- partial('common/archive') %>
/Users/danni/work/svn/git/danni3/themes/hexo-theme-hueman/layout/common/archive.ejs:19
17| <div class="article-row">
18| <% } %>
>> 19| <%- partial('summary', { post: post }) %>
20| <% if (postCount == page.posts.length || postCount % 2 == 0) { %>
21| </div>
22| <% } %>
/Users/danni/work/svn/git/danni3/themes/hexo-theme-hueman/layout/common/summary.ejs:3
1| <article class="article article-summary<%= (post.direction && post.direction.toLowerCase() === 'rtl' ? ' rtl' : '') %>">
2| <div class="article-summary-inner">
>> 3| <% if (theme.customize.thumbnail === true) { %>
4| <%- partial('common/thumbnail', { counter: true }) %>
5| <% } %>
6| <div class="article-meta">
Cannot read property 'thumbnail' of undefined
at eval (eval at compile (/Users/danni/work/svn/git/danni3/node_modules/ejs/lib/ejs.js:618:12), <anonymous>:13:28)
at returnedFn (/Users/danni/work/svn/git/danni3/node_modules/ejs/lib/ejs.js:653:17)
at Theme._View.View._compiledSync.locals [as _compiledSync] (/Users/danni/work/svn/git/danni3/node_modules/hexo/lib/theme/view.js:121:22)
at Theme._View.View.View.renderSync (/Users/danni/work/svn/git/danni3/node_modules/hexo/lib/theme/view.js:49:23)
at Object.partial (/Users/danni/work/svn/git/danni3/node_modules/hexo/lib/plugins/helper/partial.js:38:15)
at eval (eval at compile (/Users/danni/work/svn/git/danni3/node_modules/ejs/lib/ejs.js:618:12), <anonymous>:47:17)
at Model._Query.Query.Query.forEach (/Users/danni/work/svn/git/danni3/node_modules/warehouse/lib/query.js:42:5)
at eval (eval at compile (/Users/danni/work/svn/git/danni3/node_modules/ejs/lib/ejs.js:618:12), <anonymous>:12:19)
at returnedFn (/Users/danni/work/svn/git/danni3/node_modules/ejs/lib/ejs.js:653:17)
at Theme._View.View._compiledSync.locals [as _compiledSync] (/Users/danni/work/svn/git/danni3/node_modules/hexo/lib/theme/view.js:121:22)
at Theme._View.View.View.renderSync (/Users/danni/work/svn/git/danni3/node_modules/hexo/lib/theme/view.js:49:23)
at Object.partial (/Users/danni/work/svn/git/danni3/node_modules/hexo/lib/plugins/helper/partial.js:38:15)
at eval (eval at compile (/Users/danni/work/svn/git/danni3/node_modules/ejs/lib/ejs.js:618:12), <anonymous>:9:17)
at returnedFn (/Users/danni/work/svn/git/danni3/node_modules/ejs/lib/ejs.js:653:17)
at Theme._View.View._compiled.locals [as _compiled] (/Users/danni/work/svn/git/danni3/node_modules/hexo/lib/theme/view.js:125:48)
at Theme._View.View.View.render (/Users/danni/work/svn/git/danni3/node_modules/hexo/lib/theme/view.js:30:15)
at route.set (/Users/danni/work/svn/git/danni3/node_modules/hexo/lib/hexo/index.js:394:29)
at tryCatcher (/Users/danni/work/svn/git/danni3/node_modules/bluebird/js/release/util.js:16:23)
at /Users/danni/work/svn/git/danni3/node_modules/bluebird/js/release/method.js:15:34
at RouteStream._read (/Users/danni/work/svn/git/danni3/node_modules/hexo/lib/hexo/router.js:134:3)
at RouteStream.Readable.read (_stream_readable.js:452:10)
at resume_ (_stream_readable.js:899:12)
在footer.ejs的任意地方,我选择中间,拷贝下面代码:
<!--这一段是不蒜子的访问量统计代码-->
<!--http://busuanzi.ibruce.info-->
<!--因七牛强制过期『dn-lbstatics.qbox.me』域名,与客服沟通无果,只能更换域名到『busuanzi.ibruce.info』-->
<!--<script async src="//dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>-->
<script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
<span id="busuanzi_container_site_pv">本站总访问量<span id="busuanzi_value_site_pv"></span>次</span>
<span id="busuanzi_container_site_uv">访客数<span id="busuanzi_value_site_uv"></span>人次</span>
提交到gitee,再访问就会显示:本站总访问量1次 访客数1人次
不蒜子官网:
小蒜子只能简单的显示uv和pv,如果想复杂一点后台管理,用百度统计。
注册百度统计帐号 百度统计-站长版(适合媒体站长用户) 百度统计-客户版(适合百度推广用户) 百度统计-移动统计(适合移动应用开发者)
选择站长版。需要重新注册。如果选择移动统计,则可以用原来百度账号,但只能是移动app使用。
我重新注册,用原来百度的用户名也可以的。因为是不同的东西。
添加你的网址
百度会生成一段专有的代码,粘贴
在header.ejs的</header>
前添加:
<!--百度统计-->
<script>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?d6d5fdb392be5e19c8ec8a36d7a4cb2e";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
检查是否安装成功
百度的检查不是很准确。用这个:
chrome打开,F12,network,刷新一下,有hm.js这个文件即可。 安装成功。
注意:
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。