Rename latestVersion to defaultVersion (#639)

* Rename lastVersion to defaultVersion

* Added defaultVersionShown to site-config doc

* Remove defaultVersionShown from siteConfig

* Update api-site-config.md
This commit is contained in:
Erin Teo 2018-05-05 17:24:39 -07:00 committed by Yangshun Tay
parent dbc597bfd7
commit 5771549e75
5 changed files with 12 additions and 8 deletions

View file

@ -190,7 +190,7 @@ function execute(port) {
rawContent = insertTableOfContents(rawContent);
}
let latestVersion = env.versioning.latestVersion;
let defaultVersion = env.versioning.defaultVersion;
// replace any links to markdown files to their website html links
Object.keys(mdToHtml).forEach(function(key, index) {
@ -198,7 +198,7 @@ function execute(port) {
link = link.replace('/en/', '/' + language + '/');
link = link.replace(
'/VERSION/',
metadata.version && metadata.version !== latestVersion
metadata.version && metadata.version !== defaultVersion
? '/' + metadata.version + '/'
: '/'
);