Comments (6)
Template overrides
Yeah, by all means update the docs. Most of these just assume a basic knowledge of Twig… but Twig docs are +/- in some ways.
Basically if you set up something like
pages:
enabled: true
feed_template: rss.twig
What Twig will do is first look in the Bolt defined paths for rss.twig
, then in the root of the active theme, then in the extension's assets/
folder
You can even add relative paths, like foo/bar/rss.twig
, e.g. I usually set up something like
pages:
enabled: true
feed_template: extensions/rss/rss.twig
…and in my theme directory create extensions/rss/
and add the Twig file there
from bolt-extension-rssfeed.
Markdown
Just create a separate Twig template for that ContentType and use the Twig |markdown
filter that comes with Bolt, e.g.:
{{ record.foobar|markdown }}
from bolt-extension-rssfeed.
re template overrides: that's actually better than I hoped for - I was wondering whether there would be a generic way of overriding plugin templates, guess that's a yes. :) Maybe the wording in the config could be slightly altered, but this is more of a Bolt thing, then, worth mentioning somewhere in the template section. That's where I expected it most.
re Markdown: yeah, that's what I did. I figured I didn't really need the HTML scrubbing. Just in case I ever do feel the need, what would be the best way to go about combining the two? Would it make sense to have the plugin auto-parse any markdown fields in the record, or make that a switchable behaviour?
from bolt-extension-rssfeed.
but this is more of a Bolt thing, then, worth mentioning somewhere in the template section. That's where I expected it most.
It's a Twig thing very specifically. We don't try to cover off too much documentation of upstream libraries, generally speaking, as… resources
Would it make sense to have the plugin auto-parse any markdown fields in the record, or make that a switchable behaviour?
No, that belongs in a custom template. Markdown is loved by many, but not fabulous on performance. so impacting every single call for every single user doesn't make sense.
from bolt-extension-rssfeed.
It's a Twig thing very specifically. We don't try to cover off too much documentation of upstream libraries, generally speaking, as… resources
😁
OK, that makes sense then. Just something you'd have to know.
No, that belongs in a custom template. Markdown is loved by many, but not fabulous on performance. so impacting every single call for every single user doesn't make sense.
Fair enough. Maybe worth mentioning in a readme somewhere, then?
from bolt-extension-rssfeed.
Bit of a late reply, but the extension supports markdown now.
from bolt-extension-rssfeed.
Related Issues (12)
- v3.0.5 doesn't work on Bolt 3.1.1 HOT 19
- BUG : All records are fetched even with draft status HOT 2
- bolt 2.1 breaks rssfeed extension HOT 2
- Generated links to posts are incorrect HOT 1
- Feed per category HOT 2
- Variable "canonical" does not exist in "rss.twig" at line 5. HOT 3
- Error on newest bolt installation HOT 1
- Add tags to feeds? HOT 1
- Content-Type HOT 2
- Language code?
- Absolute paths should be turned into full URLs
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 bolt-extension-rssfeed.