0%

Blog start-up and settings

Welcome to Mysite!

Hexo Official Reference

Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.

Hexo Tips

Create a new post

1
$ hexo new "My New Post"

More info: Writing

Run server

1
$ hexo server

More info: Server

Generate static files

1
$ hexo generate

More info: Generating

Deploy to remote sites

1
$ hexo deploy

More info: Deployment

References:

Building:

  1. How to build this blog and some small improvements
  2. How to deploy Articles
  3. How to optimize Visualization Performance of Next - 1 - 2
     Tips: only for reference, many method in these two pages are outdate.

Adjusting:

  1. How to activate “tags” and “categories” functions
    Step 1
    Step 2
  2. How to enable the search function in blog
  3. How to add “top” function
     Tips: 1) the value of "top" tag bigger, the rank of article higher
  4. Word count and read time function
  5. Visiting number count function
     Tips: 1) This is an embedded plugin in NexT theme
           2) the homepage of ["busuanzi"](http://ibruce.info/2015/04/04/busuanzi/)
  6. Use Taobao npm to accelerate installation process
  7. How to avoid form error in hexo display

Modifying/Updating:

  1. Use hexo-hey to manage Blog
    hexo-hey github source code page

  2. How to store the images in github repository
    2.1. (Recommand)Use plug-in unit of relative routine / Embedding an image using markdown

    2.1.1. Plug-in unit format: put the image in “source/_post/[your new article’s tile]/“

    1
    {% asset_img [imageFullName] [imamge descirption]] %}

    2.1.2. Embedding an image using markdown: do not have to put the in the specific “public” file because the image there would be automatically generated if you have put the image in the “source/_post/[your new article’s tile]/“

    1
    ![[descirption]]([imageFullName])

    2.2. (Sometimes would fail to load)Use hexo-hey funtion
    Put the image in the “source/images/“: I changed 236th row in file “node_modules/hexo-hey/api.js” with this step and adjust

    1
    filename: hexo.config.url + '/' + req.file.filename

    to

    1
    filename: '/' + req.file.filename

    So, I could use the format below:

    1
    ![[descirption]](/images/[imageFullName])
  3. How to preview pdf files in Blog
    Github: Hexo-pdf
    Use object tag & asset_floder to load pdf

    1
    2
    <object data="./[pdfFullName]" type="application/pdf" width="100%" height="800px"></object>
    <object data="[previewURL]" type="application/pdf" width="100%" height="800px"></object>
     Tips: 1) set height as specific px but not percentage.
           2) use local reference first, because URL need much more time to load.
           3) if you want to insert a pdf file in "about" page, you should put the file directly in "source/about/"
  4. How to use encrypt function for specific articles

     Tips: 1) download of hexo-blog-encrypt may fail using npm method, try yarn method instead.
           2) TOC function may disable encrypted article loading, so you can set toc as 'false' in config file of theme.
  5. How to add canvas special effects
    Canvas-ribbon
    Canvas-three

  6. How to recommand related articles at the bottom

  7. How to out Jupyter notebook in hexo————unstable and not available now.
    Should ues “download the file in jupyter as MD file” + “ hide article in hexo net”

  8. How to show independent website page in the Github Pages blogs

    1. restore all the needed website page in the /myDoc file
    2. when need to show through Github Pages, paste the file directly in /public file. Generate and deploy then would be fine to show throung relative path in the blog.
    3. Remember! the [hexo clean] command would erase [myDoc] file, so it is needed to restore the file in the root path of Blog
  9. How to dis-combine the github.io URL with purchased personal URL

    1. just delete the URL in the CNAME file (now, it is empty) located in the ./source path.
    2. hexo d
    3. hexo g

Fixing Bugs

  1. When facing ‘spawn failed’, use the second methods in this link