LuxDL / DocumenterVitepress.jl

Documentation with Documenter.jl and VitePress
https://luxdl.github.io/DocumenterVitepress.jl/
MIT License
62 stars 9 forks source link

Provide a builtin way to run docs:dev #125

Closed asinghvi17 closed 1 month ago

asinghvi17 commented 1 month ago

And explain that you have to add clean=false to makedocs.

asinghvi17 commented 1 month ago

If anyone wants to take this up, this would be a simple function like:

function dev_docs(path_to_docs_folder)
        node() do _
                cd(path_to_docs_folder) do
                        # first, copy the `package.json` from `template` if it does not already exist
                        run(`$npm i`)
                        # run some kind of while or async loop, so that if the process ever terminates, it is immediately restarted
                        while ...
                                run(`$npm run docs:dev`)
                        end
                end
        end
end
dev_docs(package::Module) = dev_docs(joinpath(pathof(package) |> dirname |> dirname, "docs"))
asinghvi17 commented 1 month ago

A dev_docs and build_docs function was introduced in v0.0.20.