-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Description
I get an error logged when I try and use the example from https://www.statiq.dev/guide/web/content-files/links-and-cross-references#changing-the-default-cross-reference-name (specifically the _directory.yml one)
Xref: => Config.FromDocument(doc => doc.Destination.FileNameWithoutExtension.Replace(' ', '-'))Error:
[ERRO] 1 errors compiling script:
Line 1: CS1929: 'NormalizedPath' does not contain a definition for 'Replace' and the best extension method overload 'MemoryExtensions.Replace(in Memory<char>, char, char)' requires a receiver of type 'in Memory<char>'
[ERRO] Content/PostProcess » RenderContentPostProcessTemplates » ResolveXrefs » Exception of type 'Statiq.Core.ScriptCompilationException' was thrown.
[ERRO] Archives/PostProcess » ExecuteSwitch » RenderContentPostProcessTemplates » ResolveXrefs » Exception of type 'Statiq.Core.ScriptCompilationException' was thrown.
I changed the setting to this (adding the .GetTitle()) and the error was resolved:
Xref: => Config.FromDocument(doc => doc.Destination.FileNameWithoutExtension.GetTitle().Replace(' ', '-'))Metadata
Metadata
Assignees
Labels
No labels