spec-up-t 1.0.30 → 1.0.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -293,6 +293,9 @@ module.exports = function(options = {}) {
293
293
  doc = applyReplacers(doc);
294
294
  md[spec.katex ? "enable" : "disable"](katexRules);
295
295
  const render = md.render(doc);
296
+
297
+ // If the first character of the output_path is a dot, remove it
298
+ const outputPathMadeRelative = spec.output_path.startsWith('.') ? spec.output_path.slice(1) : spec.output_path;
296
299
 
297
300
  const templateInterpolated = interpolate(template, {
298
301
  title: spec.title,
@@ -306,7 +309,8 @@ module.exports = function(options = {}) {
306
309
  xrefsData: xrefsData,
307
310
  specLogo: spec.logo,
308
311
  specLogoLink: spec.logo_link,
309
- spec: JSON.stringify(spec)
312
+ spec: JSON.stringify(spec),
313
+ pathToVersions: outputPathMadeRelative + '/versions/',
310
314
  });
311
315
 
312
316
  fs.writeFile(path.join(spec.destination, 'index.html'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spec-up-t",
3
- "version": "1.0.30",
3
+ "version": "1.0.31",
4
4
  "description": "Technical specification drafting tool that generates rich specification documents from markdown. Forked from https://github.com/decentralized-identity/spec-up by Daniel Buchner (https://github.com/csuwildcat)",
5
5
  "main": "./index",
6
6
  "repository": {
@@ -56,7 +56,7 @@ function createVersionsIndex() {
56
56
  <h1 class="mb-4">Spec-Up-T Snapshot Index</h1>
57
57
  <p>This page lists all available snapshots of this Spec-Up-T specification.</p>
58
58
  <ul class="list-group">
59
- <li class="list-group-item"><a href="../index.html">Latest version</a></li>
59
+ <li class="list-group-item"><a href="../">Latest version</a></li>
60
60
  `;
61
61
 
62
62
  if (dirs.length === 0) {
@@ -64,7 +64,7 @@
64
64
  <div id="toc_list">
65
65
  ${toc}
66
66
  </div>
67
- <div class="snapshots"><a href="versions">Snapshots</a></div>
67
+ <div class="snapshots"><a href="${pathToVersions}">Snapshots</a></div>
68
68
  </slide-panel>
69
69
 
70
70
  </slide-panels>