Skip to content

Commit 3f63520

Browse files
committed
Add 'create' function to make a new repo
1 parent 5bd3492 commit 3f63520

22 files changed

+1189
-278
lines changed

README.adoc

+7-214
Original file line numberDiff line numberDiff line change
@@ -1,221 +1,14 @@
11
= AsciiBinder
22

3-
This repo contains the documentation for
3+
image:https://badge.fury.io/rb/ascii_binder.svg["Gem Version", link="https://badge.fury.io/rb/ascii_binder"]
44

5-
* http://origin.openshift.com/[OpenShift Origin]
6-
* http://openshift.com/[OpenShift Online]
7-
* http://www.redhat.com/products/cloud-computing/openshift-enterprise/[OpenShift Enterprise]
5+
This repo contains the source code for AsciiBinder, a documentation system for complex software projects. To learn more about AsciiBinder:
86

9-
The documentation is sourced in http://www.methods.co.nz/asciidoc/[AsciiDoc] and transformed into HTML/CSS and other formats through http://asciidoctor.org/[AsciiDoctor]-based automation.
7+
* Have a gander at the http://www.asciibinder.org/latest/welcome/[AsciiBinder documentation]
8+
* Or just take the https://rubygems.org/gems/ascii_binder[ascii_binder Ruby Gem] for a spin
109
11-
== Repo Organization
10+
The AsciiBinder system was initially developed for https://github.com/openshift/openshift-docs[OpenShift documentation], but has been revised to work for documenting a wide variety of complex, multi-versioned software projects.
1211

13-
Each directory of the repo represents a different collection of topics (you can think of directories as books). The exceptions to this rule are directories whose names start with an underscore (like `_builder_lib` and `_javascripts`), which contain the assets used to generate the finished documentation. Within each 'book' directory, topics exist as separate asciidoc files and an `images` directory contains any images that are included in the topics.
12+
== Contributing
13+
We are using the https://github.com/redhataccess/ascii_binder/issues[Issues] page to track bugs and feature ideas on the code, so have a look and feel free to ask questions there. You can also follow / chat with us on Twitter - https://twitter.com/AsciiBinder[@AsciiBinder]
1414

