google / docsy

A set of Hugo doc templates for launching open source content.
https://docsy.dev
Apache License 2.0
2.57k stars 888 forks source link

Is it possible to adjust the height of a rendered markmap? #1144

Open ajfriesen opened 2 years ago

ajfriesen commented 2 years ago

When using MarkMaps they are always a fixed size. We have huge whitespace below the created mindmap svg. Especially when you create markmaps with a lot of horizontal content which could easily be shown on the page. But the whitespace is not allowing that.

Is it somehow possible to increase the height of the rendered markmap?

LisaFC commented 2 years ago

@llhhbc you added the MarkMap integration, any ideas? I can take a look too.

LisaFC commented 2 years ago

Have just seen that the height is hardcoded here: https://github.com/google/docsy/blob/main/layouts/partials/scripts.html#L16

I need to fix something else in that file, and then I'll see if I can make it more flexible.

ajfriesen commented 2 years ago

Any update on this?

emckean commented 2 years ago

ugh, sorry, I took over the fix but didn't see this issue. The other fix is in https://github.com/google/docsy/pull/1175, but I'm also checking on something else so I'll keep this in mind now!

Short-term, I think you could change that height in the /layouts/partials/scripts.html file

blake-glyd commented 1 year ago

Any updates on making this more flexible?

llhhbc commented 1 year ago

@LisaFC Sorry, the previous level was limited, and it could only be integrated, but it could not be extended.

huanlin commented 1 month ago

In pull request #1365, it says:

you now can set width and height individually for each mindmap ...

But I couldn't figure out how to achieve that. Would anyone shed some light on this?

I have also left a comment under that pull request.

deining commented 1 month ago

In pull request #1365, it says:

you now can set width and height individually for each mindmap ...

But I couldn't figure out how to achieve that. Would anyone shed some light on this?

See my comment at the associated PR #1365.