ali-ramadhan / DocumenterCitations.jl

DocumenterCitations.jl uses Bibliography.jl to add support for BibTeX citations and references in documentation pages generated by Documenter.jl.
https://ali-ramadhan.github.io/DocumenterCitations.jl/dev
MIT License
65 stars 10 forks source link

Add linkify() helper, reduce code duplication, fix HTML #46

Closed fingolfin closed 3 years ago

fingolfin commented 3 years ago

I also noticed that the code actually produced invalid HTML and fixed that now, too

LazyScholar commented 3 years ago

Will approve of those changes. Should i wait a bit before registering the changes globally?

One question as a fellow user of DocumenterCitations.jl. Would you mentions such a hack

```@raw html
<style>
dl {
display: grid;
grid-template-columns: max-content auto;
}
dt {
grid-column-start: 1;
}
dd {
grid-column-start: 2;
margin-bottom: 0.75em;
}
</style>

in the documentation, implement it into the `Documenter.jl` `.css` or keep it for yourself?
LazyScholar commented 3 years ago

Never mind. I saw that your PR was 16hrs old so i registered it.

fingolfin commented 3 years ago

Regarding that CSS hack: ideally Documenter.jl should allow extensions to register additional .css files. And then of course they should use an id selector, and not apply to all dl/dt/dd elements --- but I assume that's what you had in mind anyway :-)

LazyScholar commented 3 years ago

Kinda. I would have included the css style with a child selector id. And added a corresponding id to <dl> in DocumenterCitations.jl. But your approach would be much cleaner. Documenter.jl supports manual css additions and also starts to experiment with theming. I think i will put it on my watchlist and make a PR if the time comes. For now can i live with the 'hack'.

Thanks for the opinion.

fingolfin commented 3 years ago

You could always be proactive and suggest this to the Documenter.jl folks. They might not be aware of the need, and who knows, perhaps it could be added quickly?

LazyScholar commented 3 years ago

https://github.com/JuliaDocs/Documenter.jl/issues/1612