Skip to content

Commit

Permalink
chore: update documentation site (microsoft#1536)
Browse files Browse the repository at this point in the history
* chore: update documentation with latest pipeline changes

* chore: update api documentation

* chore: update TypeDoc usage for contextual accuracy

* update to add ignore statement for typedoc generated files

* update localization file for docusaurus

* remove files to be ignored

* update locale file

* update to fix broken links in footer

* update to ignore autogenerated locale file
  • Loading branch information
awentzel authored Mar 19, 2019
1 parent c734634 commit 8c64c4c
Show file tree
Hide file tree
Showing 6 changed files with 3,673 additions and 91 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,11 @@ website/translated_docs
website/build/
website/yarn.lock
website/node_modules
website/i18n/*
website/i18n/

# Docusaurus package readme's
docs/en/packages/*/README.md

# TypeDoc generated subsites
docs/en/packages/*/api/

18 changes: 9 additions & 9 deletions build/documentation/generate-typedocs.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Utility for generating Typedoc API documentation and placing it in the docs/en/packages folder so it can be hosted by
* Utility for generating TypeDoc API documentation and placing it in the docs/en/packages folder so it can be hosted by
* Github pages and viewed through Docusaurus
*
* Usage :run node build/documentation/generate-typedocs.js OR
Expand Down Expand Up @@ -97,13 +97,13 @@ function execute() {

excludedPackages.forEach((excludedPackageName) => {
if (packageName === excludedPackageName) {
console.log(chalk.yellow(`...skip generating Typedoc API files for ${packageName}`));
console.log(chalk.yellow(`...skip generating TypeDoc API files for ${packageName}`));
valid = false;
}
});

if(valid) {
dryRun ? console.log(`...generate Typedoc API files for ${packageName}`) : createAPIFiles(packageName, srcPath);
dryRun ? console.log(`...generate TypeDoc API files for ${packageName}`) : createAPIFiles(packageName, srcPath);
dryRun ? console.log(`...add API link to ${packageName}`) : addAPILinkToReadme(packageName);
}

Expand All @@ -113,7 +113,7 @@ function execute() {
}

/**
* Uses Typedoc process to generate API docs for a given package
* Uses TypeDoc process to generate API docs for a given package
* Stores them in the docs/en/packages folder
*/
function createAPIFiles(packageName, srcPath) {
Expand All @@ -125,7 +125,7 @@ function createAPIFiles(packageName, srcPath) {
var typedocCmd = os.platform() == 'win32' ? 'typedoc.cmd' : 'typedoc';
var typedocPath = path.join('node_modules', '.bin', typedocCmd);

const typedoc = spawn(typedocPath, // the local typedoc installation is needed for the markdown theme to work
const typedoc = spawn(typedocPath, // the local TypeDoc installation is needed for the markdown theme to work
[
'--tsconfig', config,
'--excludeNotExported',
Expand All @@ -135,9 +135,9 @@ function createAPIFiles(packageName, srcPath) {

typedoc.on('close', code => {
if (code) {
console.log(chalk.red(`${packageName} - typedoc API docs not generated, error code: ${code}`));
console.log(chalk.red(`${packageName} - TypeDoc API docs not generated, error code: ${code}`));
} else {
console.log(`${packageName} - typedoc API docs generated`)
console.log(`${packageName} - TypeDoc API docs generated`)
addHeaderToReadme(packageName);
}
});
Expand All @@ -157,7 +157,7 @@ function createAPIFiles(packageName, srcPath) {
}

/**
* If the typedoc readme doesn't have this header
* If the TypeDoc readme doesn't have this header
* It won't be accessible in docusaurus
*/
function addHeaderToReadme(packageName) {
Expand All @@ -181,7 +181,7 @@ function addHeaderToReadme(packageName) {

/**
* Creates link in package readme.md docs used by Docusaurus
* Said link routes to the Typedoc API docs generated by this script
* Said link routes to the TypeDoc API docs generated by this script
*/
function addAPILinkToReadme(packageName) {

Expand Down
5 changes: 2 additions & 3 deletions docs/en/contributing/status.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,12 @@ This page can be used to display the health of FAST-DNA systems.

#### Builds (CI)

[![Build status](https://dev.azure.com/edgewebui/Edge%20Zero/_apis/build/status/Sites/Component%20Explorer%20-%20CI%20(FASTDNA))](https://dev.azure.com/edgewebui/Edge%20Zero/_build/latest?definitionId=44)

[![Build Status](https://dev.azure.com/edgewebui/FAST/_apis/build/status/Component%20Explorer%20-%20CI?branchName=master)](https://dev.azure.com/edgewebui/FAST/_build/latest?definitionId=65&branchName=master)

#### Deployments (CD)

| Staging | Production |
|--|--|
|[![Build status](https://vsrm.dev.azure.com/edgewebui/_apis/public/Release/badge/8965118a-33a2-4d12-a643-9044a1430ae7/1/1)](https://explore-stage.fastdna.net) |[![Build Status](https://vsrm.dev.azure.com/edgewebui/_apis/public/Release/badge/8965118a-33a2-4d12-a643-9044a1430ae7/1/2)](https://explore.fastdna.net) |
|[![Build status](https://vsrm.dev.azure.com/edgewebui/_apis/public/Release/badge/db5c5831-7b32-4ef1-9e7d-205361d49e08/2/2)](https://explore-stage.fastdna.net) |[![Build Status](https://vsrm.dev.azure.com/edgewebui/_apis/public/Release/badge/db5c5831-7b32-4ef1-9e7d-205361d49e08/2/3)](https://explore.fastdna.net) |
| https://explore-stage.fastdna.net | https://explore.fastdna.net |
* Automatically released after commit to master | * Manually released after design approval
6 changes: 2 additions & 4 deletions website/core/Footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ class Footer extends React.Component {
</a> */}
<div>
<h5>Guides</h5>
<a href={this.docUrl('en/contributing/install', this.props.language)}>
<a href="https://microsoft.github.io/fast-dna/docs/en/contributing/install">
Install
</a>
<a href={this.docUrl('en/packages/fast-animation', this.props.language)}>
<a href="https://microsoft.github.io/fast-dna/docs/en/packages/fast-animation/">
Packages
</a>
</div>
Expand Down Expand Up @@ -88,8 +88,6 @@ class Footer extends React.Component {
</a>
</div>
</section>


}
<section className="copyright">{this.props.config.copyright}</section>
</footer>
Expand Down
Loading

0 comments on commit 8c64c4c

Please sign in to comment.