Skip to content

Commit

Permalink
build: check for 404s in the docs (#1562)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation authored and JustinBeckwith committed Jan 28, 2019
1 parent d49aa49 commit ecb2c28
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Expand Up @@ -10,7 +10,7 @@ Thanks for stopping by to let us know something could be better!

Please run down the following list and make sure you've tried the usual "quick fixes":

- Search the issues already opened: https://github.com/google/google-api-nodejs-client/issues
- Search the issues already opened: https://github.com/googleapis/google-api-nodejs-client/issues
- Search the issues on our "catch-all" repository: https://github.com/googleapis/google-cloud-node
- Search StackOverflow: http://stackoverflow.com/questions/tagged/google-cloud-platform+node.js

Expand Down
2 changes: 1 addition & 1 deletion .jsdoc.js
Expand Up @@ -20,7 +20,7 @@ module.exports = {
opts: {
readme: './README.md',
package: './package.json',
template: './node_modules/ink-docstrap/template',
template: './node_modules/jsdoc-baseline',
recurse: true,
verbose: true,
destination: './docs/'
Expand Down
8 changes: 8 additions & 0 deletions .kokoro/docs.sh
Expand Up @@ -23,3 +23,11 @@ cd $(dirname $0)/..
npm install

npm run docs

# Check broken links
BIN=./node_modules/.bin

npm install broken-link-checker
npm install http-server
$BIN/http-server -p 8080 docs/ &
$BIN/blc -r http://localhost:8080
7 changes: 6 additions & 1 deletion src/generator/docs.ts
Expand Up @@ -26,7 +26,12 @@ const writeFile = promisify(fs.writeFile);
const srcPath = path.join(__dirname, '../../../src');
const apiPath = path.join(srcPath, 'apis');
const templatePath = path.join(srcPath, 'generator/templates/index.html.njk');
const indexPath = path.join(__dirname, '../../../docs/index.html');
const docsPath = path.join(__dirname, '../../../docs');
const indexPath = path.join(docsPath, 'index.html');

if (!fs.existsSync(docsPath)) {
fs.mkdirSync(docsPath);
}

/**
* Iterate over each API directory, and use the `compodoc` tool to generate
Expand Down
4 changes: 2 additions & 2 deletions synth.metadata
@@ -1,11 +1,11 @@
{
"updateTime": "2018-12-12T12:06:29.527675Z",
"updateTime": "2019-01-22T12:06:08.587628Z",
"sources": [
{
"template": {
"name": "node_library",
"origin": "synthtool.gcp",
"version": "2018.12.6"
"version": "2019.1.16"
}
}
]
Expand Down

0 comments on commit ecb2c28

Please sign in to comment.