Skip to content

Commit

Permalink
Add "releaseUrl" and "nightlyUrl" to "series" objects
Browse files Browse the repository at this point in the history
This adds a `releaseUrl` and `nightlyUrl` properties to `series` objects that
target the unversioned URLs.

The properties are set when possible. In many cases, typically when the spec is
a non-leveled spec, they are set to the same URLs as the `release.url` and
`nightly.url` properties.

Generation code remains fairly generic. This seems to work well.

Fixes #282.
  • Loading branch information
tidoust committed May 5, 2021
1 parent dfa730c commit b5e887f
Show file tree
Hide file tree
Showing 7 changed files with 1,282 additions and 397 deletions.
36 changes: 35 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ cross-references, WebIDL, quality, etc.
- [`series`](#series)
- [`series.shortname`](#seriesshortname)
- [`series.currentSpecification`](#seriescurrentspecification)
- [`series.releaseUrl`](#seriesreleaseurl)
- [`series.nightlyUrl`](#seriesnightlyurl)
- [`seriesVersion`](#seriesversion)
- [`seriesComposition`](#seriescomposition)
- [`seriesPrevious`](#seriesprevious)
Expand Down Expand Up @@ -86,7 +88,9 @@ Each specification in the list comes with the following properties:
"shortTitle": "CSS Color 4",
"series": {
"shortname": "css-color",
"currentSpecification": "css-color-4"
"currentSpecification": "css-color-4",
"releaseUrl": "https://www.w3.org/TR/css-color/",
"nightlyUrl": "https://drafts.csswg.org/css-color/"
},
"seriesVersion": "4",
"seriesComposition": "full",
Expand Down Expand Up @@ -188,6 +192,36 @@ version in the series that is a "full" spec (see
The `currentSpecification` property is always set.


#### `series.releaseUrl`

The URL of the latest published snapshot for the spec series. For leveled specs
(those that create a series), this matches the unversioned URL. That
unversioned URL should return the specification identified by the
[`currentSpecification`](#seriescurrentspecification) property.

For instance, this property will be set to `https://www.w3.org/TR/css-fonts/`
for all specifications in the CSS Fonts series.

For non-leveled specs, this matches the [`url`](#url) property.

The `releaseUrl` property is only set for W3C specs published as TR documents.


#### `series.nightlyUrl`

For leveled specs (those that create a series), this matches the unversioned URL
that allows to access the latest Editor's Draft of the current specification in
the series.

For instance, this property will be set to `https://drafts.csswg.org/css-fonts/`
for all specifications in the CSS Fonts series.

For specs that are not part of a series of specs, this matches the
[`nightly.url`](#nightlyurl) property.

The `nightlyUrl` property is always set.


### `seriesVersion`

The level or version of the spec, represented as an `x`, `x.y` or `x.y.z` string
Expand Down
Loading

0 comments on commit b5e887f

Please sign in to comment.