15-
----
16-
/
17-
/book1
18-
/book1/topic1.adoc
19-
/book1/topicN.adoc
20-
/book1/images
21-
/book1/images/img1.png
22-
/book1/images/imgN.png
23-
...
24-
/bookN
25-
----
26-
27-
== Version Management
28-
The overlap of documentation across OpenShift Origin, Online and Enterprise is no less than 80%. In many cases, this means that individual topics may need to include or exclude individual paragraphs with respect to a specific OpenShift distribution. While it is _possible_ to accomplish this solely by using git branches to maintain slightly different versions of a given topic, doing so would make the task of maintaining internal consistency extremely difficult for content contributors.
29-
30-
Git branching is still extremely valuable, and serves the important role of tracking the release versions of documentation for the various OpenShift distributions.
31-
32-
=== Distribution-Specific Conditionals
33-
OpenShift documentation uses AsciiDoc's `ifdef/endif` macro to conditionalize document segments for specific OpenShift distributions down to the single-line level.
34-
35-
The supported distribution attributes used in the OpenShift document generator are:
36-
37-
* `openshift-origin`
38-
* `openshift-online`
39-
* `openshift-enterprise`
40-
41-
These attributes can be used alone or together to conditionalize text within a topic document.
42-
43-
Here is an example of this concept in use:
44-
45-
----
46-
This first line is unconditionalized, and will appear for all versions.
47-
48-
\ifdef::openshift-online[]
49-
This line will only appear for OpenShift Online.
50-
\endif::[]
51-
52-
\ifdef::openshift-enterprise[]
53-
This line will only appear for OpenShift Enterprise.
54-
\endif::[]
55-
56-
\ifdef::openshift-origin,openshift-enterprise[]
57-
This line will appear for OpenShift Origin and Enterprise, but not for OpenShift Online.
58-
\endif::[]
59-
----
60-
61-
Two important points to keep in mind:
62-
63-
* The `ifdef/endif` blocks have no size limit, however they should _not_ be used to conditionalize an entire topic. If an entire topic file is specific to a given OpenShift distribution, refer to the link:#document-set-metadata[Document Set Metadata] section for information on how to conditionalize at the whole-topic level.
64-
65-
* The `ifdef/endif` blocks _cannot be nested_. In other words, one conditional block cannot contain other conditional blocks.
66-
67-
=== Release Branches
68-
Through the use of link:#distribution-specific-conditionals[Distribution-Specific Conditionals] and link:#document-set-metadata[Document Set Metadata], the master branch of this repository always contains a complete set of documentation that includes all of the OpenShift distributions. However, when and as new versions of the OpenShift distros are released, the master branch is merged down to new or existing release branches. Here is the general naming scheme used in the branches:
69-
70-
* `master` - OpenShift Origin latest code
71-
* `origin-N.N` - OpenShift Origin most recent stable release
72-
* `online` - OpenShift Online most recent release
73-
* `enterprise-N.N` - OpenShift Enterprise support releases
74-
75-
On a nightly basis, the documentation web sites are rebuilt for each of these branches. In this manner, documentation for released versions of OpenShift will remain the same even as development continues on master. Additionally, any corrections or additions that are "cherry-picked" into the release branches will show up in the release documentation the next day.
76-
77-
== Document Set Metadata
78-
In order to construct the documentation site from these sources, the build system looks at the `_build_cfg.yml` metadata file. The build system _only_ looks in this file for information on which files to include, so any new file submissions must be accompanied by an update to this metadata file.
79-
80-
=== File Format
81-
The format of this file is as indicated:
82-
83-
----
84-
--- <1>
85-
Name: Origin of the Species <2>
86-
Dir: origin_of_the_species <3>
87-
Distros: all <4>
88-
Topics:
89-
- Name: The Majestic Marmoset <5>
90-
File: the_majestic_marmoset <6>
91-
Distros: all
92-
- Name: The Curious Crocodile
93-
File: the_curious_crocodile
94-
Distros: openshift-online,openshift-enterprise <7>
95-
- Name: The Numerous Nematodes
96-
Dir: the_numerous_nematodes <8>
97-
Topics:
98-
- Name: The Wily Worm <9>
99-
File: the_wily_worm
100-
- Name: The Acrobatic Ascarid <= Sub-topic 2 name
101-
File: the_acrobatic_ascarid <= Sub-topic 2 file under <group dir>/<subtopic dir>
102-
----
103-
<1> Record separator at the top of each topic group
104-
<2> Display name of topic group
105-
<3> Directory name of topic group
106-
<4> Which OpenShift versions this topic group is part of
107-
<5> Topic name
108-
<6> Topic file under the topic group dir without '.adoc'
109-
<7> Which OpenShift versions this topic is part of
110-
<8> This topic is actually a subtopic group. Instead of a `File` path it has a `Dir` path and `Topics`, just like a top-level topic group.
111-
<9> Topics belonging to a subtopic group are listed just like regular topics with a `Name` and `File`.
112-
113-
=== Notes on "Distros"
114-
115-
* The "Distros" setting is optional for topic groups and topic items. When the "Distros" setting is absent, the system treats the topic group or topic as though the user had set "Distros: all".
116-
* The "all" value for "Distros" is a synonym for "openshift-origin,openshift-enterprise,openshift-online".
117-
* The "all" value trumps other values, so "openshift-online,all" is treated as "all"
118-
119-
== Understanding the Complete Distribution Condition Chain
120-
It is important to understand the ordering of distribution conditionals in determining whether or not a specific piece of content appears in the documentation set. The hierarchy is fairly straightforward:
121-
122-
1. Topic group "Distros" setting from `_build_cfg.yml`
123-
2. Topic item "Distros" setting from `_build_cfg.yml`
124-
3. Document-level `ifdef/endif` blocks
125-
126-
In this manner:
127-
128-
* If a topic group is configured with "Distros: openshift-online", the entire group will be skipped for OpenShift Enterprise and OpenShift Origin, regardless of the Topic-level and document-level content rules within that group.
129-
130-
* When a topic group is available to all Distros, but a specific topic item is limited, the topic group will appear for all distros and the specific topic item will only appear for the indicated distros.
131-
132-
== Live Editing
133-
If you would like to work on one of the documentation files in an editing environment that automatically redraws the resulting HTML, follow these steps.
134-
135-
=== Prerequisites
136-
You will need the following tools in your editing environment:
137-
138-
* A bash shell environment (Linux distributions and OS X include these out of the box, for Windows consider http://cygwin.com/[Cygwin])
139-
* https://www.ruby-lang.org/en/[Ruby]
140-
* http://www.git-scm.com/[git]
141-
* A web browser (Firefox, Chrome or Safari) with the http://livereload.com/[LiveReload] extension
142-
143-
With these tools available, first perform a one-time setup:
144-
145-
1. Clone the https://github.com/openshift/openshift-docs[openshift-docs] repo from GitHub:
146-
+
147-
----
148-
$ git clone https://github.com/openshift/openshift-docs.git
149-
----
150-
2. From the cloned directory, run a bundle install:
151-
+
152-
----
153-
$ cd openshift-docs
154-
$ bundle install
155-
----
156-
+
157-
TIP: If you don't have bundler installed, you can get it by running `gem install bundler`
158-
159-
That's it for setup, the next section explains how to run the LiveReload system.
160-
161-
=== Running with LiveReload
162-
Once you've installed the link:#prerequisites[prerequisites] you can fire up the LiveReload setup as follows:
163-
164-
1. From the `openshift-docs` directory, run a preliminary build:
165-
+
166-
----
167-
$ cd openshift-docs
168-
$ bundle exec rake build
169-
----
170-
2. Now open the generated HTML file in your browser. It will be under `openshift-docs/_preview/<distro>/<branch>` with the same path and filename as the original file. The only difference will be the name ending in '.html' instead of '.adoc'.
171-
3. Now start up the `guard` utility:
172-
+
173-
----
174-
$ bundle exec guard
175-
----
176-
+
177-
TIP: This utility will run in the terminal where you started it, so you should leave it running off to the side and use other terminals for regular tasks.
178-
4. Finally, back in your browser, enable the LiveReload plugin in the same tab where the preview file is displayed. You will know this step succeeded if the LiveReload icon changes, and if you see output similar to the following in the terminal where `guard` is running:
179-
+
180-
----
181-
[1] guard(main)> 17:29:22 - INFO - Browser connected.
182-
----
183-
184-
That's it. Now any changes that you make to the source file will automatically trigger a rebuild of the target HTML file.
185-
186-
=== Clean Up
187-
The `.gitignore` file is set up to prevent anything under `_preview` and `_package` from being committed. However, you can reset the environment manually by running:
188-
189-
----
190-
$ bundle exec rake clean
191-
----
192-
193-
== Creating New Topic Pages
194-
The layout and style rules for new documentation are largely described in an upcoming style guide (delivery date TBD). However, a few important rules are listed here because they affect the way that the pages are rendered.
195-
196-
The top matter of any new topic page must have the following format:
197-
198-
----
199-
= Human-Readable Topic Title
200-
{product-author}
201-
{product-version}
202-
:data-uri:
203-
:icons:
204-
----
205-
206-
* The article title goes on the first line with a level 1 header markup (=)
207-
* The [x-]`{product-author}` and [x-]`{product-version}` are AsciiDoc attributes that get replaced dynamically when the docs are generated.
208-
* The `:data-uri:` attribute tells AsciiDoctor to embed any images directly in the HTML.
209-
* The `:icons:` attribute tells AsciiDoctor to use cool icons for admonition blocks.
210-
211-
After the heading block and a single whitespace line, you can include any content for the topic.
212-
213-
NOTE: Any section headers within the article must be level 2 (==) or lower. Try to be consistent about level-nesting; it won't break AsciiDoctor to jump from a level 1 section header down to level 3, but it isn't good form.
214-
215-
216-
== Contacts
217-
218-
For questions or comments about the documentation system:
219-
220-
* OpenShift team members can be found on the http://webchat.freenode.net/?randomnick=1&channels=openshift&uio=d4[#openshift] and http://webchat.freenode.net/?randomnick=1&channels=openshift-dev&uio=d4[#openshift-dev channels] on http://www.freenode.net/[FreeNode].
221-
* You can also join the http://lists.openshift.redhat.com/openshiftmm/listinfo/users[Users] or http://lists.openshift.redhat.com/openshiftmm/listinfo/dev[Developers] mailing list.

ascii_binder.gemspec

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ require 'ascii_binder/version'
66
Gem::Specification.new do |spec|
77
spec.name = "ascii_binder"
88
spec.version = AsciiBinder::VERSION
9-
spec.authors = ["N. Harrison Ripps"]
10-
spec.email = ["[email protected]"]
9+
spec.authors = ["N. Harrison Ripps","Jason Frey"]
10+
1111
spec.summary = %q{Builder for multi product documention websites.}
1212
spec.description = %q{Builder for multi product documention websites.}
13-
spec.homepage = "http://github.com/redhataccess/ascii_binder"
13+
spec.homepage = "http://asciibinder.org/"
1414
spec.license = "MIT"
1515

1616
spec.files = `git ls-files -z`.split("\x0")

0 commit comments

Comments
 (0)