Search code examples
docsify

Link an "external" file in docsify


This is my documentation files structure

|__docs/
| |__config-docsify.js
| |__index.html
| |__README.md
|__README.md

As you can see, the Docsify files are in docs/ directory and I would like to link the /docs/README.md file to root the README file (/README.md). I.e., when I click on a link in the /docs/README.md file, I get redirected to /README.md file, or at least I get its content somehow.

However, when I try to add a link like this

<!-- projectfolder/docs/README.md file -->
See the [README](../README.md) file in the root directory.

I get redirected to localhost:3000/../README.md which does not exist.

Does anyone know a way to link a file that is not in the same folder (or subfolder) of the docsify files?


EDIT

I am serving the docs folder using

docsify serve docs/

Solution

  • You can embed external files (or raw.github...) using embed files: https://docsify.js.org/#/embed-files