2.0.1 • Published 1 year ago

ssi-encode v2.0.1

Weekly downloads
1
License
ISC
Repository
-
Last release
1 year ago

ssi-encode

$ npm i ssi-encode

nodejsにssiをサポートします。 node-ssiを踏襲して、以下の機能を追加してます。

  • euc-jpのincludeファイルをutf-8へ変換
  • includeしているファイルの読み込み開始と終了をコメントで表示
<!-- #SSI-START:/www/xxx.html -->
 :
 :
<!-- #SSI-END:/www/xxx.html -->

Usage

const ssiEncode = require("ssi-encode");

ssiEncode({
  baseDir: __dirname,
  ext: ".html",
  routes:{
    "/_include/": __dirname
  }
})

changelog

  • 2020/12/10: includeしているファイルの読み込み開始と終了をコメントで表示
<!-- #SSI-START:/www/xxx.html -->
 :
 :
<!-- #SSI-END:/www/xxx.html -->
  • 2024/5/14: pathGuideオプションでincludeしているファイルの読み込み開始と終了をコメントで表示する処理を切り替えらるようにした
ssiEncode({
  pathGuide: false
})
2.0.1

1 year ago

2.0.0

5 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago