File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -24,8 +24,10 @@ cp -p node_modules/respec/builds/respec-w3c.* $deploydir/js/
24
24
25
25
latest=$( git describe --abbrev=0 --tags)
26
26
27
+ allVersions=$( ls -1 versions/[23456789].* .md | grep -v -e " \-editors" | sort -r)
28
+
27
29
if [ -z " $1 " ]; then
28
- specifications=$( ls -1 versions/[23456789]. * .md | grep -v -e " \-editors " | sort -r )
30
+ specifications=$allVersions
29
31
elif [ " $1 " = " latest" ]; then
30
32
specifications=$( ls -1 versions/$latest .md)
31
33
elif [ " $1 " = " src" ]; then
@@ -53,7 +55,7 @@ for specification in $specifications; do
53
55
54
56
echo === Building $version to $destination
55
57
56
- node scripts/md2html/md2html.js --maintainers $maintainers $specification > $tempfile
58
+ node scripts/md2html/md2html.js --maintainers $maintainers $specification " $allVersions " > $tempfile
57
59
npx respec --no-sandbox --use-local --src $tempfile --out $destination
58
60
rm $tempfile
59
61
Original file line number Diff line number Diff line change @@ -77,6 +77,7 @@ const md = require('markdown-it')({
77
77
} ) ;
78
78
79
79
function preface ( title , options ) {
80
+ const otherVersions = options . _ [ 1 ] . split ( '\n' ) . map ( v => path . basename ( v , '.md' ) ) . filter ( v => v !== options . subtitle ) ;
80
81
const respec = {
81
82
specStatus : "base" ,
82
83
latestVersion : "https://spec.openapis.org/oas/latest.html" ,
@@ -96,6 +97,14 @@ function preface(title,options) {
96
97
height : 48 ,
97
98
url : "https://openapis.org/" } ] ,
98
99
otherLinks : [
100
+ {
101
+ key : "Other versions:" ,
102
+ data : otherVersions . map ( v => {
103
+ return {
104
+ href : `https://spec.openapis.org/oas/v${ v } .html`
105
+ }
106
+ } )
107
+ } ,
99
108
{
100
109
key : "Participate" ,
101
110
data : [
You can’t perform that action at this time.
0 commit comments