Skip to content

Copy unprocessed files to destination determined at runtime #31

Answered by daveaglick
abdusco asked this question in Q&A
Discussion options

You must be logged in to vote

There's a few ways you could probably do this. The first thing that came to mind was trying to do it all inside a single pipeline by reading both Markdown and images and then using something like ExecuteIf to switch on the two. That said, the easiest way is probably to add a pipeline for images that's dependent on the blog posts and then use the path calculation from the blog posts to match up source folders and set the corresponding destination folders:

public class BlogImagesPipeline : Pipeline
{
    public BlogImagesPipeline()
    {
        Dependencies.Add(nameof(BlogPipeline));

        InputModules = new ModuleList
        {
            new ReadFiles("**/*.png")
        };

        P…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@abdusco
Comment options

Answer selected by abdusco
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants