Support linking to "old suites" in the HTML index
This is mainly so that for Ubuntu's asgen we can easily link to the hints for xenial and yakkety, but could be useful for others too.
This commit is contained in:
parent
9f1fa032a3
commit
ddc1105847
@ -17,6 +17,9 @@
|
||||
</p>
|
||||
|
||||
<h1>Select a suite</h1>
|
||||
{{#oldsuites}}
|
||||
<h3><a href="{{suite}}/index.html">{{suite}}</a></h3>
|
||||
{{/oldsuites}}
|
||||
{{#suites}}
|
||||
<h3><a href="{{suite}}/index.html">{{suite}}</a></h3>
|
||||
{{/suites}}
|
||||
|
@ -17,6 +17,9 @@
|
||||
</p>
|
||||
|
||||
<h1>Select a suite</h1>
|
||||
{{#oldsuites}}
|
||||
<h3><a href="{{suite}}/index.html">{{suite}}</a></h3>
|
||||
{{/oldsuites}}
|
||||
{{#suites}}
|
||||
<h3><a href="{{suite}}/index.html">{{suite}}</a></h3>
|
||||
{{/suites}}
|
||||
|
@ -46,6 +46,7 @@ MetadataType | The type of the resulting AppStream metadata. Can be one of `YAML
|
||||
ArchiveRoot | A local URL to the mirror of your archive, containing the dists/ and pool/ directories
|
||||
MediaBaseUrl | The http or https URL which should be used in the generated metadata to fetch media like screenshots or icons
|
||||
HtmlBaseUrl | The http or https URL to the web location where the HTML hints will be published. (This setting is optional, but recommended)
|
||||
Oldsuites | This key exists to support migration from an alternative appstream generator. Given a list of suite names, the output HTML will link to `suitename/index.html`.
|
||||
Suites | Suites which should be recognized by the generator. Each suite has the components and architectures which should be searched for metadata as children. See below for more information.
|
||||
Features | Disable or enable selected generator features. For a detailed description see below.
|
||||
CAInfo | Set the CA certificate bundle file to use for SSL peer verification. If this is not set, the generator will use the system default.
|
||||
|
@ -95,6 +95,7 @@ class Config
|
||||
|
||||
Backend backend;
|
||||
Suite[] suites;
|
||||
string[] oldsuites;
|
||||
DataType metadataType;
|
||||
uint enabledFeatures; // bitfield
|
||||
|
||||
@ -331,6 +332,12 @@ class Config
|
||||
suites ~= suite;
|
||||
}
|
||||
|
||||
if ("Oldsuites" in root.object) {
|
||||
import std.algorithm.iteration : map;
|
||||
|
||||
oldsuites = map!"a.str"(root["Oldsuites"].array).array;
|
||||
}
|
||||
|
||||
// Enable features which are default-enabled
|
||||
setFeature (GeneratorFeature.PROCESS_DESKTOP, true);
|
||||
setFeature (GeneratorFeature.VALIDATE, true);
|
||||
|
@ -758,6 +758,11 @@ public:
|
||||
renderPage ("sections_index", format ("%s/index", suite.name), secCtx);
|
||||
}
|
||||
|
||||
foreach (suite; conf.oldsuites) {
|
||||
auto sub = context.addSubContext("oldsuites");
|
||||
sub["suite"] = suite;
|
||||
}
|
||||
|
||||
renderPage ("main", "index", context);
|
||||
|
||||
// copy static data, if present
|
||||
|
Loading…
Reference in New Issue
Block a user