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 +5 -1
- package/package.json +1 -1
- package/src/create-versions-index.js +1 -1
- package/templates/template.html +1 -1
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.
|
|
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="../
|
|
59
|
+
<li class="list-group-item"><a href="../">Latest version</a></li>
|
|
60
60
|
`;
|
|
61
61
|
|
|
62
62
|
if (dirs.length === 0) {
|
package/templates/template.html
CHANGED