§2024-06-10

This is to set up docsify modules to do the documents.

機器 hc4Nas02.yushei.net

¶ Step 1. npm i docsify-cli

$ pwd
/home/alexlai/nodejs_proj/ys_blog
$ npm i docsify-cli
npm warn deprecated docsify-server-renderer@4.13.1: docsify-server-renderer 4.x and below is no longer supported while we investigate the future of SSR and SSG for Docsify

added 165 packages, and audited 368 packages in 36s

36 packages are looking for funding
  run `npm fund` for details

8 vulnerabilities (7 moderate, 1 high)

To address all issues, run:
  npm audit fix

Run `npm audit` for details.

$ npm audit fix

up to date, audited 368 packages in 5s

36 packages are looking for funding
  run `npm fund` for details

# npm audit report

got  <11.8.5
Severity: moderate
Got allows a redirect to a UNIX socket - https://github.com/advisories/GHSA-pfrx-2q88-qq97
fix available via `npm audit fix --force`
Will install docsify-cli@4.4.2, which is a breaking change
node_modules/got
  package-json  <=6.5.0
  Depends on vulnerable versions of got
  node_modules/package-json
    latest-version  0.2.0 - 5.1.0
    Depends on vulnerable versions of package-json
    node_modules/latest-version
      update-notifier  0.2.0 - 5.1.0
      Depends on vulnerable versions of latest-version
      node_modules/update-notifier
        docsify-cli  >=1.1.0
        Depends on vulnerable versions of docsify
        Depends on vulnerable versions of update-notifier
        node_modules/docsify-cli

marked  <=4.0.9
Severity: high
Regular Expression Denial of Service (REDoS) in Marked - https://github.com/advisories/GHSA-4r62-v4vq-hr96
Inefficient Regular Expression Complexity in marked - https://github.com/advisories/GHSA-rrrm-qjm4-v8hf
Inefficient Regular Expression Complexity in marked - https://github.com/advisories/GHSA-5v2h-r2cx-5xgj
fix available via `npm audit fix --force`
Will install docsify-cli@4.4.2, which is a breaking change
node_modules/marked
  docsify  >=4.11.5
  Depends on vulnerable versions of marked
  node_modules/docsify
    docsify-server-renderer  >=4.12.0
    Depends on vulnerable versions of docsify
    node_modules/docsify-server-renderer

8 vulnerabilities (7 moderate, 1 high)

To address issues that do not require attention, run:
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force    <--- ???? 

¶Step 2. npx docsify init

$ ls
app.js  config  controller  db  index.js  log  middleware  model  node_modules  package.json  package-lock.json  routes  utils
alexlai@hc4nas02:~/nodejs_proj/ys_blog$ npx docsify init

Create succeed! Please run

> docsify serve .

alexlai@hc4nas02:~/nodejs_proj/ys_blog$ ls
404.html  app.js  config  controller  db  index.js  log  middleware  model  node_modules  package.json  package-lock.json  README.md  routes  utils
alexlai@hc4nas02:~/nodejs_proj/ys_blog$

$ npx docsify init ./docs

Create succeed! Please run

> docsify serve ./docs
     
alexlai@hc4nas02:~/nodejs_proj/ys_blog$ ls ./docs/
404.html  README.md