Skip to content

Commit a6e409f

Browse files
Merge pull request #1 from DocOps/reorg-dirs
1. Renamed `build/` => `_build/`. 2. Renamed `_data/` => `data/`. 3. Renamed `src/` => `content/`. 4. Renamed `content/portal/` => `content/pages/` 5. Converted `_build/includes/built/filename.adoc` to `_build/includes/_built_filename.adoc`. 6. Enhanced README instructions for clarity. 7. Added The MIT License. The convention I have in mind is root-level directories that start with `_` are _not_ migrated into the build directory during processing. That is, they do not contain what we consider content but rather files that configure or shape the build/output. Small-data files that go in `data/` contain content about the product or other subject matter of the publication. Meanwhile `_templates` contains content that will be expressed more appropriately in preprocessed files, so we can keep that stuff out of `_build/`. The `data/` dir is likely to get moved into `_build/site` or wherever the SSG will look for menu and other data. Changing `portal/` to `pages/` in the `content/` dir just seems like a good practice. "Page" is a general concept, generally akin to a web page or a section of a book chapter, but for non-topical content. This is a place for miscellaneous web pages you want to accompany your core docs. These may or may not be included in a PDF edition of the same docs. Flattening the `built/` subdirectory was mainly to eliminate messes caused with relative paths in AsciiDoc. We almost certainly still need to address subdirectories inside `topics/` and `pages/`.
2 parents 9742930 + 0df50d7 commit a6e409f

9 files changed

Lines changed: 57 additions & 31 deletions

File tree

LICENSE

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2018 Brian Dominick and Contributors
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of
6+
this software and associated documentation files (the "Software"), to deal in
7+
the Software without restriction, including without limitation the rights to
8+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9+
the Software, and to permit persons to whom the Software is furnished to do so,
10+
subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.adoc

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,19 @@ This creates a truly open, highly portable system for developing and maintaining
88

99
Complete documentation for LDCMF is still being developed.
1010

11-
The following procedure is a *bootstrapping operation* to get an _actual LDCMF project_ started.
11+
The following procedure is a *bootstrapping operation* to get an _actual LDCMF-based project_ started.
1212
It further sets up initial files based on custom preferences.
13-
The newly generated `README.adoc` instructs future users to set up and use your docs.
14-
15-
=== Quickstart
1613

1714
[WARNING]
1815
This file (`README.adoc`) is the README for the generic LiquiDoc CMF project bootstrap repository.
19-
If you wish to keep this file, move/rename it _before_ running the quickstart, which generates a proper `README.adoc` for your actual docs project/directory, which this directory and its contents then becomes.
16+
If you wish to keep this file, move/rename it _before_ running the quickstart, which generates a proper `README.adoc` for your actual docs project/directory, which this directory and its contents then _becomes_.
2017

2118
If you have link:https://git-scm.com/book/en/v2/Getting-Started-Installing-Git[Git] and link:https://www.ruby-lang.org/en/downloads/[Ruby runtime] installed, you can get going with LiquiDoc CMF in a few quick steps.
2219

2320
. Clone this repo.
2421
+
2522
[subs="quotes"]
23+
.Example
2624
----
2725
git clone git@github.com:DocOps/liquidoc-cmf.git *docs_dir*
2826
----
@@ -38,51 +36,57 @@ cd docs_dir
3836

3937
. Re-associate your files with the proper repository.
4038

41-
.. _If this project is its own Git repo_, change the project's remote origin Git repository.
39+
.. _If your docs project is its own Git repo_, change the project's remote origin Git repository.
4240
+
4341
----
4442
git remote set-url origin git://github.com:your-project/your-repo-name.git
4543
----
4644
+
4745
Replace this URI with your own.
4846

49-
.. _If this project is part of a parent directory's Git repo_, remove local Git files.
47+
.. _If your docs project is part of a parent directory's Git repo_, remove local Git files so your new docs source will be absorbed into the parent repo.
5048
+
5149
----
5250
rm -rf .git
5351
----
52+
+
53+
Now your new directory/files will appear as uncommitted additions to the parent project (`git status`).
5454

5555
. Run Bundler to install dependencies.
5656
+
5757
----
58-
bundle install
58+
bundle
5959
----
6060
+
61-
If Bundler is not installed, run `gem install bundler`, then repeat this command.
61+
If an error indicates Bundler is not installed, run `gem install bundler`, then repeat this command.
6262

