Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Allow users to provide a custom Kroki URL instead of hard-coding
https://kroki.io.
Basic example
In
params.toml
, users of this theme can set a custom Kroki URL, suchas a local instance:
I tried my best to keep proper backwards compatibility should users not
provide this configuration key at all—see the diff. Should this not be
acceptable, please let me know.
Motivation
At times, the upstream kroki.io service may run into resource exhaustion.
This can be due to a high volume of requests or a temporary outage.
During an automated build, this isn't so bad—caches should exist and
therefore not hit Kroki as often.
However, especially during the writing phase of
documentation, where fast iteration is often needed, it is not helpful
when the upstream service runs into said resource exhaustion and responds
with an unhelpful "Bad Request" error.
This issue is known and understood by the Kroki team; the fix is to run
your own instance.1
I will shortly raise a PR to gethyas/doks to reflect this change in the
configuration files.
Checks
npm run test
Note: npm complains about not having a
test
script, therefore I couldnot run it, hence unchecked.
Footnotes
https://kroki.zulipchat.com/#narrow/stream/232085-users/topic/kroki.2Eio.20returns.20400.20on.20Mermaid.20diagrams ↩