Logius-standaarden / respec

A tool for creating technical documents and web standards
https://respec.org/
Other
1 stars 4 forks source link

Header is not generated #55

Open lvdbrink opened 1 year ago

lvdbrink commented 1 year ago

Description of problem

ReSpec no longer generates the header with document urls, authors, link to github, license etc.

URL to affected spec or repo:

https://lvdbrink.github.io/logius-respec-test/

What happened (e.g., it crashed)?: The document starts with the title, abstract and TOC. The document meta-information is not shown. Console shows an error:

base-runner.js:29 TypeError: Cannot read properties of undefined (reading 'forEach')
    at i (headers.js:116:11)
    at Object.run (headers.js:126:9)
    at base-runner.js:76:18
    at new Promise (<anonymous>)
    at base-runner.js:60:25
    at async mt (base-runner.js:54:1)
    at async Wt (respec.css.js:6:19)

If I test the same doc with w3c respec the header does show.

Expected behavior (e.g., it shouldn't crash):

Optional, steps to reproduce:

  1. ...
sanderke commented 1 year ago

It appears the new URL variables were not in the configuration file(s):

edDraftURI: ["github"],
latestVersion: ["nl_organisationPublishURL", "pubDomain", "/"],
thisVersion: ["nl_organisationPublishURL", "pubDomain", "/", "specStatus", "-", "specType", "-", "shortName", "-", "publishDate"],
prevVersion: ["nl_organisationPublishURL", "pubDomain", "/", "previousMaturity", "-", "specType", "-", "shortName", "-", "publishDate"],

Adding them gives this result.

I'll keep this issue open until warnings are added for a more graceful failure.

lvdbrink commented 1 year ago

Thank you, that works. Now I understand how to configure these URLs.

I would like to do this configuration on the organisation level, rather than the document level. Is that possible or would that be a feature request?

sanderke commented 1 year ago

Certainly, just place the lines in an organisation level config file. They will be merged, with the document config overwriting in the case of duplicate entities.

For example:

<script class="remove" src="https://gitdocumentatie.logius.nl/publicatie/respec/organisation-config.js"></script>
<script class="remove" src="js/config.js"></script>
<script>respecConfig = {...organisationConfig, ...respecConfig};</script>
lvdbrink commented 1 year ago

Ik denk dat deze gesloten kan worden.