Guides
Static Files
Dev Portal makes it easy to serve static files like images, PDFs, or any other assets alongside your
documentation. Any files placed in the public directory will be served at the root path / during
dev, and copied to the root of the dist directory as-is.
Note that you should always reference public assets using root absolute path - for example,
public/icon.png should be referenced in source code as /icon.png.
Usage
- Create a
publicdirectory in your project root if it doesn't exist already - Place any static files in this directory
- Reference these files in your documentation using the root path
/
Example
If you have the following structure:
Code
You can reference these files using markdown like this:
Code
If you want users to download a file like a PDF, you can use an anchor tag like this:
Code
Relative paths
If you want to reference a file that is in the same directory as the current file, you can also use a relative path:
page.mdx
Last modified on