DevOpsWikiStrategy.EncodeWikiPath Method

Namespace
Kampute.DocToolkit
Assembly
  • Kampute.DocToolkit.dll

Definition

Encodes special characters in the given title as per the Azure DevOps Wiki requirements for page titles.
public static string EncodeWikiPath(ReadOnlySpan<char> title)

Parameters

title ReadOnlySpan<char>
The title to encode.

Returns

string
The encoded title.

Remarks

This method encodes special characters in the title according to Azure DevOps Wiki requirements:
  • Spaces are replaced with hyphens.
  • Reserved or special characters are percent-encoded.
  • Forbidden characters such (#, /, \) are replaced with underscores.
  • All other characters are left unchanged.
This ensures generated wiki paths are valid and compatible with Azure DevOps Wiki page title rules.

See Also