You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This adds two features that are sort of interlinked in their
implementation but not so much in their use. We want them both though, I
think:
1. Allows books to explictly depend on files in the docs repo so they
are rebuilt when those files are changed.
2. Create attributes for the "root" of each repository. This should make
a lot of the `../../../../` paths unneeded.
So the second feature allows you to write includes like:
```
include::{elasticsearch-root}/docs/reference/glossary.asciidoc[]
```
instead of:
```
include::{docdir}/../../../../elasticsearch/docs/reference/glossary.asciidoc[]
```
The first feature combined with the second feature lets you write this
to include the shared files:
```
include::{docs-root}/shared/versions/stack/{source_branch}.asciidoc[]
include::{docs-root}/shared/attributes.asciidoc[]
```
instead of:
```
include::{asciidoc-dir}/../../shared/versions/stack/{source_branch}.asciidoc[]
include::{asciidoc-dir}/../../shared/attributes.asciidoc[]
```
Which is nice. In addition, the first feature lets you write:
```
-
repo: docs
path: shared/attributes.asciidoc
-
repo: docs
path: shared/versions/stack/{version}.asciidoc
```
in `conf.yaml` to cause a book to be rebuilt if either:
* `attributes.asciidoc` changes
* `shared/versions/stack/master.asciidoc` changes. Assuming we're
building the master branch of the book. It'll be `7.x.asciidoc` if we're
building `7.x`, etc.
You can also declare a dependency on
`shared/versions/stack/current.asciidoc` and we'll cause a rebuild if
either `current.asciidoc` changes to point to a new file *or* the file
that it points to changes.
0 commit comments