iftechfoundation / ifarchive-ifmap-py

The tool that generates the index files at http://ifarchive.org/ .
3 stars 1 forks source link

Shortcut for Archive internal links #36

Closed erkyrath closed 6 months ago

erkyrath commented 6 months ago

I wrote:

...would it be helpful if, in an Index file, </if-archive/games/foo/bar/> was shorthand for a link to that directory? I have a prospective patch for that. Also making </if-archive/games/foo/bar/baz.z5> be a link to a file.

(It's already true that <http://ifwiki.org/> is shorthand for a link to the URL. That's part of this flavor of markdown by default.)

erkyrath commented 6 months ago

Done, commit e83c5a0d4a51374349fb88c5d0ace3eaa09bffa2.

The shortcut only counts if it starts with </if-archive. If it ends with a slash, it is treated as a directory; otherwise a file.

The link appears in the index page without the /if-archive part. This is consistent with existing usage, e.g.

69,105 Keys, a one room game by David Welbourn. Release 1 / Serial number 090302 (source code is in games/source/inform/69105Keys.inf)