Skip to content
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

Modeldoc generator specifies the page base path, hugo build improvements #20

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: "0.110.0"
hugo-version: "0.118.2"
extended: true
- name: Setup swap space
# The Hugo build can require a significant amount of memory
Expand Down
10 changes: 10 additions & 0 deletions site/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,13 @@ menu:
- name: Github
url: https://github.com/usnistgov/OSCAL-Reference
weight: 90
# Disable RSS generation everywhere
outputs:
page:
- HTML
home:
- HTML
section:
- HTML
taxonomy:
- HTML
12 changes: 9 additions & 3 deletions support/generate_modeldoc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,20 @@ do {
model_rawname=${model_basename#oscal_}
model_rawname=${model_rawname%_metaschema.xml}

export HUGO_MODEL_DATA_DIR="data/models/${REVISION}/${model_rawname}"
model_data="${SITE_DIR}/$HUGO_MODEL_DATA_DIR"
# The path to the model relative to the hugo data dir, output dir, and site root
model_output_path="models/${REVISION}/${model_rawname}"

# The directory Hugo will read the models from relative to the site directory
export HUGO_MODEL_DATA_DIR="data/$model_output_path"

# The root of the OSCAL Reference site
page_base_path="OSCAL-Reference/$model_output_path/"

mvn \
--quiet \
-f "${METASCHEMA_DIR}/support/pom.xml" exec:java \
-Dexec.mainClass="com.xmlcalabash.drivers.Main" \
-Dexec.args="-i source=$model_path output-path=file://$model_data/ ${METASCHEMA_DIR}/src/document/write-hugo-metaschema-docs.xpl"
-Dexec.args="-i source=$model_path page-base-path=$page_base_path output-path=file://${SITE_DIR}/$HUGO_MODEL_DATA_DIR/ ${METASCHEMA_DIR}/src/document/write-hugo-metaschema-docs.xpl"

archetype=""
model_doc_path=""
Expand Down
2 changes: 1 addition & 1 deletion support/metaschema-xslt
Submodule metaschema-xslt updated 30 files
+4 −1 .gitmodules
+43 −15 README.md
+5 −0 bin/metaschema-xslt
+53 −12 src/README.md
+55 −0 src/common/datatypes.xsl
+2 −1 src/compose/testing/working_metaschema.xml
+6 −201 src/converter-gen/nist-metaschema-MAKE-JSON-TO-XML-CONVERTER.xsl
+6 −163 src/converter-gen/nist-metaschema-MAKE-XML-TO-JSON-CONVERTER.xsl
+13 −0 src/converter-gen/testing/definition-maps/computer-build-reduce-map-output.xml
+39 −0 src/converter-gen/testing/xml-to-json/produce-xml-converter.xspec
+1 −1 src/converter-gen/xml-to-json/produce-xml-converter.xsl
+114 −0 src/document/METASCHEMA-DOCS-DIVS-write.xpl
+89 −0 src/document/METASCHEMA-DOCS-DIVS.xpl
+2 −2 src/document/METASCHEMA-DOCS-TESTSITE-write.xpl
+41 −1 src/document/METASCHEMA-DOCS-TRACE.xpl
+12 −14 src/document/Makefile
+28 −15 src/document/README.md
+4 −5 src/document/common/common-definitions.xsl
+4 −8 src/document/json/json-docs-hugo-uswds.xsl
+6 −6 src/document/json/object-map-html.xsl
+4 −6 src/document/json/object-reference-html.xsl
+0 −394 src/document/make-metaschema-standalone-docs.xpl
+0 −67 src/document/mvn-schemadocs-debug-xpl.sh
+11 −18 src/document/mvn-schemadocs-testsite-xpl.sh
+44 −28 src/document/write-hugo-metaschema-docs.xpl
+8 −8 src/document/xml/element-map-html.xsl
+6 −5 src/document/xml/element-reference-html.xsl
+4 −9 src/document/xml/xml-docs-hugo-uswds.xsl
+2 −2 src/testing/issue_235_regression.xspec
+1 −1 support/metaschema