~sircmpwn/sr.ht-discuss

5 4

using diagrams in sourcehut

Details
Message ID
<CAAE3mZjKynZKEvszbD-x9kGBfBL4P5U73FZ1F4ZmpVc5zNbA=A@mail.gmail.com>
DKIM signature
missing
Download raw message
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
Adolfo Santiago <epoch@nixnetmail.com>
Details
Message ID
<20220718171451.oa2c3odt4hwbhs3e@MacBook-Pro-de-Adolfo.local>
In-Reply-To
<CAAE3mZjKynZKEvszbD-x9kGBfBL4P5U73FZ1F4ZmpVc5zNbA=A@mail.gmail.com> (view parent)
DKIM signature
missing
Download raw message
>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.
Details
Message ID
<CLIYJQGC85WI.34N6WPPLHVWQ6@B5>
In-Reply-To
<CAAE3mZjKynZKEvszbD-x9kGBfBL4P5U73FZ1F4ZmpVc5zNbA=A@mail.gmail.com> (view parent)
DKIM signature
missing
Download raw message
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.
Details
Message ID
<CLIYRZX6IPS3.1RN4D5CRAZO9U@grinningface>
In-Reply-To
<CAAE3mZjKynZKEvszbD-x9kGBfBL4P5U73FZ1F4ZmpVc5zNbA=A@mail.gmail.com> (view parent)
DKIM signature
missing
Download raw message
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
Cara Salter <cara@devcara.com>
Details
Message ID
<d82b9be7-c30b-f93b-b086-deae9da24ec7@devcara.com>
In-Reply-To
<20220718171451.oa2c3odt4hwbhs3e@MacBook-Pro-de-Adolfo.local> (view parent)
DKIM signature
missing
Download raw message
> 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.
Adolfo Santiago <epoch@nixnetmail.com>
Details
Message ID
<20220718194516.pgyuyzpahzshisrh@MacBook-Pro-de-Adolfo.local>
In-Reply-To
<d82b9be7-c30b-f93b-b086-deae9da24ec7@devcara.com> (view parent)
DKIM signature
missing
Download raw message
>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.
Reply to thread Export thread (mbox)