hexo

Hexo笔记

只愿长相守 提交于 2019-12-12 01:08:05
1.安装node.js和npm 1.1检查是否安装/版本号 node -v npm -v git -version 以上会显示出相应的版本,若无则代表未安装。 1.2安装node.js和npm brew install node 以上会自动安装。 2.hexo安装 sudo npm install -g hexo 2.2创建文件夹 mkdir blog cd blog hexo init 此时Macintosh-user(用户)-ckliu(username)目录下将会出现blog文件夹。 2.3生成一套静态网页 hexo g / g=generate 生成一套静态网页 // hexo s // s=server 在服务器上运行 / 此时在浏览器上运行 http://localhost:4000 就可以看到默认配置的hexo网站啦! 2.4撰写博客 终端输入以下 cd blog/ 每次重新进入终端必须重新进入blog目录,否则会弹出 conmand命令介绍 / hexo new poat“我的博客名字” //后期也可以对bolg-source-—post中的md格式博客进行编辑更改 大专栏 Hexo笔记 "3.配置config.yml说明">3.配置config.yml说明 修改config.yml depoly: type : git repo: https://github

How to get a Hexo-built site variables in a pug template?

扶醉桌前 提交于 2019-12-11 16:15:51
问题 I have a Pug template (for what will become the root index.html ) which is supposed to just list the titles of my posts: p first line of the page ul each post in site.posts li= post.title p last line of the page When building the site I get in index.html <p>first line of the page</p> <ul> <li></li> <li></li> </ul> <p>last line of the page</p> I have two posts on this site and the two <li></li> suggest that I iterate over the right variable (and that the variable is known). How can I get the

How to use helpers in Hexo source files?

你离开我真会死。 提交于 2019-12-11 14:00:25
问题 I have an about page called source/about/index.ejs . In this page, I'd like to use the image_tag() helper within ejs tags, and other helper functions. However, if I do, I get the error image_tag is not defined , and the same for any other helper function. I assume this means helpers are not loaded when rendering files in the source , only in the theme directory. It also seems that I can't put this type of page in the them directory and have it render with a template. Is there a way I can use

Deploying Hexo on Azure.. not sure what i'm missing

半城伤御伤魂 提交于 2019-12-11 12:35:58
问题 I recently decided to start a small blog for personal use (for now) on Azure. I started digging into the blogging framework Hexo. Now i got the (first) basics under control with starting a Hexo blog locally, but i want to push it to Azure. I configured a basic web-app with a GIT connection for continuous deployment (https://github.com/lmeijdam/demo-repo). I tried a tutorial with a server.js file package.json .gitignore Above will result in a working response and installed node_modules... But

快速、简洁且高效的博客框架hexo

杀马特。学长 韩版系。学妹 提交于 2019-12-10 23:37:31
https://hexo.io/zh-cn/ Node.js 所带来的超快生成速度,让上百个页面在几秒内瞬间完成渲染 Hexo 支持 GitHub Flavored Markdown 的所有功能,甚至可以整合 Octopress 的大多数插件。 只需一条指令即可部署到 GitHub Pages, Heroku 或其他平台。 强大的 API 带来无限的可能,与数种模板引擎(EJS,Pug,Nunjucks)和工具(Babel,PostCSS,Less/Sass)轻易集成 npm install hexo-cli -g hexo init blog cd blog npm install hexo server 来源: CSDN 作者: 易天海 链接: https://blog.csdn.net/huawuque004/article/details/103483248

How to implement a tabbed codeblock tag for Hexo

好久不见. 提交于 2019-12-10 10:12:02
问题 I am trying to create tabbed code-blocks (as a tag plugin) in hexo but I cannot figure out where to put my js function. I thought I could load the function using the js helper but I don't know where to include the helper. I tried, and failed, to add it into the tag plugin. This is the tag plugin code (saved as testtag.js ): hexo.extend.tag.register('testtag', function(args, content){ var className = args.join(' '); var result = ''; result += "<\%- js('\\themes\\bootstrap-blog\\scripts\\tab.js

Hexo 下 Markdown 的配置与学习

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-10 00:25:25
本篇 更换 Hexo 下的 Markdown 渲染插件 学习 Markdown 基本语法 ✎ 更换 Markdown 渲染插件 ✎ 原因 Hexo 内置的默认渲染插件是 hexo-renderer-marked ,缺少很多功能,比如 GFM (GitHub Flavored Markdown)、上下标、脚注、emoji 等 ✎ hexo-renderer-markdown-it 插件 hexo-renderer-markdown-it 插件支持大量扩展功能,可以实现 Hexo 博客的 footnote 功能。 hexo-renderer-markdown-it ✎ 安装,配置插件 参考 Wiki 文档 先卸载原有的 hexo-renderer-marked 插件 1 $ npm un hexo-renderer-marked --save 安装 hexo-renderer-markdown-it 插件 1 $ npm i hexo-renderer-markdown-it --save 使用 Advanced configuration ,向 站点配置文档 添加 12345678910111213141516171819202122 # Markdown-it config## Docs: https://github.com/celsomiranda/hexo-renderer

安装hexo和基本的使用

不羁岁月 提交于 2019-12-08 15:04:33
搭建个人的博客,在自己的服务器上。用hexo的好处是,所有的博客可以写在markdown文件中,备份在本地,迁移起来很方便。 个人服务器配置 安装node,git curl -sL https://rpm.nodesource.com/setup_10.x | bash - yum install -y nodejs 通过这条命令安装node和npm git我的服务器已经有了。 git --version 可以查看有没有安装git。我的输出 git version 1.8.3.1 使用npm安装Hexo 最好切换为taobao的源,下载的会快一些。 npm config set registry https://registry.npm.taobao.org 验证是否切换成功: npm config get registry 输出淘宝源的地址 https://registry.npm.taobao.org/ ,即切换成功。 安装Hexo npm install -g hexo-cli 验证是否安装成功: hexo version 输出版本信息,则安装成功。 搭建博客 创建博客的目录 hexo init 目录名 。我就在当前目录下创建blog的文件夹作为博客的根目录。 hexo init blog 进入刚刚的目录 cd blog 安装 npm install 第一次启动博客

Hexo 编译时 JS 混乱解决方案

落爺英雄遲暮 提交于 2019-12-06 23:29:27
之前为在 GitHub 博客上写自己的 html 网页,在 hexo 根目录下的 source 文档夹中放了自己的 js 文档,每次 hexo g 后,pubic 文档夹中的 js 文档就混乱了,与自己实际 js 不一致。 解决方案: hexo g 编译后在 public 文档夹中修改,将自己的 js 文档覆盖 hexo 编译后的 js 文档。或者 hexo d 提交到 GitHub 后直接到 GitHub 线上修改 js 文档。 博客中的 js 引用使用外链的形式。如将 js 文档上传 七牛云 ,引用七牛云上的 js。 跳过 hexo 渲染【推荐】。 Hexo 3.0 以下使用: 在主目录下添加 README.md 文档或者 html 文档。 Hexo 3.0 以上支持: 修改 Hexo 主目录下的 _config.yml 配置文档中的 skip_render 参数。 1234567891011skip_render: "test.html" skip_render: test/* skip_render: test/*.md skip_render: test/** skip_render: # 多个文档夹以及其他情况 - test/* - test/*.html 注:若修改配置后不见效果,先执行 hexo clean 后再执行 hexo g 重新编译 原文>> Hexo

hexo + github 搭建个人博客

醉酒当歌 提交于 2019-12-06 16:10:02
搭建一个属于自己的个人博客 验证下载成功: 进入 命令控制符 Win + R 输入 node -v :出现版本号则为正确 输入 npm -v :出现版本号为正确 下载成功:在空白处单击鼠标右键会出现: git bash here 和 git GUI here 拥有自己的github账号 生成SSH 查看自己本机有没有SSH 在终端输入 : ls -al ~/.ssh ​ 存在 id_rsa 和 id_rsa.pub 则本机有SSH 或者在 c盘\用户\你的管理员 中有文件夹 .ssh ,文件夹下存在 id_rsa 和 id_rsa.pub 两个文件,也可证明本机有SSH 本机没有SSH,则需要生成 在终端输入: ssh-keygen -t rsa -C "your_email@example.com" 将 SSH 添加到 github github中点击 settings -> SSH and GPG keys -> New SSH Key 验证: 在终端输入 ssh -T git@github.com 如果成功则出现以下 Warning: Permanently added the RSA host key for IP address '52.74.223.119' to the list of known hosts. Hi serahuli! You've