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

Duplicate static files with mkdocs #3497

Closed
davidfischer opened this issue Jan 9, 2018 · 6 comments
Closed

Duplicate static files with mkdocs #3497

davidfischer opened this issue Jan 9, 2018 · 6 comments
Labels
Bug A bug
Milestone

Comments

@davidfischer
Copy link
Contributor

Details

On the very first build of a brand new mkdocs project, the docs build runs twice which creates duplicate CSS and JS files in the <head> of the output. When a project is built a second time, this error does not manifest itself.

To reproduce locally, do a manual project import of mkdocs itself and trigger a build.

Expected Result

The HTML build should only run once and there should be no duplicate CSS and JS files referenced in the output.

Actual Result

The output HTML references the same CSS and JS files multiple times.

This first screenshot illustrates that additional CSS and JavaScript files are added twice.
screen shot 2018-01-09 at 1 19 00 pm

This second screenshot illustrates that the extra_css and extra_javascript have duplicates in the mkdocs.yml file.
screen shot 2018-01-09 at 1 50 51 pm

@davidfischer
Copy link
Contributor Author

Very specifically it looks like since the build is triggered twice, the extra CSS and JS are appended twice. See: https://github.com/rtfd/readthedocs.org/blob/4d10f2e/readthedocs/doc_builder/backends/mkdocs.py#L89-L97

@stsewd
Copy link
Member

stsewd commented Jan 18, 2018

Seems like the second build is triggered when synchronizing versions
[17/Jan/2018 23:49:31] readthedocs.restapi.views.model_views:174[14143]: INFO Triggering new stable build: mkdocs:269190c9aa18a33d397f424860fcf07bbfe96f0c

I'm going to investigate more about this in the next days

@stsewd
Copy link
Member

stsewd commented Jan 23, 2018

On readthedocs.org works fine, is this something that just affect to local instances? or maybe a recent regression (I'm not sure what commit is on production right now)?

@stsewd
Copy link
Member

stsewd commented Jan 23, 2018

Also experienced with this repo https://github.com/orbingol/NURBS-Python (local instance only)

@agjohnson agjohnson added this to the Mkdocs milestone Apr 10, 2018
@agjohnson agjohnson removed the Mkdocs label Apr 10, 2018
@stsewd
Copy link
Member

stsewd commented Jun 6, 2018

I can't replicate this anymore, I think this was something to do with #3946. @davidfischer can you confirm if this issue is solved?

@davidfischer
Copy link
Contributor Author

I'm not seeing it! It is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug
Projects
None yet
Development

No branches or pull requests

4 participants