RobWin/asciidocular

语言: CSS

git: https://github.com/RobWin/asciidocular

用于以AsciiDoc编写的项目文档的移动第一个HTML5 Web应用程序
Mobile first HTML5 web app for your project documentation written in AsciiDoc
README.md (中文)

= Asciidocular :图标:字体 :hardbreaks:

image:https://travis-ci.org/RobWin/asciidocular.svg?branch = master [“Build Status”,link =“https://travis-ci.org/RobWin/asciidocular”]

注意:目前正在开发中。

Asciidocular是一个小型的AngularJS Web应用程序,它通过Ajax加载http://asciidoctor.org/[AsciiDoctor]文件,并将它们呈现为一个完整的网站。 Asciidocular使用https://github.com/asciidoctor/asciidoctor.js[asciidoctor.js]将AsciiDoc文件转换为HTML。

Asciidocular可用于创建项目或API的文档站点。例如,您可以使用Asciidocular和https://github.com/Swagger2Markup/swagger2markup[Swagger2Markup]来创建http://swagger.io [Swagger] API的文档站点。

由于AsciiDoc语法只是纯文本,因此您可以使用任何文本编辑器编写AsciiDoc文档。

优点:

  • 没有构建过程和服务器端工具将您的AsciiDoc文件转换为HTML
  • 响应Bootswatch(Bootstrap)主题
  • 可通过GitHub页面部署
  • 只需创建AsciiDoc文件并进行部署!

特征:

  • 支持highlight.js
  • 支持Font-Awesome

==演示

在GitHub Pages上部署了http://robwin.github.io/asciidocular [Live Demo]。

==使用指南

===从源头构建

确保安装了http://nodejs.org/[Node.js]。


git clone https://github.com/RobWin/asciidocular.git cd asciidocular npm run build


===创建AsciiDoc文件

您必须在应用程序的docs文件夹中创建index.adoc文件。


= Asciidocular // <1> 罗伯特温克勒 :图标:字体 :图标:字体 :source-highlighter:highlightjs :hardbreaks: :idprefix:

这是一个序言。 <2>

[icon =“fa fa-wrench”] <3> ==第1章// <4>

===第1.1章// <5>

第1.1章中的文字

  • 第1项
  • 第2项

注意:Asciidoctor支持基于字体的警告图标,由Font Awesome提供支持!

\ include :: chapter2.adoc [] // <6>

<1>文档标题是网站的标题。 <2>该文件的序言是jumbotron的内容。 <3>您可以在顶级导航项目前添加Font Awesome图标 <4>每个1级部分标题是顶级导航项目 <5>每个2级部分标题是导航栏中父部分的子导航项目。 <6>您可以在index.adoc文件中包含其他AsciiDoc文件。

==例子

===手机上的Asciidocular image :: images / asciidocular_mobile.png []

===平板电脑上的Asciidocular ====回家 image :: images / asciidocular_home.png []

====章节 image :: images / asciidocular_section.png []

==问题 您可以在https://gitter.im/Swagger2Markup/swagger2markup(Gitter)中询问有关Asciidocular的问题。

==错误 如果您认为自己发现了错误,请花点时间搜索现有问题。如果没有其他人报告此问题,请打开一个详细描述问题的新问题,理想情况下,包括一个再现它的测试。

==增强功能 如果您想要对Asciidocular进行增强,那么拉取请求是最受欢迎的。源代码在GitHub上。您可能希望搜索现有问题并提取请求以查看是否已在处理增强功能。您可能还需要打开一个新问题,以便在开始工作之前讨论可能的增强功能。

==许可证

版权所有2015 Robert Winkler

根据Apache许可证2.0版(“许可证”)获得许可;除非符合许可,否则您不得使用此文件。您可以在以下位置获取许可证副本

http://www.apache.org/licenses/LICENSE-2.0

除非适用法律要求或书面同意,否则根据许可证分发的软件按“原样”分发,不附带任何明示或暗示的担保或条件。有关管理许可下的权限和限制的特定语言,请参阅许可证。

本文使用googletrans自动翻译,仅供参考, 原文来自github.com

en_README.md

= Asciidocular
:icons: font
:hardbreaks:

image:https://travis-ci.org/RobWin/asciidocular.svg?branch=master["Build Status", link="https://travis-ci.org/RobWin/asciidocular"]

NOTE: Currently highly under development.

Asciidocular is a small AngularJS web app that loads http://asciidoctor.org/[AsciiDoctor] files via Ajax and renders them as a full web site. Asciidocular uses https://github.com/asciidoctor/asciidoctor.js[asciidoctor.js] to convert the AsciiDoc files into HTML.

Asciidocular can be used to create a documentation site of your project or API. For example, you could use Asciidocular together with https://github.com/Swagger2Markup/swagger2markup[Swagger2Markup] to create a documentation site of your http://swagger.io[Swagger] API.

Since AsciiDoc syntax is just plain text, you can write an AsciiDoc document using any text editor.

Advantages:

  • No build process and server-side tools needed to convert your AsciiDoc files into HTML
  • Responsive Bootswatch (Bootstrap) theme
  • Deployable via GitHub Pages
  • Just create AsciiDoc files and deploy!

Features:

  • Supports highlight.js
  • Supports Font-Awesome

== Demo

http://robwin.github.io/asciidocular[Live Demo] deployed on GitHub Pages.

== Usage Guide

=== Building from source

Make sure you have http://nodejs.org/[Node.js] installed.


git clone https://github.com/RobWin/asciidocular.git
cd asciidocular
npm run build


=== Create AsciiDoc files

You have to create an index.adoc file in the docs folder of the app.


= Asciidocular //<1>
Robert Winkler
:icons: font
:icons: font
:source-highlighter: highlightjs
:hardbreaks:
:idprefix:

This is a preamble. <2>

[icon="fa fa-wrench"] <3>
== Chapter 1 //<4>

=== Chapter 1.1 //<5>

Text in chapter 1.1

  • Item 1
  • Item 2

NOTE: Asciidoctor supports font-based admonition icons, powered by Font Awesome!

\include::chapter2.adoc[] //<6>

<1> The document title is the title of the web site.
<2> The preamble of the document is the content of the jumbotron.
<3> You can add Font Awesome icons in front of top-level navigation items
<4> Each level 1 section title is a top-level navigation item
<5> Each level 2 section title is a sub navigation item of the parent section in the navigation bar.
<6> You can include other AsciiDoc files into the index.adoc file.

== Examples

=== Asciidocular on Mobile Phone
image::images/asciidocular_mobile.png[]

=== Asciidocular on Tablet
==== Home
image::images/asciidocular_home.png[]

==== Sections
image::images/asciidocular_section.png[]

== Questions
You can ask questions about Asciidocular in https://gitter.im/Swagger2Markup/swagger2markup[Gitter].

== Bugs
If you believe you have found a bug, please take a moment to search the existing issues. If no one else has reported the problem, please open a new issue that describes the problem in detail and, ideally, includes a test that reproduces it.

== Enhancements
If you’d like an enhancement to be made to Asciidocular, pull requests are most welcome. The source code is on GitHub. You may want to search the existing issues and pull requests to see if the enhancement is already being worked on. You may also want to open a new issue to discuss a possible enhancement before work on it begins.

== License

Copyright 2015 Robert Winkler

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.