How to
On the documentation page, go to ‘Import multiple files’
With Gravitee.io, it is possible to retrieve multiple API documents from Bitbucket or Git (Git/GitHub/GitLab) and publish them to the portal. Once configured, every change made on the documentation in version control can be automatically pushed to the Gravitee Portal. With the help of the Gravitee descriptor file, it is possible to publish the pages on the Portal in a structured way: you can set one of the pages as the homepage and work with folders to maintain clean Documentation pages for your API’s.
On the documentation page, go to ‘Import multiple files’
This will give you the option to import files from various sources like bitbucket, git, gitlab, github or any publicly accessible url. You can choose here if you want to immediately publish the files to the portal or only import them to the Manager and publish them manually later.
To refresh the documentation from the source you can either use the ‘Fetch All’ button on the ‘Documentation’ tab or make use of the ‘Auto fetch’ feature while configuring the external source. If you use the ‘Auto fetch’ feature you have to specify the frequency of updates in crontab format.
To import multiple pages there are 2 options:
For this blog we are going to explore the second option and use a gravitee descriptor file. This file needs to be named .gravitee.json and you must enter this file or its directory when configuring the import.
In this file you will list the files you want to publish on the portal and how you want them to be structured.
Example:
These are the files present on github:
After configuring this directory and executing a fetch of the files, this will result in the following behavior on the portal:
Syntax highlighting in your technical documentation can be done with the standard features supported in the asciidoc or markdown syntax. For more details see: https://www.markdownguide.org/extended-syntax/#syntax-highlighting.