-
Notifications
You must be signed in to change notification settings - Fork 2
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
New Documentation Site Engine #1
Comments
Can we add more info around the search engine? What search engine are we going with and why? |
P.S.: looks like Docusaurus supports Algolia.
|
@iamrajiv , how should a user who wants to use the new documentation engine start using it? (<- don't need to answer right away but something we should consider) |
"It's a good idea to move these READMEs to the docs site because the people who develop and maintain these services are responsible for updating the READMEs. Having them in a single place just makes it easier to update the READMEs and read them later as well." This is not quite right. The software developers who develop and maintain these services very much prefer to have the source co-located with the software code. However, you are correct that having them appear in the main documentation set makes them more accessible to users. The current system for the CLI Reference docs does accomplish this but we can only update the docs site with a big batch job that we run once per release, and we don't have a good way to check the docs in the context of the doc set as they are developed; it would be nice to improve this. And also good to be able to populate the reference/files and reference/miscellaneous sections with content that is authored in the software repo then transferred to the docs repo. Currently, the source is in the README.md file for each service but I'm not sure that is ideal. You can see that I have started authoring some of these reference pages in keptn.github.io . In most cases, I started with the info that was in the README.md but I have augmented the content and structure of these pages. We will have to straighten this out manually when we move the files into Docusaurus. My personal preference (which may not be the majority opinion) would be to have a docs subdirectory for each service and spec that contains the md source for the documentation and then the README could contain information about the structure of the software, etc. It may be easier to implement if the tools only have to look for a docs folder and grab that than figure out which README's to incorporate. If that is the case, I think it will be acceptable. |
New Documentation Site Engine
I have divided the Development Phase into two phases i.e.
Phase 1
andPhase 2
.Phase 1
Initialization and deployment of the documentation engine based on Docusaurus from scratch.
Initialised the new Docusaurus site using
npx create-docusaurus@latest new-keptn-docs-engine classic
command and push the changes to keptn-sandbox/new-keptn-docs-engine.Adding as basic documentation on how to use Docusaurus and what configuration of Docusaurus we are following like Project structure, Templates, etc.
Deploying the new Docusaurus site engine to Netlify.
Adding
CONTRIBUTING.md
file with content related to how to add contents in Docusaurus and how to use it concerning Keptn. Also, this work will go on since we will be adding more content in the future according to documentation needs.Issue link: #2
Adding UI and UX changes, moving the content and search functionality to the new documentation site engine.
Implementing UI and UX changes in the documentation engine like creating components, templates, standalone pages, etc.
Finalizing the things that need to be copied from the current documentation engine to the new documentation site engine with proper structure.
Copying content from the current documentation engine to the new documentation site engine which has been finalized.
Adding documentation search functionality.
Issue link: #5
In current docs, we don't have versioning of docs support feature. As of now, we were versioning the docs manually. To solve this problem we have added versioning of the docs support feature using Docusaurus. We can use the versioning CLI to create a new documentation version based on the latest content in the
docs
directory. That specific set of documentation will then be preserved and accessible even as the documentation in thedocs
directory continues to evolve.This feature is partially done and we want more clarity on this feature. Earlier we thought adding Docusaurus Multi-instance support will solve this problem but it is not the case. The thing is using Docusaurus Multi-instance we can have multiple
docs
folders in the same Docusaurus site and for everydocs
folder, we can put our documentation accordingly. But we wanted something automatic stuff so that we can pull docs from other repository and organize it in thesedocs
folder instances.I got clarity about this feature a little late so I was not able to implement this feature completely.
Some reasons why we want the Multiple repository docs support feature:
Keptn CLI docs are generated using the
keptn generate docs
command. As of now, we run it in GitHub action here to populate our docs repo with CLI docs.If we look at the architecture doc here, the Keptn control plan consists of multiple services which have their READMEs in the main Keptn repository (example). Just look for any directory with
service
in https://github.com/keptn/keptn, we can see individual READMEs for all such services. It's a good idea to move these READMEs to the docs site because the people who develop and maintain these services are responsible for updating the READMEs. Having them in a single place just makes it easier to update the READMEs and read them later as well.We also have services that extend the control plane which sits in a separate repository. Check dynatrace-service for example. As of now, if we add a new service that extends the control plane, we also have to add some documentation around it manually in the main docs repository.
We have a miscellaneous repository like Keptn spec, documentation around what different values mean in the Keptn helm chart which we can't put in the main docs repository because they serve a different purpose.
Adding Docusaurus Multi-instance support.
Adding GitHub Action that can pull the docs from multiple repositories.
Phase 2
Every webpage that is crawled by a search engine is evaluated with a score from 5 categories: Performance, Accessibility, Best Practices, SEO, and PWA. This is given a score between 0 – 100. The better your lighthouse score will affect how high up your webpage will appear on a search engine.
With a high score, your site meets the best practices and SEO standards outlined by Google in terms of performance and accessibility. Lighthouse is an important tool because it can identify common problems that affect the quality of your websites and propose solutions for them.
Lighthouse CI is a suite of tools that make continuously running, saving, retrieving, and asserting against Lighthouse results as easily as possible. So we have integrated Lighthouse CI GitHub Action into the new documentation site engine.
Issue link: #16
To solve problems related to the styling of documentation, linting, doc quality checks, etc we wanted some tool to achieve these things.
We research and found proselint and Vale which can full fill our needs. After going through both we feel Vale has a lot of features as compared to
proselint
and is widely used in many popular open source organizations.So, we integrated vale-action in the new documentation site engine.
Also, for the time being, I have adopted the Google Style Guide because my main motivation is to integrate the Vale GitHub Action into the docs engine. Yeah, I think we can have a separate discussion about which style guide to follow or we can have our custom style guide as well.
One of the limitations of Vale is that we have to update things in
vocab.txt
which is required for false positives. Some keywords, and names (e.g.Keptn
,KEP
etc) are considered asvale.Spelling
errors, so we have to add them insidevocab.txt
file. We can list all unique words which are considered errors invocab.txt
using the below command.Now we have to manually validate all words listed in
vocab.txt
, discard which are invalid and correct them in the file where they were located.Now we have to manually validate all words listed in
vocab.txt
, discard which are invalid and correct them in the file where they were located.Issue link: #19
Prettier is a very popular code formatter that uses very opinionated but sensible styles to format your code and prevent ongoing debates about code styles. So we wanted a GitHub action to automatically format your code using Prettier.
To set up the GitHub action, all we need to do is install our dependencies (e.g.
yarn install
), run our format script (e.g.yarn format
), and then commit any changes if necessary.By utilizing Prettier with GitHub Actions, we can ensure that our code is formatted consistently and without any issues.
It also helps to reduce manual work when formatting code.
Issue link: #23
It is a GitHub Action that can be run on the docs to check for broken links and xrefs. The GitHub Action can create an issue on the repository with the broken links report, add labels to the issue and assign it to the relevant maintainers.
Issue link: #27
Miscellaneous Phase
NOTE: Multiple repository docs support feature is not yet implemented completely and it is still in progress. As of now
Docs Multi-instance
support is added which is a@docusaurus/plugin-content-docs
plugin. Adding GitHub Action which can pull the docs from multiple repositories is not yet implemented.Adding internationalization (i18n) support. A possible translation strategy is to version control the translation files with Git (or any other VCS).
Implementing all SEO approaches listed in https://docusaurus.io/docs/seo like adding metadata in site configuration, adding metadata for all single pages, adding metadata in the front matter of all markdown files, etc.
The text was updated successfully, but these errors were encountered: