Skip to content

Commit

Permalink
Tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
yangshun committed Jun 2, 2018
1 parent ca4a632 commit 0142815
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 16 deletions.
6 changes: 3 additions & 3 deletions docs/api-site-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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).
Expand Down
13 changes: 6 additions & 7 deletions docs/getting-started-publishing.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
4 changes: 0 additions & 4 deletions examples/basics/siteConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'},
Expand Down
4 changes: 2 additions & 2 deletions lib/publish-gh-pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 0142815

Please sign in to comment.