Importing Documentation

AI Tools

DeveloperHub provides powerful tools to enable you to easily move your content around, edit it and restructure it, all out of the editor.

Import Sources

You can import to DeveloperHub from many sources:

Import a Markdoc Export

To import documentation, follow these steps:

  • Make sure your import files are structured as required.

  • Open Project Settings → Import & Export.

  • Click Open import.

  • Choose Markdoc.

Importing could take a few seconds up to a minute.

Legacy Darkdown exports

Older DeveloperHub exports in the legacy Darkdown format are no longer accepted. Re-export your project as Markdoc and import that instead.

Info

All imports add versions. Versions, documentations and pages are never overwritten.

Import a page into DeveloperHub

You can import a single Markdown or a Markdoc page at a time into DeveloperHub.

To import one page, follow these steps:

  • From the index, choose the page to import over, or create a new page and save it.

  • Under the title, click on Import icon

  • Choose the file to be imported.

Structuring Files

To import documentation from DeveloperHub export into DeveloperHub, you must structure your files as such:


Where, for example:

  • v1.0 is the name of your version.

  • Support Center is the title of your documentation.

  • 1 Getting Started.md is a documentation page written in Markdoc format. Its order is 1st in Support Center documentation and its title is Getting Started. Getting Started folder indicates that 1 Getting Started.md is a parent page, and it has a subpage titled First Steps.

  • 1 Formatting Text.md, 2 Keyboard Shortcuts.md and 3 Using Markdown.md are all subpages of Writing Documentation page.

  • settings.json is Support Center documentation settings file. Settings file is an optional file.

Every parent page should have a a Markdown file and a folder with the same exact name.

The orders must be incremental and starting from 1. If an order is not supplied in the file name, then no index order is guaranteed.

Additionally, you may add OpenAPI spec files in a folder named refs in the version folder.

All the files in the import must be compressed into a ZIP file.

File Format

Each file contains a YAML header (frontmatter) and, for pages, optional content.

Header

Each file contains a header depending on the index element being described.

  • Page:

--- type: page title: Callouts listed: true slug: callouts description: <SEO description> index_title: Callouts hidden: keywords: keyword1,keyword2 tags: tag1,tag2 ---
  • Category:

--- type: category title: Start Here ---
  • Link:

--- type: link title: Go to DeveloperHub.io url: https://developerhub.io ---
  • Separator:

--- type: separator ---

Content

Category, link and separator elements do not have content. Pages do have content, written in Markdoc: plain Markdown mixed with DeveloperHub's block tags.

Draft and published page contents can be defined in an export and it is annotated by a ---draft or ---published header, such as:

---draft Draft content is here ---published Published content is here

Blocks

Blocks and inline blocks are written in Markdoc tag syntax. See Markdoc Format for the full syntax of every block, with an example for each.

Feel free to export any page to understand the formatting of its contents.

If an image is referenced in Markdown format in one of the pages, it will automatically be downloaded to our servers and served from our content delivery network.

Images can be uploaded from two sources:

  • HTTP, or

  • Local

Regardless of the image source, each image must be at maximum 10MB in size. Otherwise, the import will fail.

Warning

By importing images on DeveloperHub, you are responsible to ensure that you have rights to all data.

HTTP Image Import

To import images from the internet, they should be referenced as such:

HTTP Image: ![Image Caption](https://example.com/image.png)

It will then be downloaded from its source, and uploaded to our content delivery network. The image must be accessible online publicly, otherwise the import will fail.

Local Image Import

To import images locally from the provided ZIP file, they must exist in a folder named assets alongside the versions.

They should be referenced as such:

Local Image: ![Image Caption](/assets/image.png)

Inside assets folder, any folder structure is allowed.

  Last updated