$ mkdir Blog $ cd Blog $ hexo init INFO Cloning hexo-starter to ~\Desktop\Blog Cloning into 'C:\Users\LouisHsu\Desktop\Blog'... 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 'C:/Users/LouisHsu/Desktop/Blog/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 | 494.00 KiB/s, done. Resolving deltas: 100% (459/459), done. Submodule path 'themes/landscape': checked out '73a23c51f8487cfcd7c6deec96ccc7543960d350' Install dependencies npm WARN deprecated titlecase@1.1.2: no longer maintained npm WARN deprecated postinstall-build@5.0.3: postinstall-build's behavior is now built into npm! You should migrate off of postinstall-build and use the new `prepare` lifecycle script with npm 5.0.0 or greater. > nunjucks@3.1.6 postinstall C:\Users\LouisHsu\Desktop\Blog\node_modules\nunjucks > node postinstall-build.js src
npm notice created a lockfile as package-lock.json. You should commit this file. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
added 422 packages from 501 contributors and audited 4700 packages in 59.195s found 0 vulnerabilities
Commands: clean Remove generated files and cache. config Get or set configurations. deploy Deploy your website. generate Generate static files. help Get help on a command. init Create a new Hexo folder. list List the information of the site migrate Migrate your site from other system to Hexo. new Create a new post. publish Moves a draft post from _drafts to _posts folder. render Render files with renderer plugins. server Start the server. version Display version information.
Global Options: --config Specify config file instead of using _config.yml --cwd Specify the CWD --debug Display all verbose messages in the terminal --draft Display draft posts --safe Disable all plugins and scripts --silent Hide output on console
For more help, you can use 'hexo help [command]' for the detailed information or you can check the docs: http://hexo.io/docs/
拓展功能支持
插入图片
1
$ npm install hexo-asset-image --save
修改文件_config.yml
1
post_asset_folder: true
在执行$ hexo n [layout] <title>时会生成同名文件夹,把图片放在这个文件夹内,在.md文件中插入图片
{% if not (theme.duoshuo and theme.duoshuo.shortname) and not theme.duoshuo_shortname and not theme.disqus_shortname and not theme.hypercomments_id and not theme.gentie_productKey %}
{% if theme.livere_uid %} <script type="text/javascript"> (function(d, s) { var j, e = d.getElementsByTagName(s)[0];
if (typeof LivereTower === 'function') { return; }
# Gitment # Introduction: https://imsun.net/posts/gitment-introduction/ gitment: enable:false mint:true# RECOMMEND, A mint on Gitment, to support count, language and proxy_gateway count:true# Show comments count in post meta area lazy:false# Comments lazy loading with a button cleanly:false# Hide 'Powered by ...' on footer, and more language:# Force language, or auto switch by theme github_user:# MUST HAVE, Your Github Username github_repo:# MUST HAVE, The name of the repo you use to store Gitment comments client_id:# MUST HAVE, Github client id for the Gitment client_secret:# EITHER this or proxy_gateway, Github access secret token for the Gitment proxy_gateway:# Address of api proxy, See: https://github.com/aimingoo/intersect redirect_protocol:# Protocol of redirect_uri with force_redirect_protocol when mint enabled
gitalk: enable: true githubID: # MUST HAVE, Your Github Username repo: # MUST HAVE, The name of the repo you use to store Gitment comments ClientID: # MUST HAVE, Github client id for the Gitment ClientSecret: # EITHER this or proxy_gateway, Github access secret token for the Gitment adminUser: isLouisHsu distractionFreeMode: true