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

DocumentationGenerator.jl failing with custom docs/make.jl #142

Open
tkf opened this issue Jun 17, 2020 · 0 comments
Open

DocumentationGenerator.jl failing with custom docs/make.jl #142

tkf opened this issue Jun 17, 2020 · 0 comments

Comments

@tkf
Copy link

tkf commented Jun 17, 2020

The documentation of Transducers.jl in JuliaHub is broken https://juliahub.com/docs/Transducers/cATK6/0.4.35/. When it's built correctly, it'd be something like https://juliafolds.github.io/Transducers.jl/dev.

I think this is because DocumentationGenerator.jl tries to rewrite docs/make.jl

fix_makefile(makefile)
Takes in the path to a Documenter.jl-compatible `make.jl` file and
1. Removes all calls to `deploydocs`.
2. Records the custom `build` kwarg in the `makedocs` call.
3. Makes sure that `format` is set to `Documenter.HTML(...)` in the `makedocs` call.

while Transducers.jl has a bit unusual docs/make.jl

https://github.com/JuliaFolds/Transducers.jl/blob/dcd07701570a5e3d14085fa95ff509daccb05048/docs/make.jl#L14-L22

It'd be nice if we can take a bit more declarative approach. For example, how about asking user to (optionally) create docs/build.jl which must define a function (say) build. Something like

using Documenter

build(; kwargs...) = makedocs(;
    # User's setup
    modules = [Transducers],
    pages = [...],
    ...,
    # Let DocumentationGenerator.jl override some keyword arguments:
    kwargs...,
)

Then, docs/make.jl would be

include("build.jl")
build()
deploydocs(...)
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

No branches or pull requests

1 participant