redhataccess / ascii_binder

AsciiBinder is an AsciiDoc-based system for authoring and publishing closely related documentation sets from a single source.
https://asciibinder.net
MIT License
76 stars 39 forks source link

Support for Entity Files #61

Closed bexelbie closed 4 years ago

bexelbie commented 8 years ago

My use case involves two things:

1) A need to maintain a large set of text replacements (attributes in AsciiDoc or entities in DocBook) that I keep in a separate file. There is one copy per version/branch.

2) The need to share my repository with a downstream contributor who needs to be able to reorganize the files when they publish their version.

The second point makes it harder for me to just include::entities.adoc[] with proper pathing (see #60 ) in every file.

Would we be willing to add an Entity declaration to the _topic_map.yml? I see it operating like this:


---
Name: AsciiBinder Doc Project
Dir: welcome
Entity: global
Topics:
  - Name: Welcome
    File: index
  - Name: Bar
    File: bar
  - Name: Topic
    Dir: topic
    Entity: ent
    Topics:
        - Name: Foo
          File: foo

The file global.adoc is loaded and prepended to all files in the entire "AsciiBinder Doc Project". This way any entities in this file are available to all asciidoc pages. The file ent.adoc is loaded and prepended only for files in the "Topic" topic set.

global.adoc lives in the welcome/ directory. ent.adoc lives in the welcome/topic/ directory.

No include directives are required. This functionality would be optional.