Custom plugins for Scully �The Static Site Generator for Angular
Dutch Angular Group�25th of June, 2020
Sam Vloeberghs�@samvloeberghs
Sam Vloeberghs
???
Scully - The Quick Overview
Dynamic routes
Static Routes
Route Discovery Process
/ /about �/contact /users�/news /404
/news/update-1 /users/1�/news/update-2 /users/2
/news/update-x /users/y
Plugin System
Router
Render
FileHandler
Route Discovery Done
AllDone
Content plugins
Helper plugins
Router Plugins
Examples:
Router plugins
Handling the dynamic route /users/:id can be done via the Scully RouteTypes.json plugin
/users/1 /users/2 /users/3�/users/4 /users/5 /users/6
/users/7 /users/8 /users/..
This will return a list of all users that are available via their dynamic url:
Custom Router plugins
1
2
3
Handling a more complex route like /news/:id/:slug can be done via a custom Scully router plugin:
4
Registering plugin
1
2
3
Before we can use our custom plugin we need to register it with Scully:
Configuring plugin
1
2
3
Render plugins
Examples:
Custom Render plugins
1
2
3
Execute your own post-processing logic on the HTML output
Configuring plugin
1
2
FileHandler plugins
Generated from Markdown
RouteDiscoveryDone plugins
AllDone plugins
Community Plugins ( 1/2)
Community Plugins ( 2/2)
DEMO
Conclusion
More reading
Custom plugins for Scully
— The Static Site Generator for Angular �
@ Dutch Angular Group�25th of June, 2020
Thank you for your attention. Feel free to contact me at sam.vloeberghs@gmail.com or directly on Twitter @samvloeberghs
QUESTIONS?