How to move outputs up one directory? #172
Answered
by
StevenTCramer
StevenTCramer
asked this question in
Q&A
-
I want to group some input into a folder but don't want that folder in the output. What is the easiest way to do that? I thought |
Beta Was this translation helpful? Give feedback.
Answered by
StevenTCramer
Sep 17, 2022
Replies: 1 comment 1 reply
-
I got the following to do what I wanted. changing DestinationPath:
=>
{
List<string> extensions = new List<string> {"html","cshtml","md"};
var pagesPath = new NormalizedPath("pages");
var relativePath = pagesPath.GetRelativePath(Document.Destination);
Context.LogDebug($"relativePath:{relativePath}");
if(extensions.Any(str => str == Document.Destination.Extension))
{
var newDestination = relativePath.ChangeExtension("html");
return newDestination;
} else
{
return relativePath;
}
} Maybe there is a cleaner way? |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
daveaglick
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I got the following to do what I wanted.
changing
pages/components/capturing-unexpected-parameters/
to
components/capturing-unexpected-parameters/
Maybe there is a cleaner way?