From 0142815cf2a812f42e7c9e1957e52d62c9ea7145 Mon Sep 17 00:00:00 2001 From: Yangshun Tay Date: Sat, 2 Jun 2018 15:34:00 -0700 Subject: [PATCH] Tweak --- docs/api-site-config.md | 6 +++--- docs/getting-started-publishing.md | 13 ++++++------- examples/basics/siteConfig.js | 4 ---- lib/publish-gh-pages.js | 4 ++-- 4 files changed, 11 insertions(+), 16 deletions(-) diff --git a/docs/api-site-config.md b/docs/api-site-config.md index 026aa8eb1c8d2..8f36a49377b16 100644 --- a/docs/api-site-config.md +++ b/docs/api-site-config.md @@ -62,9 +62,7 @@ headerLinks: [ `title` - Title for your website. -`url` - url for your site. - -`githubHost` - (optional) if you're using GitHub Enterprise, hostname of your server. +`url` - URL for your website. ### Optional Fields @@ -133,6 +131,8 @@ h1 { `gaGtag` - Set this to `true` if you want to use [global site tags (gtag.js)](https://developers.google.com/gtagjs/) for Google analytics instead of `analytics.js`. +`githubHost` - Hostname of your server. Useful if you are using GitHub Enterprise. + `highlight` - [Syntax highlighting](api-doc-markdown.md) options: * `theme` is the name of the theme used by Highlight.js when highlighting code. You can find the [list of supported themes here](https://github.com/isagalaev/highlight.js/tree/master/src/styles). diff --git a/docs/getting-started-publishing.md b/docs/getting-started-publishing.md index 2448d0fa2d89a..e22e4b3b0e4b0 100644 --- a/docs/getting-started-publishing.md +++ b/docs/getting-started-publishing.md @@ -205,16 +205,15 @@ Steps to configure your Docusaurus-powered site on Netlify. You can also configure Netlify to rebuild on every commit to your repo, or only `master` branch commits. -### Publishing to Github Enterprise +### Publishing to GitHub Enterprise -GitHub enterprise installations should work in the same manner as Github.com; -you need only identify the organization's Github Enterprise host. +GitHub enterprise installations should work in the same manner as github.com; you need only identify the organization's GitHub Enterprise host. | Name | Description | | ------------- | ----------------------------------------------- | -| `GITHUB_HOST` | The hostname for the github enterprise server. | +| `GITHUB_HOST` | The hostname for the GitHub enterprise server. | -Steps to publish to Github Enterprise: +Steps to publish to GitHub Enterprise: -1. Alter your siteConfig.js to add a property `'githubHost'` which represents the Github Enterprise hostname. -1. Alternatively, set an environment variable GITHUB_HOST when executing the publication step. +1. Alter your `siteConfig.js` to add a property `'githubHost'` which represents the GitHub Enterprise hostname. +1. Alternatively, set an environment variable `GITHUB_HOST` when executing the publication step. diff --git a/examples/basics/siteConfig.js b/examples/basics/siteConfig.js index 88bd2b62ac350..b73026bd0027e 100644 --- a/examples/basics/siteConfig.js +++ b/examples/basics/siteConfig.js @@ -36,10 +36,6 @@ const siteConfig = { // e.g., for the https://JoelMarcey.github.io site, it would be set like... // organizationName: 'JoelMarcey' - // Optional - // If you're using GitHub Enterprise hosting, specify your GHE host here. - // githubHost: 'github.mycompany.com' - // For no header links in the top nav bar -> headerLinks: [], headerLinks: [ {doc: 'doc1', label: 'Docs'}, diff --git a/lib/publish-gh-pages.js b/lib/publish-gh-pages.js index 06d4f49d071ee..e9555965a6787 100755 --- a/lib/publish-gh-pages.js +++ b/lib/publish-gh-pages.js @@ -155,8 +155,8 @@ fs.copy( // The commit might return a non-zero value when site is up to date. const websiteURL = GITHUB_HOST === 'github.com' - ? `https://${ORGANIZATION_NAME}.github.io/${PROJECT_NAME}` // github.com hosted repo - : `https://${GITHUB_HOST}/pages/${ORGANIZATION_NAME}/${PROJECT_NAME}`; // github enterprise repo. + ? `https://${ORGANIZATION_NAME}.github.io/${PROJECT_NAME}` // gh-pages hosted repo + : `https://${GITHUB_HOST}/pages/${ORGANIZATION_NAME}/${PROJECT_NAME}`; // GitHub enterprise hosting. shell.echo(`Website is live at: ${websiteURL}`); shell.exit(0); }