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

servedocs updates site continuously #174

Closed
cserteGT3 opened this issue Nov 22, 2023 · 1 comment · Fixed by #175
Closed

servedocs updates site continuously #174

cserteGT3 opened this issue Nov 22, 2023 · 1 comment · Fixed by #175

Comments

@cserteGT3
Copy link
Contributor

I have a simple documentation project with a few files and if the served site is opened in the browser and I edit a source file, servedocs starts evaluating and updating continuously, which also means that I cannot really navigate on the site.

Folder structure (the source md files contain only a few lines of text):

.
├── htmlbuild
├── make.jl
├── Manifest.toml
├── Project.toml
└── src
    ├── index.md
    └── template
        ├── assets
        │   └── xkcd-1597.png
        ├── index.md
        └── page-2.md

make.jl:

template = ["index.md", "page-2.md"]
template  = map(x->joinpath("template", x), template)
pagelist = ["Index page" => "index.md",
		"Template" => template]

using Documenter

makedocs(
    sitename = "Template site",
    format = Documenter.HTML(collapselevel=1, edit_link="main"),
    build = "htmlbuild",
    authors = "me"
    pages = pagelist,
    repo = Remotes.GitLab("gitlab.com", "company", "template")
)

Versions:

  • Windows 11
  • Julia v1.9.4
  • [e30172f5] Documenter v1.1.2
  • [16fef848] LiveServer v1.2.7

Output of a "session". I started LiveServer, then edited one file. After that, it kept updating continuously:

C:\Users\projectdir>julia --project -e "using LiveServer; servedocs(foldername=\".\", buildfoldername=\"htmlbuild\", verbose=true)"
[ Info: SetupBuildDirectory: setting up build directory.
[ Info: Doctest: running doctests.
[ Info: ExpandTemplates: expanding markdown templates.
[ Info: CrossReferences: building cross-references.
[ Info: CheckDocument: running document checks.
[ Info: Populate: populating indices.
[ Info: RenderDocument: rendering document.
[ Info: HTMLWriter: rendering HTML pages.
✓ LiveServer listening on http://localhost:8000/ ...
  (use CTRL+C to shut down)
[ Info: [FileWatcher]: now watching '.\htmlbuild\index.html'

[ Info: [FileWatcher]: now watching '.\htmlbuild\assets\warner.js'

[ Info: [FileWatcher]: now watching '.\htmlbuild\assets\themes\documenter-light.css'
[ Info: [FileWatcher]: now watching '.\htmlbuild\assets\themes\documenter-dark.css'
[ Info: [FileWatcher]: now watching '.\htmlbuild\search_index.js'



[ Info: [FileWatcher]: now watching '.\htmlbuild\assets\themeswap.js'

[ Info: [FileWatcher]: now watching '.\htmlbuild\assets\documenter.js'

[ Info: [FileWatcher]: now watching '.\htmlbuild\template\index.html'
# <---------------------------------------------------------------------- here I edited `src/index.md` and saved the file
[ Info: SetupBuildDirectory: setting up build directory.
[ Info: Doctest: running doctests.
[ Info: ExpandTemplates: expanding markdown templates.
[ Info: CrossReferences: building cross-references.
[ Info: CheckDocument: running document checks.
[ Info: Populate: populating indices.
[ Info: RenderDocument: rendering document.
[ Info: HTMLWriter: rendering HTML pages.
[ Info: [LiveServer]: Reacting to change in file 'C:\Users\projectdir\src\index.md'...
[ Info: SetupBuildDirectory: setting up build directory.
[ Info: Doctest: running doctests.
[ Info: ExpandTemplates: expanding markdown templates.
[ Info: CrossReferences: building cross-references.
[ Info: CheckDocument: running document checks.
[ Info: Populate: populating indices.
[ Info: RenderDocument: rendering document.
[ Info: HTMLWriter: rendering HTML pages.
[ Info: [LiveServer]: Reacting to change in file 'C:\Users\projectdir\htmlbuild\index.html'...
[ Info: SetupBuildDirectory: setting up build directory.
[ Info: Doctest: running doctests.
[ Info: ExpandTemplates: expanding markdown templates.
[ Info: CrossReferences: building cross-references.
[ Info: CheckDocument: running document checks.
[ Info: Populate: populating indices.
[ Info: RenderDocument: rendering document.
[ Info: HTMLWriter: rendering HTML pages.
[ Info: [LiveServer]: Reacting to change in file 'C:\Users\projectdir\htmlbuild\assets\warner.js'...
[ Info: SetupBuildDirectory: setting up build directory.
[ Info: Doctest: running doctests.
[ Info: ExpandTemplates: expanding markdown templates.
[ Info: CrossReferences: building cross-references.
[ Info: CheckDocument: running document checks.
[ Info: Populate: populating indices.
[ Info: RenderDocument: rendering document.
[ Info: HTMLWriter: rendering HTML pages.
[ Info: [LiveServer]: Reacting to change in file 'C:\Users\projectdir\htmlbuild\assets\themes\documenter-light.css'...
[ Info: SetupBuildDirectory: setting up build directory.
[ Info: Doctest: running doctests.
[ Info: ExpandTemplates: expanding markdown templates.
[ Info: CrossReferences: building cross-references.
[ Info: CheckDocument: running document checks.
[ Info: Populate: populating indices.
[ Info: RenderDocument: rendering document.
[ Info: HTMLWriter: rendering HTML pages.
[ Info: [LiveServer]: Reacting to change in file 'C:\Users\projectdir\htmlbuild\assets\themes\documenter-dark.css'...
[ Info: SetupBuildDirectory: setting up build directory.
[ Info: Doctest: running doctests.
[ Info: ExpandTemplates: expanding markdown templates.
[ Info: CrossReferences: building cross-references.
[ Info: CheckDocument: running document checks.
[ Info: Populate: populating indices.
[ Info: RenderDocument: rendering document.
[ Info: HTMLWriter: rendering HTML pages.
[ Info: [LiveServer]: Reacting to change in file 'C:\Users\projectdir\htmlbuild\search_index.js'...
[ Info: SetupBuildDirectory: setting up build directory.
[ Info: Doctest: running doctests.
[ Info: ExpandTemplates: expanding markdown templates.
[ Info: CrossReferences: building cross-references.
[ Info: CheckDocument: running document checks.
[ Info: Populate: populating indices.
[ Info: RenderDocument: rendering document.
[ Info: HTMLWriter: rendering HTML pages.
[ Info: [LiveServer]: Reacting to change in file 'C:\Users\projectdir\htmlbuild\assets\themeswap.js'...
[ Info: SetupBuildDirectory: setting up build directory.
[ Info: Doctest: running doctests.
[ Info: ExpandTemplates: expanding markdown templates.
[ Info: CrossReferences: building cross-references.
[ Info: CheckDocument: running document checks.
[ Info: Populate: populating indices.
[ Info: RenderDocument: rendering document.
[ Info: HTMLWriter: rendering HTML pages.
[ Info: [LiveServer]: Reacting to change in file 'C:\Users\projectdir\htmlbuild\assets\documenter.js'...
[ Info: SetupBuildDirectory: setting up build directory.
[ Info: Doctest: running doctests.
[ Info: ExpandTemplates: expanding markdown templates.
[ Info: CrossReferences: building cross-references.
[ Info: CheckDocument: running document checks.
[ Info: Populate: populating indices.
[ Info: RenderDocument: rendering document.
[ Info: HTMLWriter: rendering HTML pages.
[ Info: [LiveServer]: Reacting to change in file 'C:\Users\projectdir\htmlbuild\template\index.html'...
[ Info: SetupBuildDirectory: setting up build directory.
[ Info: Doctest: running doctests.
[ Info: ExpandTemplates: expanding markdown templates.
[ Info: CrossReferences: building cross-references.
[ Info: CheckDocument: running document checks.
[ Info: Populate: populating indices.
[ Info: RenderDocument: rendering document.
[ Info: HTMLWriter: rendering HTML pages.
[ Info: [LiveServer]: Reacting to change in file 'C:\Users\projectdir\htmlbuild\index.html'...
[ Info: SetupBuildDirectory: setting up build directory.
[ Info: Doctest: running doctests.
[ Info: ExpandTemplates: expanding markdown templates.
[ Info: CrossReferences: building cross-references.
[ Info: CheckDocument: running document checks.
[ Info: Populate: populating indices.
[ Info: RenderDocument: rendering document.
[ Info: HTMLWriter: rendering HTML pages.
[ Info: [LiveServer]: Reacting to change in file 'C:\Users\projectdir\htmlbuild\assets\warner.js'...
[ Info: SetupBuildDirectory: setting up build directory.
[ Info: Doctest: running doctests.
[ Info: ExpandTemplates: expanding markdown templates.
[ Info: CrossReferences: building cross-references.
[ Info: CheckDocument: running document checks.
[ Info: Populate: populating indices.
[ Info: RenderDocument: rendering document.
[ Info: HTMLWriter: rendering HTML pages.
[ Info: [LiveServer]: Reacting to change in file 'C:\Users\projectdir\htmlbuild\assets\themes\documenter-light.css'...
[ Info: SetupBuildDirectory: setting up build directory.
[ Info: Doctest: running doctests.
[ Info: ExpandTemplates: expanding markdown templates.
[ Info: CrossReferences: building cross-references.
[ Info: CheckDocument: running document checks.
[ Info: Populate: populating indices.
[ Info: RenderDocument: rendering document.
[ Info: HTMLWriter: rendering HTML pages.
[ Info: [LiveServer]: Reacting to change in file 'C:\Users\projectdir\htmlbuild\assets\themes\documenter-dark.css'...
[ Info: SetupBuildDirectory: setting up build directory.
[ Info: Doctest: running doctests.
[ Info: ExpandTemplates: expanding markdown templates.
[ Info: CrossReferences: building cross-references.
[ Info: CheckDocument: running document checks.
[ Info: Populate: populating indices.
[ Info: RenderDocument: rendering document.
[ Info: HTMLWriter: rendering HTML pages.
[ Info: [LiveServer]: Reacting to change in file 'C:\Users\projectdir\htmlbuild\search_index.js'...
[ Info: SetupBuildDirectory: setting up build directory.
[ Info: Doctest: running doctests.
[ Info: ExpandTemplates: expanding markdown templates.
[ Info: CrossReferences: building cross-references.
[ Info: CheckDocument: running document checks.
[ Info: Populate: populating indices.
[ Info: RenderDocument: rendering document.
[ Info: HTMLWriter: rendering HTML pages.
[ Info: [LiveServer]: Reacting to change in file 'C:\Users\projectdir\htmlbuild\assets\themeswap.js'...
[ Info: SetupBuildDirectory: setting up build directory.
[ Info: Doctest: running doctests.
[ Info: ExpandTemplates: expanding markdown templates.
[ Info: CrossReferences: building cross-references.
[ Info: CheckDocument: running document checks.
[ Info: Populate: populating indices.
[ Info: RenderDocument: rendering document.
[ Info: HTMLWriter: rendering HTML pages.
[ Info: [LiveServer]: Reacting to change in file 'C:\Users\projectdir\htmlbuild\assets\documenter.js'...
# killed it with ctrl+c

Do you have any idea what happens here?

@cserteGT3
Copy link
Contributor Author

With git bisect I got the following result:

$ git bisect good
Bisecting: 0 revisions left to test after this (roughly 1 step)
[3fbdaf2a66c7e55b6d788d26f5780c132ef2c391] fixes for skip dir and adjustment to the docs (#169)

Checking that commit and #169, I think I have a solution. Will link the PR.

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 a pull request may close this issue.

1 participant