Skip to content

Support wiki-style internal page links #3606

Closed
@rcoreilly

Description

@rcoreilly

It would be great if hugo could support wiki-style page links, as in the git-hub wiki syntax:
https://help.github.com/articles/adding-links-to-wikis/

This has been suggested a few times it seems:

But I didn't see an open bug ticket on it, so.. here goes -- please mark as a duplicate if I somehow missed it.

Proposal:

  • This would make a link to another wiki page with given title: [[Page Title]] -- it would find page based on the title property of the pages, and render the link (via the pathed file name) for you.

  • You can optionally include alternative link text: [[Alternative Text|Page Title]] and also use the file name, but it would still use the title for the link if avail for that page: [[docs/my_file_name]] renders link with text as title of that page

Motivation:

  • Current link syntax requires significant duplicate typing -- one of the main design criteria for the Go language was to remove all that "stuttering" kind of thing -- very annoying to constantly be typing something like [My Page Here](docs/my_page_here).

  • The [[ ]] link syntax is standard on the git hub wiki, and on the widely-used mediawiki, so it will be familiar to many users.

  • Using the page title instead of the path is more robust if you decide to reorganize your file structure.

  • We are just experimenting with porting our wiki from mediawiki to hugo and this link issue is the main remaining barrier to having the new platform be a clear win! Hugo can be a great wiki platform, but the high density of internal links in a wiki requires this simpler kind of link syntax.

Thanks for making such an awesome tool!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions