Pages

Friday, 1 March 2024

静态文档网站生成器idoc

 Simple document generation tool! Dependence: Node.js

NPM version CI Dependents Repo npm Downloads npm Downloads npm Downloads

Generate static pages from all Markdown in a folder.

  ,,        ,,
  db      `7MM
            MM
`7MM   ,M""bMM  ,pW"Wq.   ,p6"bo
  MM ,AP    MM 6W'   `Wb 6M'  OO
  MM 8MI    MM 8M     M8 8M
  MM `Mb    MM YA.   ,A9 YM.    ,
.JMML.`Wbmd"MML.`Ybmd9'   YMbmd'

Quick Start

Create a idoc site using the beautiful defalut theme.

$ npx idoc init myapp

Or

$ sudo npm i idoc -g
$ idoc init myapp

Running the idoc init myapp generator from the command line will create a directory structure with the following elements:

├── docs
│   ├── README.md
│   └── about.md
├── package.json
└── idoc.yml

Or use in github actions

- name: Create idoc config.
  run: |
    cat > idoc.yml << EOF
    site: "Rehype Rewrite {{version}}"
    menus:
      Home: index.html
    EOF

- run: npm install idoc@1.26.6 -g
- run: idoc --output="www"

Command Help

Usage: idoc [init|new][options] [--help|h] [--version|v]

Options:

  -v, --version, Show version number
  -h, --help,    Displays help information.
  -f, --force,   Force file regeneration.
  -s, --site,    Set website name.
  -d, --dir <dir-path>, Markdown file directory. defalut(docs)
  -o, --output <dir-path>, Output directory. defalut(dist)
  -w, --watch,   Watch and compile Markdown files.
  -t, --theme,   Customize theme settings. defalut(defalut)
  -m, --minify,  minify HTML

Example:

  $ idoc init <folder>
  $ idoc new introduce/README.md
  $ idoc new introduce/README.md "Hello World" -f
  $ idoc --theme="defalut"
  $ idoc --dir="docs"
  $ idoc --output="dist"
  $ idoc --watch --output="www"

Compiled with idoc

Repo Starred Last Commit Website
Awesome Mac Github Stars GitHub last commit Preview Website
Awesome ChatGPT Github Stars GitHub last commit Preview Website
Awesome UIKit Github Stars GitHub last commit Preview Website
React Components Awesome Github Stars GitHub last commit Preview Website
MySQL Tutorial Github Stars GitHub last commit Preview Website
Docker Tutorial Github Stars GitHub last commit Preview Website
Nginx Tutorial Github Stars GitHub last commit Preview Website
Vim Web Github Stars GitHub last commit Preview Website
Git Tips Github Stars GitHub last commit Preview Website
Shell Tutorial Github Stars GitHub last commit Preview Website
SwiftUI Example Github Stars GitHub last commit Preview Website
Swift Tutorial Github Stars GitHub last commit Preview Website
Handbook Github Stars GitHub last commit Preview Website
GitHub Actions Github Stars GitHub last commit Preview Website
HTML Tutorial Github Stars GitHub last commit Preview Website
C Tutorial Github Stars GitHub last commit Preview Website
React Native Github Stars GitHub last commit Preview Website
TypeNexus Github Stars GitHub last commit Preview Website
Awesome ChatGPT Github Stars GitHub last commit Preview Website
React Components Awesome Github Stars GitHub last commit Preview Website
Repo Starred Downloads Website
rehype-rewrite Github Stars NPM Downloads Preview Website
rehype-attr Github Stars NPM Downloads Preview Website
store.js Github Stars NPM Downloads Preview Website
cookie.js Github Stars NPM Downloads Preview Website
auto-config-loader Github Stars NPM Downloads Preview Website
chmod-cli Github Stars NPM Downloads Preview Website
local-ip-url Github Stars NPM Downloads Preview Website
path-templater Github Stars NPM Downloads Preview Website
html-to-markdown-cli Github Stars NPM Downloads Preview Website
colors-named Github Stars NPM Downloads Preview Website
colors-named-hex Github Stars NPM Downloads Preview Website
colors-named-decimal Github Stars NPM Downloads Preview Website
chinese-numerals Github Stars NPM Downloads Preview Website
image2uri Github Stars NPM Downloads Preview Website
svgtofont Github Stars NPM Downloads Preview Website
console-emojis Github Stars NPM Downloads Preview Website
compile-less Github Stars NPM Downloads Preview Website 

from https://github.com/jaywcjlove/idoc

---------------------------------------------------

A simple document builder site written by PHP.

idoc

A simple document builder site written by php

Let's try it!

http://idoc.codespeaking.com

本地部署方法

将项目git clone到本地, 配置虚拟域名(不配置域名, 直接使用localhost也可以)

在根目录下创建config.php, 下面是一个样例:

<?php

date_default_timezone_set('PRC');

//mysql database address
define('DB_HOST','127.0.0.1');
define('DB_USER','XXXXX');
define('DB_PASSWD','XXXXX');
define('DB_NAME','idoc');

//database prefix
define('DB_PREFIX','id_');

define('PWD_SALT', '#20191008/iDoC^^');
//auth key
define('AUTH_KEY','zZQG6kMLKCf6gzzJUy$Zj^Un@mj52Hrx3365fde4a472decaa8f104b97717e125');
//cookie name
define('AUTH_COOKIE_NAME','EM_AUTHCOOKIE_BWlf5txDunNPpmsKCCpbve9ENTxdvnr2');
define('SITE_DOMAIN', 'localhost');

访问首页前, 先创建数据库, 并运行根目录下的schema.sql创建表。


from https://github.com/youngtrix/idoc

Resources

No comments:

Post a Comment