Skip to content

Conversation

@jooohhn
Copy link
Contributor

@jooohhn jooohhn commented Sep 3, 2020

Check it out at https://amplitude.github.io/Amplitude-JavaScript/

Summary

  • Created website/ folder containing content for developing and deploying the reference website using docusaurus
    • Uses npx @docusaurus/init@next init docs classic template and replaces it with amplitude related content
  • Create website/generate-jsdoc.js that scans src/ and outputs autogenerated markdown docs in website/docs/
    • Uses jsdoc2md package as an API to interact with jsdoc comments
  • Created website/README.md for development and deployment instructions

Copy link
Contributor

@haoliu-amp haoliu-amp left a comment

Choose a reason for hiding this comment

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

All the generated markdown file shouldn't be checked into master branch.

They should be generated when you trigger a new release and putting them to gh-pages branch.

@jooohhn jooohhn marked this pull request as ready for review September 3, 2020 16:30
Copy link
Contributor

@kelvin-lu kelvin-lu left a comment

Choose a reason for hiding this comment

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

exciting 🚢

"build": "docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
"serve": "docusaurus build --out-dir build/Amplitude-JavaScript && yarn run docusaurus serve"
Copy link
Contributor

Choose a reason for hiding this comment

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

how would you feel if docusarus did not run on port :3000 as default? :)

@jooohhn jooohhn merged commit d202126 into master Sep 4, 2020
@jooohhn jooohhn deleted the docs-deployment branch September 18, 2020 21:29
jooohhn added a commit to jooohhn/Amplitude-JavaScript that referenced this pull request Sep 21, 2020
* init docusaurus

* remove blog

* replace image assets

* update footer

* update navbar

* update docusaurus config

* edit landing page

* change css theme

* add amplitude-js docs

* add jsdoc-to-markdown

* add generate-jsdoc.js and prettier to format md output

* Replace default docs with generated API docs

* remove footer content

* make sidebar uncollapsible

* add syntax highlight to examples

* change docusaurus target browsers

* change docs to include constructor

* make website docs only

* change docs/ to website/

* fix baseUrl config

* Fix baseUrl problem with yarn serve

* update readme

* delete autogenerated docs

* Add autogenerated docs to gitignore
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.

4 participants