Comments (5)
So my first thought is to have plugins that look like this.
abell-rss-feed-plugin.js
function beforeBuild(programInfo) {
// ... Nothing to do before build
}
function afterBuild(completeContent, programInfo) {
const rssXML = getRssXMLFromContent(completeContent, programInfo);
fs.writeFile('rss.xml', rssXML);
return
}
module.exports = {beforeBuild, afterBuild}
from abell.
Implemented this in some amount at feat-plugins-system branch
The first parameter in afterBuild, completeContent
is not really needed since most of the information is there in programInfo and additional information can be read from the built files.
from abell.
afterBuild
and beforeBuild
functions are added in v0.3.0, Here's an example plugin: https://github.com/saurabhdaware/abell-sitemap-plugin
from abell.
Idea for source plugins:
function beforeBuild(programInfo, {createContent}) {
const meta = {
title: 'Blog from source'
}
const content = `# This is head
## This is subtitle
nice
`
createContent(content, meta)
This will make it easy to build source plugin and will also help to handle data in standard way rather than relying on plugins to handle that.
from abell.
I think we have stable plugin system now. Any additional exports can be handled in separate issues.
from abell.
Related Issues (20)
- Reloading multiple screens is not supported HOT 6
- JavaScript of Component is Executed even when the Component is not used. HOT 2
- Avoid adding style or script to parent page if the link already exists.
- Image path not found in local dev-server with abell serve HOT 15
- Link injection only happens when the URLs of links are exactly same
- ☂️ Dynamic Routing HOT 1
- Markdown files being parsed as Abell content HOT 4
- Test issue to trigger discord webhook
- Scoped CSS is not applied on build-time generated HTML
- Multiple Instances of Same CSS Block HOT 1
- Function in function to read JSON HOT 2
- Pass Abell.programInfo variable to .abell files with path configurations from abell.config.js HOT 5
- A way to transform source code from components HOT 1
- Multiple style and script tags per component HOT 2
- value.startsWith is not a function in abell serve
- Link external scripts and styles in component HOT 8
- Serve site over network in abell serve HOT 13
- Pluggable System for Third Party Template Systems HOT 1
- Pluggable System for Third Party Template Engines HOT 1
- integrate babel HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from abell.