2.0.1 • Published 2 years ago

ssi-encode v2.0.1

Weekly downloads
1
License
ISC
Repository
-
Last release
2 years 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

2 years ago

2.0.0

5 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago