EzDevInfo.com

hexo

A fast, simple & powerful blog framework, powered by Node.js. Hexo hexo is a fast, simple & powerful blog framework powered by node.js.

Add Favicon to Hexo Blog

I have made a Hexo blog. I can't however find out where to add the favicon. I have tried adding it to different folders but it isn't being found.

Does anyone know where it should be added or if there is anything else I need to update.


Source: (StackOverflow)

Hexo: How do you change language?

I have read doc below, but didn't get how.
http://hexo.io/docs/localization.html

Anyone knows exacly how ?
I want my blog in either japanese or english.

I tried:

  • set lang: to ja-jp
  • set lang: to en

Source: (StackOverflow)

Advertisements

Repo Setup for Hexo?

I'm finally getting around to migrating my blog to some markdown goodness and hexo seemed to be the best option for me. I seem to be missing something about the workflow from hexo project to github pages though.

Should the hexo project live in one repo and then publish the generated content to a separate pages repo? Or is there some other mechanism (like branching) that should be used?

The former seems to be the most likely but I thought I'd ask first. Sorry if it seem s obvious, I may have confused myself reading about jekyll etc earlier.


Source: (StackOverflow)

Why does Hexo generation take so long?

As file count increases, Hexo spends more and more time generating the static HTML files using 'hexo g'. Why does Hexo reconstruct every single '.md' file, instead of limiting itself to the files modified?

My Hexo version is 3.0.1.


Source: (StackOverflow)

How to get an index number in Hexo article loop "for each"?

In Hexo.js, when you want to output some articles, you loop using .sort, .limit and .each, for example:

<% site.posts.sort('date', 'desc').limit(8).each(function(post){ %>
    <div id="post-1" class="post">
        <%= post.title %>
        all the other post tags and content
    </div>
<% }) %>

How do you set the id number post-X to be dynamically incremented, for example first post would get id="post-1", second id="post-2" and so on?


Source: (StackOverflow)

How to add route for Hexo?

In the theme _config.yml has two default route: / and /archieves. Is there possible to add a route like /about?

I tried to add /about in _config.yml, but Cannot GET /about/ shows.


Source: (StackOverflow)

hexo installation using npm error

Here's my previous quesstion!

So after I created a folder npm in the appdata/roaming directory as people suggeested, I tried to install HEXO with npm using npm install -g hexo

but i am getting an odd error as attached below

http://i58.tinypic.com/f4o22f.png

I won't be able to use hexo version to check the version.

Has anyone experience before?


Source: (StackOverflow)

How can I tell Hexo to ignore a file when creating posts?

In source/_posts I have post.md and post/ directory to hold assets for post.md.

In post/ I have js/main.min.js which is being used in post.md to illustrate something.

Hexo is picking up the main.min.js and creating a post for it. How can I get around this?


Source: (StackOverflow)

github pages access with username.github.io not same with custom domain

I used jekyll before and now I want to use hexo to generate my pages. Well, I changed the username.github.io to jekyll-blog and add a new username.github.io. Now I can see the new blog with username.github.io, But my custome domain oohcode.com still show the old pages. How can I resolve the issue? Tks ~


Source: (StackOverflow)

Deploy nodejs app to heroku

I used https://github.com/tommy351/hexo to create a blog and hope to deploy to heroku

hexo instruction

 Installation

$ npm install hexo -g

Quick Start

Setup your blog

$ hexo init blog
$ cd blog
$ npm install

Start the server

$ hexo server

Create a new post

$ hexo new "Hello Hexo"

Generate static files

$ hexo generate

I created at local and upload the app to heroku and it reported:

Releasing to testApp... ....done, v3

It looks like everything is OK, just confuse how to execute command line such as

hexo ***

on heroku

I executed

heroku run "hexo server"

it always said

bash: hexo: command not found

Source: (StackOverflow)

How to edit CSS and HTML in frameworks such as Hexo using Node.js

I am new to Node.js and decided to try to make a blog website using Hexo. The problem I am having is trying to edit the main style sheet and index files to include a new web font (or any editing in general).

The way I figured it would work is I would make the change and the server would pick it, such as with the /themes folder as stated in the docs. Though this is not the case and it doesn't seem like you can edit the CSS directly.

How do I edit the main CSS and index in such frameworks as these?


Source: (StackOverflow)

How do I escape three backticks surrounded by a codeblock in markdown?

First, I'd like to say that I've read some recommended questions that may seem to answer my question, but they're all about escape single backtick in markdown. I've tried but none of them seem to work.

Here's what I've tried.

1.Double backtick - single space - three backticks.

To avoid any problems, I use image to discribe.

and it seems to be good in my markdown editor except missing the breakline. But bad luck, it seems terrible on hexo blog.

Then I test in Github for luck. And, difference shows. Shown in github.

2.Use backslash.

Unfortunatly, it shows dirrectly instead of escape the backtick.

Now, my question is, it works well here in sof, but not in my blog. What else I should try except using html tag, or is it the only way I should go? Is it the issue with my usage or my blog theme? Thanks in advance.


Source: (StackOverflow)

How do I delete a post in hexo

I am using to write my blog, I meet a trouble that I can not delete a post in blog. I just find create a post in command, but I could not find the delete or drop command. How can I delete a post in properly? What command should I use?

In addition, I push the blog to page. When I delete a post, can the page be changed?


Source: (StackOverflow)

can't display ordered list of markdown

I'am using Hexo to post my blog. I edited my blog by markdown. And I encountered with some problems when I try to use the ordered list and it can't be displayed normally.

Here is my code:

1. first
2. second
 + inner first
 + inner second

However, only disordered list was shown. I would like it was shown as follow: http://7xjj3m.com1.z0.glb.clouddn.com/20150622_0.jpg

but it was follow indeed: http://7xjj3m.com1.z0.glb.clouddn.com/20150622_1.jpg

So, what's the problem?


Source: (StackOverflow)

Embed emberjs application into static site henerator hexo.io

I have an hexo.io application where I'm rendering a lot of html from markdown files. I need to embed an emberjs application into the static html generated files.

Test 1.

  • Use ember build command with --output-path to generate app files to the js include folder for hexo.io
  • Include the files {applicaiton}.js & vendor.js in hexo.io theme template
  • Generate the static html files

Results

  • OK ember js files where loaded correctly
  • Error Uncaught Error: Could not read config from meta tag with name "spa/config/environment".

Test 2.

  • I include the head meta tag from the index.html of the ember-cli app into the template

meta name="spa/config/environment" content="%7B%22modul..."

This is the config enfironment.js url encoded

Results

  • Now I can see the emberjs application detected

DEBUG: -------------------------------

vendor.js:15751 DEBUG: Ember : 1.11.1

vendor.js:15751 DEBUG: Ember Data : 1.0.0-beta.16.1

vendor.js:15751 DEBUG: jQuery : 1.11.3

vendor.js:15751 DEBUG: -------------------------------

(program):66 Ember Inspector Active

  • The ember inspector is note detecting the application
  • This error is also throwed Uncaught UnrecognizedURLError: /stati-file.html

Now I'm stuck on:

  • Fix the UnrecognizedURLError.
  • Properly detect the ember app in ember inspector.
  • How to include the emberjs outlets in my static html files template.

Source: (StackOverflow)