GithubHelp home page GithubHelp logo

zyxyuanxiao / antd-bisheng-docs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from slowlog/antd-bisheng-docs

0.0 1.0 0.0 963 KB

一个从 Ant Design 文档抽离出来的简化版文档工具,在线预览:http://api.slowlog.cn

Dockerfile 0.06% JavaScript 21.00% CSS 78.51% TypeScript 0.04% HTML 0.39%

antd-bisheng-docs's Introduction

Antd bisheng docs


一个从 Ant Design 文档抽离出来的简化版文档工具,可用于快速构建及管理项目接口文档、个人学习笔记等。


Demo 示例



目录结构


├── .
├── .gitignore         // git 忽略
├── README.md          // 文档说明
├── bisheng.config.js  // 全局配置文件
├── components         // 组件功能
├── dist               // 打包后静态文件输出目录
├── docs               // markdown 文件
├── default.conf       // docker nignx 配置文件
├── Dockerfile         // docker 构建  
├── package.json       // 项目依赖
└── theme              // 基于 Ant Desgin 的主题

项目启动&打包


  • npm i --registry=https://registry.npm.taobao.org // 安装项目依赖

  • npm start // 启动项目

  • npm run clean // 清除 dist 目录下的静态文件

  • npm run prod // 打包项目、静态文件生成目录为当前目录的 dist


Nginx 配置


server {
    listen 80;

    server_name api.domain.com;

    root /www/antd-bisheng-docs/dist;

    location / {
        index index.html;
        rewrite ^/$ /docs/react/getting-started.html redirect;
    }

    error_page  500 502 503 504 404 http://api.domain.com/docs/react/getting-started.html;

}

使用 Docker 构建此项目


FROM nginx:1.14.0-alpine

COPY . /www/antd-bisheng-docs

COPY default.conf /etc/nginx/conf.d/default.conf

RUN chmod -R 0777 /www/antd-bisheng-docs

CMD ["nginx", "-g", "daemon off;"]

注意事项


  • 模板文件路径 ./theme/static/template.html

  • 首页为空白页,需用 nginx rewrite 至指定页面

  • 目前仅支持中文,如需使用其他语言请自行解决

  • 如需访问某指定页面可通过,例如:http://api.slowlog.cn/docs/react/sign-rule.html

antd-bisheng-docs's People

Contributors

slowlog avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.