更新日志
- 2017.3 使用wordpress,由cloudleft(香港)托管,使用gaoyuting.org访问
- 2017.9 存在恶意后门,遭遇攻击,主机商关停访问,自行删除后未能克服,故下架
- 2017.11 迁移使用typecho,由京东云托管,使用blog.makergyt.com访问
- 2018.12 迁移使用hexo ,由github托管,使用makergyt.github.io访问,映射为blog.makergyt.com
- 2019.1 发现百度不会收录github pages,考虑迁移至国内coding,但样式无法加载,暂时放弃迁移
- 2019.4 部署至coding pages,使用memakergytcom.coding.me访问,映射为blog-cn.makergyt.com,百度收录
- 2020.1 部署至新coding pages,使用https://y2ukau.coding-pages.com访问,映射为blog.makergyt.com,放弃github pages(所在地区联通无法访问github,且github现在受到美国出口法律约束,前景不明朗),但移动网络无法访问。
- 2020.2 coding pages不稳定,已经两次出现故障,考虑使用基于腾讯云的serverless
1 Init
1.1 Download
1.1.1 hexo
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| hexo init makergyt.github.io cd makergyt.github.io cnpm install
{ "name": "hexo-site", "version": "0.3.1", "private": true, "hexo": { "version": "4.2.0" }, "dependencies": { "hexo": "^4.2.0", "hexo-generator-archive": "^1.0.0", "hexo-generator-category": "^1.0.0", "hexo-generator-index": "^1.0.0", "hexo-generator-tag": "^1.0.0", "hexo-renderer-ejs": "^1.0.0", "hexo-renderer-marked": "^2.0.0", "hexo-renderer-stylus": "^1.1.0", "hexo-server": "^1.0.0", } }
|
1.1.2 next
1 2
| cd makergyt.github.io git clone https://github.com/theme-next/hexo-theme-next themes/next
|
2 user-defined
2.1 hexo
1 2 3 4 5 6 7 8 9 10 11 12 13
|
title: MakerGYT subtitle: Technology returns to art description: keywords: blog makergyt author: Gao Yuting language: - en timezone: Asia/Shanghai
url: https://blog.makergyt.com
|
file define:
categories
+title
+type
~~
2.1.2 hexo-reference
1 2 3 4
| cnpm install hexo-reference --save
Plugins: - hexo-reference
|
2.2 next
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114
| menu: home: / || chrome about: /about/ || address-card categories: /categories/ || th archives: /archives/ || archive favicon: small: /images/favicon-16x16.png medium: /images/favicon-32x32.png apple_touch_icon: /images/apple-touch-icon.png safari_pinned_tab: /images/safari-pinned-tab.svg ms_browserconfig: /images/browserconfig.xml footer: since: 2018 icon: name: heart animated: true color: "#ff0000" powered: enable: false beian: enable: true icp: 陕ICP备16017712号-1 creative_commons: license: by-nc-sa sidebar: true post: false language: deed.zh github_banner: enable: true permalink: https://github.com/makergyt title: GitHub mobile_layout_economy: true custom_logo: enable: true image: /images/favicon-32x32.png font: enable: true global: family: Monda motion: enable: true transition: post_block: shrinkIn seo: true cheers: false scroll_to_more: true save_scroll: true codeblock: copy_button: enable: true show_result: true style: flat highlight_theme: normal wechat_subscriber: enable: true qcode: /images/wechat-qcode.jpg description: scan to see the vaster world reward_settings: enable: true animation: false comment: Add chicken leg reward: wechat: /images/wechatpay.png related_posts: enable: true social: E-Mail: mailto:me@makergyt.com || envelope Weibo: https://weibo.com/u/5165628041 || weibo Twitter: https://twitter.com/makergyt || twitter FB Page: https://www.facebook.com/makergyt || facebook 500PX: https://500px.com || 500px Telegram: https://t.me/makergyt || telegram social_icons: enable: true icons_only: true links_icon: anchor links: Main site: https://makergyt.com back2top: enable: true sidebar: true scrollpercent: true gitalk: enable: true github_id: makergyt repo: makergyt.github.io client_id: 64a9c28ff540acfb8d4b client_secret: 647cb5af47a926a76f6eb1d1001fe8a5230dd0b0 admin_user: makergyt baidu_analytics: 3af747eaf2360bbaf46d8aa9f5b62d22 reading_progress: enable: true reading_progress: //cdn.jsdelivr.net/gh/theme-next/ theme-next-reading-progress@1.1/reading_progress.min.js canvas_nest: true canvas_nest: //cdn.jsdelivr.net/npm/canvas-nest.js@1.0.1/dist/canvas-nest.min.js math: enable: true per_page: true engine: mathjax mathjax: cdn: //cdn.jsdelivr.net/npm/mathjax@2/MathJax.js?config=TeX-AMS-MML_HTMLorMML note: style: flat pdf: enable: true google_site_verification: XAprdFd37bx8X8i-_S77-8ArPy8hkI5RCtKym1Z52rY bing_site_verification: E14AC9D3BA8CE3C20D05F77EE7BC738F mermaid: enable: true theme: default cdn: //cdn.jsdelivr.net/npm/mermaid@8.0.0/dist/mermaid.min.js
|
2.2.1 404
1 2 3 4 5 6 7
| --- title: 404 date: 1970-01-01 00:00:00 ---
<script src="//qzonestyle.gtimg.cn/qzone/hybrid/app/404/search_children.js" charset="utf-8" homePageUrl="/" homePageName="Back to home"></script>
|
2.2.2 Post Wordcount
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| cnpm install hexo-symbols-count-time --save
symbols_count_time: symbols: true time: true total_symbols: false total_time: false
symbols_count_time: separated_meta: true item_text_post: true item_text_total: false awl: 4 wpm: 275
|
2.2.3 Local Search
1 2 3 4 5 6 7 8 9 10 11 12 13
| cnpm install hexo-generator-searchdb --save
search: path: search.xml field: post format: html limit: 10000
local_search: enable: true fancybox: true fancybox: //cdn.jsdelivr.net/gh/fancyapps/fancybox@3/dist/jquery.fancybox.min.js fancybox_css: //cdn.jsdelivr.net/gh/fancyapps/fancybox@3/dist/jquery.fancybox.min.css
|
2.2.5 encrypt
1 2 3 4 5
| cnpm install --save hexo-blog-encrypt
encrypt: enable: true
|
2.2.6 music
1 2 3 4 5 6 7 8
| {% if theme.music.enabled %} <iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width=330 height=86 src="{{ theme.music.song }}"></iframe> {% endif %}
music: enabled: true song: https://music.163.com/outchain/player?type=2&id=28692687&auto=0&height=66
|
2.2.6.2 page
1 2 3 4 5 6
| cnpm install --save hexo-tag-aplayer
aplayer: meting: true
{% meting "2526283537" "netease" "playlist" "mutex:false" "listmaxheight:340px" "preload:none" "theme:#FC6423"%}
|
2.2.7 Valine
2.2.7.1 部署
2.2.7.2 设置
2.2.7.3 定时任务
https://github.com/zhaojun1998/Valine-Admin
https://github.com/DesertsP/Valine-Admin
https://deserts.io/valine-admin-document/#防止云引擎休眠
Reference
[1] NexT.Gemini.Documentation[EB/OL].https://theme-next.org/docs/ .2019.