ford
ford copied to clipboard
Links to static pages
How to link to static pages? I have several plain Markdown files in the directory referenced by the -p CLI option of ford. In there (and in the comments within source files), I can happily link to other source files, but I have not found a documented way to link to static pages, nor discovered one by trying out.
Have I overlooked something, or are static pages intended to only talk to each other by the table of contents?
Any news on this? I don't want to teach to my end users the horrible anti-pattern to put absolute file paths into links.
Oh well, if there really is no way to get Wiki-style internal links between static pages running, we'll have to resort to adding .html boilerplate to many many links.
Hi @Meax5qiu , sorry for the slow reply, it's been a very busy month!
Currently, the only way is use the full path, although we have a |url| macro that expands to the project URL. So you can link to |url|/page_dir/directory/index.html.
Being able to link to static pages through some short form would be a really useful feature though.
Actually the wiki entry for aliases seems to be lacking one predefined macro. There is one for pages. Thus, you can use |page|, still needs the HTML filename, though.
I've updated the wiki on Writing Pages to include a hint for the |page| macro now.
Fantastic, thanks @haraldkl !