Comments (7)
This is definitely a good idea but is really plugin territory I think. You currently can't inject regular express middleware into the web plugin but if I opened that up then you could use an existing local placeholder generator lib (I'm sure there are some!) instead of re-inventing the wheel.
Actually I really like this idea - it would open up a lot of additional possibilities. I'll get on it!
from fractal.
I remember using img-placeholder (or was it node-img-placeholder) on a project last year… can’t remember how successfully. But yes, very useful when creating placeholder content for components.
from fractal.
I'm just tinkering with this now and it's pretty straightforward to get it up and running when using the development server. However the problem is that the static build of the site will reference the image URLs but they wouldn't exist if the server isn't running. So not useful if you want to give a static export to a client.
I'll still add in the middleware option but I'll try and think if there is anyway else that this could be done that is more compatible with the static export.
from fractal.
Ah, of course. Can you note write the placeholder images to the static folder?
from fractal.
Yeah possibly... but it might get complicated as the placeholder image generation is typically on-demand and so any that hadn't been requested wouldn't be in the static folder. A library that generated placeholders as data URIs in the config file would work, but would make the code view pretty verbose!
from fractal.
Ok this is actually way nastier that I thought. All the node placeholder image services need Cairo which has to be installed separately via brew. WIll close this for now as with the middleware support (which I've just added) users can hack this in themselves if they think it's worth the effort!
from fractal.
from fractal.
Related Issues (20)
- Examples for integrations missing in the guide HOT 4
- Error: Fractal themes must inherit from the base Theme class. HOT 4
- Make subnavigation for variants configurable
- URL inconsitency dev-server/build HOT 4
- Split react adapter helper components into another package
- Feature: @partial-block for nunjucks engine HOT 5
- Build will not run properly if there is a hidden directory in the path HOT 3
- Twig adapter returns "unable to parse" error depending on include-statements location in DOM HOT 1
- Add option to exclude timestamp from build component files HOT 2
- DeprecationWarning: Invalid 'main' field in package.json HOT 3
- Inefficient Regular Expression Complexity in marked HOT 1
- Sync not working on documentation section HOT 5
- PSA: status of project & looking for maintainers! HOT 6
- Vulnerabilities in Frctl HOT 3
- Search no longer filters results HOT 4
- Require is not defined - new Fractal installation HOT 2
- Is Nodejs v18.12.1 LTS supported? Is this module still maintained? html is escaped HOT 6
- Twig.js new release (1.16.0) dependency breaks the fractal adapter with this error: TwigException: Cannot extend an inline template HOT 1
- Add Mozilla Protocol design system to home page/fractal in the wild HOT 2
- Bug in nav-collapse margin-inline sizing HOT 1
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 fractal.