Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix links in docs #4200

Merged
merged 3 commits into from
Mar 21, 2017
Merged

fix links in docs #4200

merged 3 commits into from
Mar 21, 2017

Conversation

brandonocasey
Copy link
Contributor

Description

  • Update the API doc build to fix links after generation
  • Fix any currently broken API docs
  • Used linkdown to make sure links are working

Outstanding Issues (probably for another PR)

  • The tech source handler mixin is currently not showing/broken in the docs
  • videojs itself does not show most of its functions in the API docs
  • Some things are using Dom when they should be using module:dom

Requirements Checklist

  • Feature implemented / Bug fixed
  • If necessary, more likely in a feature request than a bug fix
    • Change has been verified in an actual browser (Chome, Firefox, IE)
    • Docs/guides updated
    • Reviewed by Two Core Contributors


var replacements = [
{find: '\"/docs/guides/\"', replace: '"#"'},
{find: '\"/docs/guides/(.*)\.md\"', replace: '"tutorial-$1.html"'},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be the first item in the array? That is, do the most specific changes first and work towards more generic ones after?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah that probably makes sense let me try it out

var replacements = [
{find: '\"/docs/guides/\"', replace: '"#"'},
{find: '\"/docs/guides/(.*)\.md\"', replace: '"tutorial-$1.html"'},
{find: '\"tutorial-tech.html\"', replace: '"tutorial-tech_.html"'}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this page rendered as tech_?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not entirely sure, I think it may have something to do with a file name tech already existing? Either that or the source handler weirdness, (jsdoc links to -_Tech.html on the Tech API docs)

package.json Outdated
@@ -27,6 +27,7 @@
"docs": "npm run docs:lint && npm run docs:api",
"jsdoc": "jsdoc",
"docs:api": "jsdoc -c .jsdoc.json",
"postdocs:api": "node ./build/fix-api-docs.js",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this runs immediately after docs:api and before the prepublish script finishes, as an example?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should run directly after docs:api and before anything else I would think. Would we rather use npm-run-all here so its more clear?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I think it's fine. Just wanted to verify that prepublish should work as we expect so the urls will get changed as part of that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

manually verified that this will work by run npm run prepublish

var apiPath = path.join(__dirname, '..', 'docs', 'api');

var replacements = [
{find: /\/docs\/guides\/(.+)\.md/, replace: 'tutorial-$1.html'},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of these need the global flag to apply properly to all occurrences in the file.

@gkatsev gkatsev merged commit 61e2078 into master Mar 21, 2017
@gkatsev gkatsev deleted the fix/doc-links branch March 21, 2017 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants