title: How to apply config for my scully plugin?
body: <p>I made a plugin on scully,static site generator on angular.
  But I cannot spplya my config object for my plugin.</p>
  <p>I could:</p>
  <ul>
  <li>Install markdown support and generate some posts from markdown by scully..</li>
  <li>Making a plugin that make routes some routes.</li>
  <li>Register the plugin as &quot;route process&quot; by registerPlugin func.</li>
  <li>Run and successfuly generate routes depending on my config object...on the plugin script file.</li>
  </ul>
  <p>Problem:</p>
  <ul>
  <li>Now , The config object is defined in the same .ts script file with plugin code.</li>
  <li>I want to inject my config object on another script file , such as scully.**.config.ts. I want to make my plugin easier to re-use.</li>
  <li>But I cannot overwrite config by setConfig function.</li>
  </ul>
  <p>The plugin code :</p>
  <pre><code>import { HandledRoute, registerPlugin, RouteTypes } from &quot;@scullyio/scully&quot;
  
  export const ARCHIVES_PLUGIN = 'archive'
  
  export interface ArchivePluginConfig {
      root:string;
      articleRoute: string;
      archivePrefixRoute: string;
      archiveSize:number;
  }
  
  export const EXAMPLE_CONFIGS: ArchivePluginConfig[] =[{
      root:&quot;/blog&quot;,
      articleRoute: &quot;/blog/articles&quot;,
      archivePrefixRoute: &quot;/archives&quot;,
      archiveSize:8,
  }];
  
  export function archivePlugin(routes: HandledRoute[], config?:ArchivePluginConfig[]): Promise&lt;HandledRoute[]&gt; {
      config = (config ==undefined || config.length&lt;1)? EXAMPLE_CONFIGS:config;
  
      config.forEach(config =&gt; {       
          //add archives for blog
          let posts = routes.filter((route) =&gt; route.route.startsWith(config.articleRoute));
          let archiveCount=Math.floor(posts.length/config.archiveSize)+1;
          
          let archives:HandledRoute[]=[];
          for (let page = 1; page &lt;= archiveCount; page++) {
              archives.push({route:`${config.root}${config.archivePrefixRoute}/${page}`}) 
          }
          archives.forEach(element =&gt; {
              routes.push(element);
          });
      });
      return Promise.resolve(routes);
  }
  
  registerPlugin(&quot;routeProcess&quot;, ARCHIVES_PLUGIN, archivePlugin, [])
  </code></pre>
  <p>scully.{myproject}.config.ts code:</p>
  <pre><code>import { ScullyConfig, setPluginConfig } from '@scullyio/scully';
  import './scully/plugins/archive';
  import { ArchivePluginConfig, ARCHIVES_PLUGIN  ,archivePlugin} from './scully/plugins/archive';
  
  setPluginConfig('md', { enableSyntaxHighlighting: true });
  
  const archiveConfig:ArchivePluginConfig[]=[
    {
      root:&quot;/blog&quot;,
      articleRoute:&quot;blog/article&quot;,
      archiveSize:8,
      archivePrefixRoute:&quot;/articles&quot;,
    }
  ]
  setPluginConfig&lt;ArchivePluginConfig[]&gt;(ARCHIVES_PLUGIN,'routeProcess',archiveConfig);
  
  const defaultPostRenderers = ['seoHrefOptimise'];
  
  export const config: ScullyConfig = {
    defaultPostRenderers,
    projectRoot: &quot;./&quot;,
    projectName: &quot;jl-dotnet&quot;,
    outDir: './dist/static',
    routes: {
      '/blog/article/:post': {
        type: 'contentFolder',
        post: {
          folder: &quot;./article/blog&quot;
        }
      },
    }
  };
  </code></pre>
  <p>Result:
  There generated some routes not depending on config defined at scully.**.config.ts but defined at plugin;
  the generated routes located on &quot;/archives&quot; not on &quot;/articles&quot;</p>
  <p>Enviroment?:</p>
  <ul>
  <li><p>OS:windows 10</p>
  </li>
  <li><p>editor:vscode</p>
  </li>
  <li><p>console:git-bash</p>
  </li>
  <li><p>nodejs:v14.16.1</p>
  </li>
  <li><p>npm:7.12.0</p>
  </li>
  <li><p>I created new project by ngcli</p>
  </li>
  <li><p>I installed scully via npm on gitbash.</p>
  </li>
  </ul>
  <p>I attempt to make my blog by angular and scully as static site.
  And I made a plugin for generate archives , consist of multiple pages.
  I made a similar plugin , that generate category archive.
  But same problem occurs.</p>
  <p>This line works,inject config for markdown plugin,</p>
  <pre><code>setPluginConfig('md', { enableSyntaxHighlighting: true });
  </code></pre>