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

Livereload is still loaded with --no-livereload flag #851

Closed
valdestron opened this issue Aug 17, 2018 · 2 comments
Closed

Livereload is still loaded with --no-livereload flag #851

valdestron opened this issue Aug 17, 2018 · 2 comments

Comments

@valdestron
Copy link

valdestron commented Aug 17, 2018

Using mkdocs serve --no-livereload generates a temporary build with no livereload script.
In the browser livereload.js is still loaded, the script is added programmatically with hardcoded port and in almost all cases wrong hostname.

[Description of the bug]

 <script type="text/javascript">document.write("<script src=//" + window.location.hostname + ":8000/livereload.js?port=8000> </"+"script>");</script>

This line is added despite --no-livereload flag.

[What you expected to happen]

No livereload scripts added or atleast port and hostname can be configurable to actually load it.

[What is actually happening]

error livereload.js?port=8000 404 (Not Found)

  1. mkdocs serve --no-livereload
  2. open browser
  3. livereload.js is loaded programmatically through document.write

Package versions

(app-root) sh-4.2$ python --version
Python 3.6.3

app-root) sh-4.2$ mkdocs --version
mkdocs, version 1.0.1 from /opt/app-root/lib/python3.6/site-packages/mkdocs (Python 3.6)

(app-root) sh-4.2$ pip show mkdocs-material | grep -E ^Version
Version: 3.0.3

Project configuration

site_name: name
nav:
    - Home: index.md
theme:
    name: 'material'
    palette:
      primary: '#285b7a'
      accent: '#03DAC6'
    logo: 'assets/logo.jpg'
    favicon: 'assets/favicon.ico'
extra:
    font:
      text: 'Slabo 13px'
      code: 'Ubuntu Mono'
markdown_extensions:
    - admonition
    - codehilite(guess_lang=false)
    - toc(permalink=true)
    - footnotes
    - pymdownx.superfences
extra_css:
    - 'assets/extra.css'
edit_uri: edit/master/docs/src
docs_dir: src
site_dir: docs-gen
repo_url: ...

System information

uname -a
Linux podname 3.10.0-862.3.3.el7.x86_64 #1 SMP Wed Jun 13 05:44:23 EDT 2018 x86_64 x86_64 x86_64 GNU/Linux

  • Browser: Chrome
@squidfunk
Copy link
Owner

Material doesn't add the livereload script, it should either be related to MkDocs or your setup.

@valdestron
Copy link
Author

Ok, added issues to mkdocs.

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

2 participants