Hello everyone.
I’m currently building a site for my iOS app for which I need to write, among other things, some documentation. In my content
folder, I created a /docs/
subfolder. In this subfolder, I’ve created an _index.md
and other files like introduction.md
and other.md
:
/contents
/docs
_index.md
introduction.md
other.md
I would like the documentation to be accessible on the web, but also “almost” natively from the app, i.e. without the header and footer from the webpage. I’ve defined an OutputFormat
called app
in config.toml
:
[outputFormats]
[outputFormats.app]
mediaType = "text/html"
path = "/app"
I would like to apply custom templates and css to this html format and access it like /docs/
but at /app/docs/
, but I’m facing two issues:
Firstly, `/app/ is generated with the structure
/app
/docs
introduction/
index.html
other/
index.html
No trace of index.html
to represent the _index.md
of docs
. However, in the root (web) `/docs/, I have
/docs
index.html
app/
index.html
introduction/
index.html
other/
index.html
I don’t understand why there is an app
subfolder here, and why there is no index.html
in /app/docs/
in the root. Does anyone have an explanation?
The second issue I’m facing is the way to link content. Let say I’m creating a reference to other.md
from introduction.md
. I would like the output format to be preserved, that is linking to /docs/other/index.html
in the web version, and /app/docs/other/index.html
in the app
version.
I’ve tried the shortcode {{< ref "docs/other.md" >}}
but it always resolve to the web version /docs/other/index.html
, even for the app
version. How to properly link content in this case?
I’m using a custom template with
layouts/
/_default
baseof.app.html
baseof.html
list.html
page.html
single.hml
/docs
baseof.html
list.html
page.html
single.hml
All my markdown files have layout: "page"
in the front-matter and I’ve defined
[outputs]
page = ["HTML", "APP"]
section = ["HTML", "APP", "RSS"]
in config.toml
.
Thank you in advance!