Hi All!
What workflow do you typically use for including diagrams in sourcehut?
From what I've seen so far, there are a few typical ways to do it:
1. ascii art
2. add an image file to the repo and embed it
3. use builds to generate a custom readme
Are there any other good ways that people can recommend?
In the past, I've enjoyed using the plantuml/mermaidjs integrations
offered by gitlab/github. The user experience there is very nice
because you can code the diagram directly into your documentation,
which IMO hits the sweet spot in the simplicity<->power tradeoff
better than the three existing solutions. I've never used Pikchr[0]
but it seems like it would be pretty easy to add into a markdown
rendering pipeline[1].
Is there any interest in this kind of integration, or is this something
that is sufficiently covered by #3 above?
[0]: https://pikchr.org/home/doc/trunk/homepage.md
[1]: https://pikchr.org/home/doc/trunk/doc/integrate.md
>What workflow do you typically use for including diagrams in sourcehut?
I just upload all the images needed into a resources folder, called
normally resources or gallery, and link them to the README/documentation
place, if needed.
On Mon Jul 18, 2022 at 12:58 PM EDT, Ethan Davidson wrote:
>> What workflow do you typically use for including diagrams in sourcehut?>
You could also use srht.site to host custom documentation. By using a
static site generator, you should be able to generate any kind of
diagrams you want though using cdns is blocked by the service.
On Mon Jul 18, 2022 at 12:58 PM EDT, Ethan Davidson wrote:
> Hi All!>> What workflow do you typically use for including diagrams in sourcehut?> >From what I've seen so far, there are a few typical ways to do it:>> 1. ascii art> 2. add an image file to the repo and embed it> 3. use builds to generate a custom readme>> Are there any other good ways that people can recommend?>> In the past, I've enjoyed using the plantuml/mermaidjs integrations> offered by gitlab/github. The user experience there is very nice> because you can code the diagram directly into your documentation,> which IMO hits the sweet spot in the simplicity<->power tradeoff> better than the three existing solutions. I've never used Pikchr[0]> but it seems like it would be pretty easy to add into a markdown> rendering pipeline[1].
Also see pic(1) and pic2plot(1) — the Unix equivalent of Pikchr.
[1]: pic2plot -T svg file.md | sed 's/^\.P[SE]//g' > README.md
Cheers,
--
DJ Chase
They, Them, Theirs
> I just upload all the images needed into a resources folder, called> normally resources or gallery, and link them to the README/documentation> place, if needed.
If I remember correctly, it's not exactly part of the "approved use" to
have possibly-large binary blobs in git. I think that srht.site would be
a better way to go about this.
>If I remember correctly, it's not exactly part of the "approved use">to have possibly-large binary blobs in git. I think that srht.site>would be a better way to go about this.
You may be right. However, a couple of KBs for a diagram it's not that
big for git.