Comments (5)
Interesting... Could you please submit a pull request with your change? Thanks!
from kroki.
yes, i will submit a pull request asap.
But i have to add something, which i didn't see before:
When the "window.EXCALIDRAW_ASSET_PATH" is set, the links to the fronts are also replaced.
This is the desired behaviour.
For example the kroki original example for excalidraw is using "Virgil" and "Cascadia" as fonts and loading them from https://unpkg.com/@excalidraw/[email protected]/dist/excalidraw-assets/
With window.EXCALIDRAW_ASSET_PATH="excalidraw/" set, the url is changed to "excalidraw//dist/excalidraw-assets/".
It is relative to the basepath, so with a standard kroki installation it will try to load the fonts from https://example.com/excalidraw/svg/excalidraw//dist/excalidraw-assets/Virgil.woff2 which results in an 404 error from kroki.
In my case this is not a problem. I am using an Apache2 reverse proxy before kroki so i can exclude this specific url from proxy pass.
Maybe it's possible to make a new ENVIRONMENT variable for this case, for example "KROKI_EXCALIDRAW_ASSET_PATH" and set default to an empty string?
An empty string behaves actually the same as if the variable were not set so it should work in the default place, when everything is connected to the internet.
But i am not familiar enough with the software to say if it is possible to implement like that...
from kroki.
Indeed, we need to load assets used server-side locally but on the client side we should load assets from the CDN or provide an option to load them from elsewhere. I don't want to serve these assets from kroki.io.
from kroki.
I have opened a pull request.
I have now implemented the change slightly differently via an environment variable, which is empty by default so that the standard behaviour (reloading via CDN) does not change.
from kroki.
Fixed in 2965a67
Thanks @gerlingsm 🙌🏻
from kroki.
Related Issues (20)
- Not all structurizr autolayout directions work HOT 2
- Graphviz rendering: problem with crow's foot notation HOT 2
- plantuml: png sequence diagram error (with graalvm build) HOT 1
- Plantuml directive "!include" doesn't work HOT 1
- blockdiag removed? HOT 4
- Consider moving k8s yamls into seperate folders HOT 1
- Generating a Mermaid SVG differs from a generated PNG.
- Excalidraw not working on Kubernetes? HOT 3
- Export metrics as Prometheus/OpenMetrics format at /metrics
- Update Kubernetes documentation to remove blockdiag and wireviz services
- Convert duration that increases over time (public instance)
- Documentation at docs.kroki.io is out of date HOT 5
- TikZ not working on arm64 HOT 4
- port not available HOT 3
- unable to produce plantuml C4 diagram HOT 1
- Excalidraw: add option to embed fonts into svg
- Way to turn off certificate validation for plantuml !includeurl's HOT 1
- Add support for TextUSM
- Structurizr: "filtered" view is not supported HOT 2
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 kroki.