Gangmax Blog

Enable AsciiDoc Support in Hexo

To make Hexo support the "Asciidoc" format post, first update the "package.json" file in your project by adding the "hexo-renderer-asciidoc" plugin:

  "name": "hexo-site",
  "dependencies": {
    "hexo": "^5.4.0",
    "hexo-generator-archive": "^1.0.0",
    "hexo-generator-category": "^1.0.0",
    "hexo-generator-feed": "^3.0.0",
    "hexo-generator-index": "^2.0.0",
    "hexo-generator-tag": "^1.0.0",
    "hexo-renderer-ejs": "^1.0.0",
    "hexo-renderer-marked": "^4.0.0",
    "hexo-renderer-asciidoc": "^2.1.1",
    "hexo-renderer-stylus": "^2.0.0",
    "hexo-server": "^2.0.0"

Then run the following command to download the dependencies:

npm install

Now you can create a post file with the "*.asciidoc" file name and add the AsciiDoc format content in it. The rest actions are just as the same as before.