ford icon indicating copy to clipboard operation
ford copied to clipboard

Links to static pages

Open Meax5qiu opened this issue 3 years ago • 5 comments
trafficstars

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?

Meax5qiu avatar May 10 '22 15:05 Meax5qiu

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.

Meax5qiu avatar May 23 '22 14:05 Meax5qiu

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.

ZedThree avatar Jun 09 '22 08:06 ZedThree

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.

haraldkl avatar Jun 10 '22 06:06 haraldkl

I've updated the wiki on Writing Pages to include a hint for the |page| macro now.

haraldkl avatar Jun 10 '22 06:06 haraldkl

Fantastic, thanks @haraldkl !

ZedThree avatar Jun 10 '22 07:06 ZedThree