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

feat: setup documentation website & document codebase with typedoc comments #268

Merged
merged 4 commits into from
Jan 29, 2025

Conversation

pedroalves0
Copy link
Member

@pedroalves0 pedroalves0 commented Jan 28, 2025

🗺 Overview

With the migration from the REST API to the Sync API we've decided to split the SDK documentation from the API website (https://developer.todoist.com/).

The documentation tool we settled on is typedoc and the content is published by a Docusaurus-generated website. To bridge typedoc with Docusarus the typedoc-plugin-markdown is used together with docusaurus-plugin-typedoc.

A separate PR will follow to automate the deployment of the Docusaurus website to GitHub pages.

Note: Although this PR is quite big, many files were generated by Docusaurus and do not need to be reviewed. For instance, all the *.md files besides about.md and authorization.md are auto-generated from typedoc comments.

Note: You'll see references to https://developer.todoist.com which don't quite match the SDK methods input and output. This is expected for the moment, as the API v9.208 is only documented internally.

🔗 Reference

🧪 Test plan

  • Changes introduced here have been manually tested by someone other than the PR author.

  • cd to todoist-api-typescript/website

  • Run npm run start

  • Check out the documentation website served at http://localhost:3001/

@pedroalves0 pedroalves0 requested a review from a team January 28, 2025 15:26
@pedroalves0 pedroalves0 self-assigned this Jan 28, 2025
@pedroalves0 pedroalves0 requested review from rfgamaral and removed request for a team January 28, 2025 15:26
Copy link
Member

@rfgamaral rfgamaral left a comment

Choose a reason for hiding this comment

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

I had to run npm install both in the project root and the website folder, but in the end I got it working. I wonder if it wouldn't make sense to "convert" this project into a monorepo, one package for the source, another for the website. It would probably make maintenance and development a bit easier. Something to consider, if you have the time.

Also, the port is :3000, not :3001 as described in the test plan (but it doesn't matter because the port is printed in the terminal and the browser auto starts with the correct port).

That said, the website looks good, and now that I know that we are using Docusaurus for this, I can see that many documentations I've looked into in the past also used Docusaurus, so I guess we did the right choice going with this tool.

@pedroalves0
Copy link
Member Author

I wonder if it wouldn't make sense to "convert" this project into a monorepo, one package for the source, another for the website. It would probably make maintenance and development a bit easier. Something to consider, if you have the time.

While I can see the benefits of converting to a monorepo, the uncertainty around auto-generated SDKs makes me not want to introduce any more drastic changes. Additionally, when implementing this PR changes, I looked into how other repos structure their Docusaurus website and having a website folder is a common pattern.

@pedroalves0 pedroalves0 merged commit bfd0e1d into v4 Jan 29, 2025
1 check passed
@pedroalves0 pedroalves0 deleted the pedroa/docusaurus-documentation branch January 29, 2025 13:18
@rfgamaral
Copy link
Member

I looked into how other repos structure their Docusaurus website and having a website folder is a common pattern.

I don't doubt that, but I picked one at random, and it uses a monorepo: Ionic 😅

While I can see the benefits of converting to a monorepo, the uncertainty around auto-generated SDKs makes me not want to introduce any more drastic changes.

That makes sense 👍

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.

2 participants