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

Extract docs engine into reusable package #3114

Closed
6 tasks done
rogermparent opened this issue Dec 20, 2021 · 2 comments · Fixed by #3396
Closed
6 tasks done

Extract docs engine into reusable package #3114

rogermparent opened this issue Dec 20, 2021 · 2 comments · Fixed by #3396
Assignees
Labels
A: website Area: website website: eng-doc DEPRECATED JS engine for /doc

Comments

@rogermparent
Copy link
Contributor

rogermparent commented Dec 20, 2021

We currently use our custom docs engine on dvc.org and cml.dev, with plans to add it to all our product sites. The docs engine is currently "shared" between the two sites by simply copy-pasting 90+% of the code between the dvc.org and cml.dev repos. This already poses a problem when it comes to updating the engine, and will only get worse as we introduce new sites.

Due to these requirements and issues, we're undertaking an effort to move the docs engine to a reusable package, leaning on the Gatsby Plugin and Theme API as well as more general Node package interfaces like module exports. The long-term plan is to package the docs engine as an NPM package.

To ease the transition, we'll break development into multiple phases

Phase 1: dvc.org local plugin

We'll start by moving all dvc.org docs logic into a local Gatsby plugin, a pseudo-npm package in the plugins folder. This will allow for much easier rapid incremental development with minimal worry about maintaining updates for a half-working package. This phase ends after we move all of dvc.org's docs engine to this local package.

Phase 2: Internal package sharing

Once we're confident we've moved all the docs code we want to share, we can start turning the local plugin into a real package and use it among all our internal sites. This phase specifically puts less of an emphasis on how external users would use the plugin, instead putting the most consideration on how we'll use the plugin for our product sites.

Phase 3: Generalizing for outside audiences

After we're comfortably using this package for all our internal websites, we can consider the possibility of sharing it with the public as an option for other Gatsby sites to use as a docs engine. This is easily the most variable step- it could range from a massive refactor to being scrapped altogether if we decide to only ever consider internal use.

@julieg18 julieg18 added A: website Area: website website website: eng-doc DEPRECATED JS engine for /doc labels Dec 20, 2021
@jorgeorpinel
Copy link
Contributor

jorgeorpinel commented Jun 2, 2022

Will #3396 close this? (If so please link them.)

@yathomasi
Copy link
Contributor

Will #3396 close this? (If so please link them.)

Yes, that would complete phase 2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: website Area: website website: eng-doc DEPRECATED JS engine for /doc
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants