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

How remove live reload? #588

Closed
patrickboulay opened this issue Jul 20, 2018 · 7 comments
Closed

How remove live reload? #588

patrickboulay opened this issue Jul 20, 2018 · 7 comments

Comments

@patrickboulay
Copy link

Is there an option to deactivate the live reload?

Thanks

@SidVal
Copy link
Member

SidVal commented Jul 23, 2018

Excuse me, what is live reload?
Give me an example 😐

@patrickboulay
Copy link
Author

patrickboulay commented Jul 23, 2018

If you open your doc in a browser and you modify the .md files, you will see your web page automatically updated.

Also, if you display the source code of the web page, you will see this line at the end:

<script src="//10.2.3.19:35729/livereload.js?snipver=1" async="" defer=""></script></body>

There is an openned connection on port 35729 waiting for an update of the documentation.
You can also specify the reload port using the argument -P, ex: -P 35730

I dont need this feature.

@SidVal
Copy link
Member

SidVal commented Jul 24, 2018

Well, I didn't know that. Sorry.

Please @QingWei-Li, can you give us a ✋ here, please?

@jingsam
Copy link
Contributor

jingsam commented Jul 26, 2018

You can use http-server instead of docsify serve. Note that you should run npm install http-server -g first.

@iluhavlg
Copy link

I need to do the same thing.
Now i got an error
GET https://MYURL:35729/livereload.js?snipver=1 net::ERR_CONNECTION_TIMED_OUT
and the page spins the loader a while until the error occurs

@hhtower
Copy link

hhtower commented May 12, 2023

how can i delete livereload ?
use docsify-cli 4.4.4.
when docsify server, then visit, and throw strict-origin-when-cross-origin.
so I want to delete it.

@GaoFeiGit
Copy link

Modify this file

{NODE_HOME}\node_modules\docsify-cli\node_modules\connect-livereload\index.js

  1. Find snippet method
function snippet(host) {
    var src = opt.src || '//' + host + ':' + port + '/livereload.js?snipver=1';
    return [src].concat(plugins).map(function(source) {
      return '<script src="' + source + '" async="" defer=""></script>';
    }).join('');
  }
  1. Modify snippet method
function snippet(host) {
    var src = opt.src || '//' + host + ':' + port + '/livereload.js?snipver=1';
    return [src].concat(plugins).map(function(source) {
      return '';
    }).join('');
  }

Done!

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

7 participants