1.1.1 • Published 2 years ago

hexo-tag-icodeweb v1.1.1

Weekly downloads
-
License
-
Repository
github
Last release
2 years ago

hexo-tag-icodeweb

npm npm

GitHub

Including code from any website in your Hexo posts, modified from https://github.com/hexojs/hexo/blob/master/lib/plugins/tag/include_code.js and https://github.com/zbicin/hexo-github-include

Installation

npm install --save hexo-tag-icodeweb

Usage

{% icodeweb type [title:title] [lang:language] [from:line] [to:line] path/to/file %}

Usage of lang, from and to is same as include_code Tag in Hexo

Config

Config like this:

icodeweb:
  lang_default:
  types:
    - name: # type name
      lang_default:
      website: # website
      prefix:
      suffix:
      codehead:

For example:

icodeweb:
  lang_default: plaintext
  types:
    - name: icwexample
      lang_default: cpp
      website: https://raw.githubusercontent.com
      prefix:
        - Tiphereth-A
        - Tiphereth-A.github.io
        - gh-pages
        - code
      suffix:
        - .cpp
      codehead: "// example"

Then you can write

{% icodeweb icwexample about/init %}

to include https://raw.githubusercontent.com/Tiphereth-A/Tiphereth-A.github.io/gh-pages/code/about/init.cpp into your posts

1.1.1

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago

0.0.1

2 years ago