Closed hossman closed 7 years ago
Based on some experimentation today, it seems like there's basically 3 diff things we need to worry about here, to solve both this issue and issue #26 ...
<attribute/>
element for the <asciidoctor>
ant task_config.yml
defines which attributes get used_adoc_config.yml.template
file committed into git, into a _adoc_config.yml
file we pass to jekyll with any necessary attribute value variables expanded to some corresponding property: https://ant.apache.org/manual/Types/filterchain.html#expandproperties_data/ant_properties.yml
file containing the properties we need liquid to have access to, and then the templates can access them just like they access the sidebar data via {{ site.data.ant_properties.whatever }}
I'll dig into this more tomorow...
It's not clear if you know this already, but the liquid templates can pull from _config.yml
with syntax like {{site.<param>}}
in the templates. The param can be whatever name you want it to be. It feels to me that 3 on your list could be satisfied with that, but I may by missing nuances.
To automate this, is it possible to just have something in Ant or in a script that's run that finds out the version from wherever it's stored in the Solr tree for the dist and package builds and updates _config.yml and build.xml for docs?
It's not clear if you know this already, but the liquid templates can pull from
_config.yml
...
I did not realize that -- that simplifies things greatly (i knew about _data/foo.yml
being mapped to site.data.foo...
but didn't realize you could just get stuff straight from _config.yml
)
To automate this, is it possible to just have something in Ant or in a script that's run that finds out the version from wherever it's stored in the Solr tree for the dist and package builds and updates _config.yml ...
yup, yup ... that's basically what i've got locally - a _data/adoc-attributes.yml.template
file that ant does property value substituion on to create _data/adoc-attributes.yml
with things like solr-docs-version
and solr-javadocs
properties filled in.
I'll simplify that to just work with a _config.yml.template
file instead
We need to ensure that anywhere in the ref guide that refers to the version# gets it's info from a variable defined at build time via an ant property.
In some cases this should be easy using asciidoctor run time attributes, which IIUC can be used in pages as if variables, but other places like layout or theme based yaml/json config files may be trickier.