6363
. Rename this README so _init_ does not overwrite it.
6464
+
6565
.Example
6666
----
6767
mv README.adoc README.meta.adoc
6868
----
69+
+
70+
This file may confuse future users; we advise removing it before sharing your LDCMF project.
6971

7072
. Edit your project metafile.
7173
+
72-
In your favorite text/code editor, open `_data/meta.yml` and fill out the required info, then *save the file*.
74+
In your favorite text/code editor, open `data/meta.yml` and fill out the required info, then *save the file*.
7375

7476
. Run LiquiDoc with the LDCMF initialization config.
7577
+
7678
----
7779
bundle exec liquidoc -c _init/init.yml
7880
----
81+
+
82+
This procedure customizes a few starter files based on `meta.yml`.
7983

80-
. You can now review and edit your `README.adoc` and `src/index.adoc` files with custom content.
84+
. You can now review your `README.adoc` and `content/index.adoc` files, editing and populating them with custom content.
8185

8286
. Delete or move the `README.meta.adoc` file (this file) and the `_init/` directory, which you will no longer need.
8387

8488
Further instructions are in your new README!
85-
The new README file is oriented for your project's future users, so you don't need to repeat setup steps.
89+
The new README file is oriented for your project's future users (and you!), so you don't need to repeat setup steps.
8690
Just run your first build.
8791

8892
== Structure
@@ -95,15 +99,15 @@ liquidoc-cmf/
9599
├── _configs/
96100
│ ├── asciidoctor.yml
97101
│ └── build-docs.yml
98-
├── _data/
102+
├── data/
99103
│ └── meta.yml
100104
├── _templates/
101105
│ └── liquid/
102106
│ └── company.asciidoc
103-
├── src/
107+
├── content/
104108
│ ├── assets/
105109
│ ├── includes/
106-
│ ├── portal/
110+
│ ├── pages/
107111
│ ├── topics/
108112
│ └── index.adoc
109113
└── theme/
@@ -112,7 +116,7 @@ Gemfile
112116
----
113117

114118
[NOTE]
115-
Empty directories (ex., `src/assets/`) must be manually added.
119+
Empty directories (ex., `content/assets/`) must be manually added.
116120

117121
== Contributing
118122

_configs/asciidoctor.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
# This file contains global Asciidoctor attributes
22
imagesdir: assets/images
3+
safe: 0
4+
icons: font

_configs/build-docs.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
# Move critical files to the temporary build directory
22
- action: migrate
3-
source: src
4-
target: build
3+
source: content/
4+
target: _build/
55
options:
6-
inclusive: false # Duplicate the files without the src/ dir
6+
inclusive: false # Duplicate the files without the content/ dir
77
- action: migrate
8-
source: theme
9-
target: build
8+
source: theme/
9+
target: build/
1010
- action: parse
11-
data: _data/meta.yml
11+
data: data/meta.yml
1212
builds:
13-
- output: build/includes/built/company-info.adoc
13+
- output: _build/includes/_built_company-info.adoc
1414
template: _templates/liquid/company-info.asciidoc
1515
# Render your publication with Asciidoctor
1616
- action: render
17-
source: build/index.adoc
17+
source: _build/index.adoc
1818
data: _configs/asciidoctor.yml
1919
builds:
20-
- output: build/output/docs.html
20+
- output: _build/output/docs.html
2121
properties:
22-
files: _data/meta.yml
22+
files: data/meta.yml

_init/init.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
- action: parse
22
data:
3-
file: _data/meta.yml
3+
file: data/meta.yml
44
builds:
55
- output: README.adoc
66
template: _init/templates/init_readme.asciidoc
7-
- output: src/index.adoc
7+
- output: content/index.adoc
88
template: _init/templates/init_index.asciidoc

_init/templates/init_index.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
== Maker Info
44

5-
include::includes/built/company-info.adoc[]
5+
include::includes/_built_company-info.adoc[]

_init/templates/init_readme.asciidoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,6 @@ bundle exec liquidoc -c _configs/build-docs.yml
4343

4444
== Build
4545

46-
To build, run `bundle exec liquidoc -c _config/build-docs.yml`.
46+
To build, run `bundle exec liquidoc -c _configs/build-docs.yml`.
4747

48-
Check out the results in `build/output/`.
48+
Check out the results in `_build/output/`.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)