Skip to content

Tracking issue: Links #7

Description

@frostu8

Currently, the linking system is very naive. Given a wikilink [[Index]] or a link [to index](Index), it will simply search how to link it every render following a three step process:

  1. Does this path match a page in the database exactly? eg: /~/Index/
  2. If there are no exact matches, does the title of this link match to a page exactly? eg: /~/Other/Index
  3. If neither of those are satisfied, just insert the link as-is. eg: /~/Index/

However, wikis are constantly evolving, which introduces some side effects to linking to other pages. If a page links to [[Index]], and the pages /~/Index and /~/Other/Index exist, if the page /~/Index gets deleted, the other page's link to [[Index]] gets changed, even though the content of the page hasn't changed! This violates a core immutability principle of inferno that I think is bad and sucks.

Here are a couple goals to meet:

  • Remove link resolution; the actual path of each link should not change and is unfriendly for SEO
  • Paths can be qualified with slashes, but only the last segment should show on the wikilink.
  • Add editor autocompletes; if the server cannot offer the ability to write shorthand links, the editor may be able to.
  • Color links that link to non-existent pages differently to make it more clear where content can be expanded or new contributions are welcome. This may demand a new, intelligent link system.
  • Wikilink headings do not work. [[WikiLink#Heading]] incorrectly renders to <a href="/Wikilink#Heading/">WikiLink#Heading</a>.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions