WCF icon indicating copy to clipboard operation
WCF copied to clipboard

RFC: URIs for internal links

Open dtdesign opened this issue 9 months ago • 5 comments

Links to internal pages, such as quotes use absolute URLs which work fine in general but are a true pain when moving to a different domain. It also means that a simple search & replace of URLs can be quite dangerous and prone to errors.

We could change the internal link format into something that can be resolved on runtime, that follows a strict schema and makes it easy to detect dead links. This would even allow us to dynamically strip links that point to resources that do not exist anymore.

woltlab:// protocol

woltlab://v<version>/<packageIdentifier>/<object>/<objectId>?optional=queryString
  • version is a numeric number to allow changes to the spec later on.
  • packageIdentifier matches the name found in the package.xml.
  • object is the name of the object, similar to objectType.xml.
  • objectId is a case-sensitive alphanumeric string ([a-zA-Z0-9]).

Extra parameters are allowed through the optional query string.

Examples

woltlab://v1/com.woltlab.wbb/post/12345
woltlab://v1/com.woltlab.wcf/file/67890
woltlab://v1/com.example.foo/bar/a1b2c3d4

dtdesign avatar May 11 '24 14:05 dtdesign