Configuration Guide
This guide covers everything you need to know about configuring Scully for your Angular static site generation needs.ScullyConfig Interface
Scully’s configuration is defined through theScullyConfig interface. Create a scully.<project-name>.config.ts file in your project root.
Basic Configuration
Create Configuration File
Create a file named
scully.<your-app-name>.config.ts in your project root:Configure Basic Options
Set up the essential configuration options:
projectRoot: Source folder location (usually'./src')projectName: Your Angular project nameoutDir: Where Scully outputs static files (default:'./dist/static')distFolder: Location of Angular build output
Core Configuration Options
Project Structure
Server Configuration
Performance Options
Puppeteer Configuration
Route Configuration
Routes are the heart of Scully’s configuration. Each route type handles different content sources.ContentFolder Routes (Markdown/Blog)
The most common route type for blogs and documentation:JSON Routes (API Data)
Fetch route parameters from API endpoints:Default Routes (Static Pages)
For routes without parameters:Custom Content Routes
Inject custom content directly:Post Renderers
Post renderers process HTML after Scully generates it.Global Post Renderers
Route-Specific Post Renderers
Plugin Configuration
Configure individual plugins withsetPluginConfig:
Advanced Configuration
Extra Routes
Add routes not in Angular router:Guess Parser Options
Exclude files from route discovery:404 Handling
Thumbnails
Generate page thumbnails:Complete Example
Here’s a real-world configuration from the Scully documentation site:Troubleshooting
Routes not being generated
Routes not being generated
- Check that your route is properly configured in the
routesobject - For parameterized routes, ensure you have a route plugin configured
- Run
npx scully --scanRoutesto force route discovery - Check for errors in console output
Plugin not working
Plugin not working
- Verify plugin is imported in config file
- Check plugin configuration with
setPluginConfig - Ensure plugin is registered before use
- Check plugin is in correct post renderer array
Build performance issues
Build performance issues
- Reduce
maxRenderThreadsif running out of memory - Use
ignoreResourceTypesto skip unnecessary resources - Optimize images and assets
- Consider using
inlineStateOnlyfor smaller sites
Markdown not rendering
Markdown not rendering
- Enable syntax highlighting:
setPluginConfig('md', { enableSyntaxHighlighting: true }) - Import required Prism.js language components
- Verify markdown files are in the configured folder
- Check frontmatter is valid YAML
Next Steps
Create a Blog
Learn how to set up a blog with markdown content
Working with Markdown
Master markdown files and frontmatter
Deployment
Deploy your static site to production
Testing
Test your Scully build locally

