Chapter 3. Using TechDocs
The TechDocs plugin is installed and enabled on your Red Hat Developer Hub instance by default. After an administrator configures the TechDocs plugin, an authorized developer can use the TechDocs plugin to add, view, or manage documentation.
3.1. Adding documentation to TechDocs
After an administrator configures the TechDocs plugin, a developer can add documentation to TechDocs by importing it from a remote repository. Any authorized user or group can access the documentation that is imported into the TechDocs plugin.
3.1.1. Importing documentation into TechDocs from a remote repository
Teams can store their documentation files in the same remote repository where they store their code files. You can import documentation into your TechDocs plugin from a remote repository that contains the documentation files that your team uses.
Prerequisites
- Your organization has documentation files stored in a remote repository.
-
You have a
mkdocs.yaml
file in the root directory of your repository. -
You have the
catalog.entity.create
andcatalog.location.create
permissions to import documentation into TechDocs from a remote repository.
Procedure
- In your Red Hat Developer Hub instance, click Catalog > Self-service > Register Existing Component.
In the Select URL box, enter the URL to the
catalog-info.yaml
file that you want to import from your repository using the following format:https://github.com/<project_name>/<repo_name>/blob/<branch_name>/<file_directory>/catalog-info.yaml
- Click Analyze
- Click Finish
Verification
- In the Red Hat Developer Hub navigation menu, click Docs.
- Verify that the documentation that you imported is listed in the table on the Documentation page.
3.2. Finding documentation in TechDocs
By default, the TechDocs plugin Documentation page shows all of the documentation that your organization has imported into your Red Hat Developer Hub instance. You can use any combination of the following methods to find the documentation that you want to view:
- Enter a keyword in the search bar to see all documents that contain the keyword anywhere in the document.
- Filter by Owner to see only documents that are owned by a particular user or group in your organization.
- Filter by Tags to see only documents that contain a particular tag.
- Filter by Owned to see only documents that are owned by you or by a group that you belong
- Filter by Starred to see only documents that you have added to favorites.
By default, the All field shows the total number of documents that have been imported into TechDocs. If you search or use filters, the All field shows the number of documents that meet the search and filter criteria that you applied.
Prerequisites
- The TechDocs plugin in enabled and configured
- Documentation is imported into TechDocs
- You have the required roles and permissions to add and view documentation to TechDocs
Procedure
- In the Red Hat Developer Hub navigation menu, click Docs.
- On the Documentation page, use the search bar, filters, or both to locate the document that you want to view.
3.3. Viewing documentation in TechDocs
In TechDocs, a document might be part of a book that contains other documents that are related to the same topic.
Clicking the name of a document in the table on the Documentation page opens the document in a book page. The name of the book is displayed on book the page. The book page contains the following elements:
- The contents of the document.
- A search bar that you can use to search for keywords within the document.
- A navigation menu that you can use to navigate to other documents in the book.
- A Table of contents that you can use to navigate to other sections of the document.
- A Next button that you can use to navigate to the next sequential document in the book.
You can use the elements on the book page to search, view, and navigate the documentation in the book.
Prerequisites
- The TechDocs plugin in enabled and configured
- Documentation is imported into TechDocs
- You have the required roles and permissions to add and view documentation to TechDocs
- Optional: TechDocs add-ons are installed and configured
Procedure
- In the Red Hat Developer Hub navigation menu, click Docs.
- In the Documentation table, click the name of the document that you want to view.
On the book page, you can do any of the following optional actions:
- Use installed add-ons that extend the functionality of the default TechDocs plugin.
- Use the search bar to find keywords within the document.
Use any of the following methods to navigate the documentation in the book:
- Use the Table of contents to navigate the any section of the document.
- Use the navigation menu to navigate to any document in the book.
- Click Next to navigate to the next sequential document in the book.
Additional resources
3.4. Editing documentation in TechDocs
You can edit a document in your TechDocs plugin directly from the document book page. Any authorized user in your organization can edit a document regardless of whether or not they are the owner of the document.
Procedure
- In the Red Hat Developer Hub navigation menu, click Docs.
- In the Documentation table, click the name of the document that you want to edit.
- In the document, click the Edit this page icon to open the document in your remote repository.
- In your remote repository, edit the document as needed.
- Use the repository provider UI and your usual team processes to commit and merge your changes.