Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use custom-block for docstrings #175

Merged
merged 23 commits into from
Sep 17, 2024
Merged

Use custom-block for docstrings #175

merged 23 commits into from
Sep 17, 2024

Conversation

tpoisot
Copy link
Contributor

@tpoisot tpoisot commented Sep 16, 2024

The current styling for docstrings isn't really in line with the rest of the vitepress theme - this is a work in progress PR to use class='jldocstring custom-block' on the div, to make it look more native.

@tpoisot
Copy link
Contributor Author

tpoisot commented Sep 16, 2024

What is the secret sauce to get the site to build using github actions? I'm getting a final_site folder on gh-pages:

Screenshot_20240916_163811

@asinghvi17
Copy link
Collaborator

Thanks for the PR! This looks promising.

https://tpoisot.github.io/DocumenterVitepress.jl/dev/api has some examples of what this looks like now.

From a brief look it seems that font sizes are smaller in the docstring block than in regular text?

@avik-pal
Copy link
Member

Would it be possible to mimic the Documenter.jl style for the docstrings here? We can leave out the collapsible and such.

The border was added because DocumenterMarkdown used to generate continuous blocks of docstrings for mkdocs (making it hard to distinguish 2 separate docstrings, except the # marker) which was a constant source of complaint from users.

@lazarusA
Copy link
Collaborator

collapsible yes, NOT this. I was playing around with them and it just adds overhead most of times. And, in general, I do like a smaller font, probably not too small.

@tpoisot
Copy link
Contributor Author

tpoisot commented Sep 17, 2024

Thanks all -- I think collapsible (open by default) is definitely achievable, I'm working on it

Font size: this is how custom-block are styles by vitepress, but if there's a .jldocstring class this can be tweaked

@lazarusA
Copy link
Collaborator

@tpoisot
Copy link
Contributor Author

tpoisot commented Sep 17, 2024

yup - that's what I'm trying to do but without success so far...

@tpoisot
Copy link
Contributor Author

tpoisot commented Sep 17, 2024

I get it... for some reason it's pulling the style.css from this repo and not from my fork - scratch this, more accurately, the style.css is compiled as style_css.md?

@asinghvi17
Copy link
Collaborator

asinghvi17 commented Sep 17, 2024

Maybe it's pulling it from docs/src/.vitepress since there's already a style.css there...

@lazarusA
Copy link
Collaborator

well... it looks great as it is. Except, we have a huge empty space when collapsed.

asinghvi17 and others added 3 commits September 17, 2024 10:03
This makes sure that the DV docs always use the template CSS.  Not sure if we want this but can always revert.
@tpoisot
Copy link
Contributor Author

tpoisot commented Sep 17, 2024

I think that's done?

@tpoisot tpoisot marked this pull request as ready for review September 17, 2024 20:34
docs/make.jl Outdated Show resolved Hide resolved
docs/make.jl Outdated Show resolved Hide resolved
@lazarusA lazarusA merged commit e0099b5 into LuxDL:master Sep 17, 2024
1 check passed
@avik-pal
Copy link
Member

Any particular reason to revert the badge (9b637a4)? Personally it looked nicer compared to the dash

@lazarusA
Copy link
Collaborator

Oh, yeah, I merged thinking the bubble badges were there. We should bring them back.

@tpoisot
Copy link
Contributor Author

tpoisot commented Sep 18, 2024

They messed with the spacing a little, but I can try to adjust the margins and bring them back!

@tpoisot tpoisot mentioned this pull request Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants