-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: use new collection functionality #186
Conversation
@abunashir there are several problems with the current functionality implemented in metanorma/metanorma-cli#205.
|
output_folder: brochure |
Clearly the metanorma collection
command is not reading the YAML options properly. This needs to be fixed.
metanorma site generate
with a collection source file generates output in the wrong location
Notice that collection.yaml
has this line:
bipm-si-brochure/collection.yml
Line 30 in a588390
output_folder: brochure |
But the site generate
command output location should override the specified output folder, because the whole point of site generate
is to keep the generated output under /site/
for deployment to a website.
This case is similar to when we run the normal metanorma
command:
$ metanorma compile path/document.adoc
# => generates under path/document.xml
$ metanorma site generate config.yml # which points to path/document.adoc
# => generates under site/path/document.xml
Methods to generate a defined collection
As I updated in the README, there are two ways to generate a collection.
Method 1: single command to generate the dependencies and then the collection (with the order fixed in the "site generate" file)
$ metanorma site generate -c brochure.yml --agree-to-terms
Problem: This method works, but generates the collection in the originally defined location, not the "site generate" location.
Method 2: separately compile the source components and create the collection
$ metanorma sources/si-brochure-en.adoc
$ metanorma sources/si-brochure-fr.adoc
$ mkdir -p site/documents
$ mv sources/si-brochure-en.xml site/documents
$ mv sources/si-brochure-fr.xml site/documents
$ metanorma collection collection.yml
Problem: This method is not working because of the CLI argument issue.
Completion of this PR requires these issues fulfilled: |
Thanks for the all the details @ronaldtse, I guess previously I only implemented it for the |
This commit tries to use the in-progress gem from github to verify that it works as expected. Once, those are merged then please switch back to the stable releases.
This works! Thank you @abunashir. There is just one problem -- the |
Fixes #185.
Related to metanorma/metanorma-cli#205
Metanorma PR checklist