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

Make livereload work with Turbolinks #6821

Closed
bep opened this issue Jan 29, 2020 · 2 comments · Fixed by #6822
Closed

Make livereload work with Turbolinks #6821

bep opened this issue Jan 29, 2020 · 2 comments · Fixed by #6822
Assignees
Milestone

Comments

@bep
Copy link
Member

bep commented Jan 29, 2020

The current workaround is hugo serfver --disableLiveReload, which is ... suboptimal.

@bep bep self-assigned this Jan 29, 2020
@bep bep added this to the v0.64 milestone Jan 29, 2020
bep added a commit to bep/hugo that referenced this issue Jan 29, 2020
… if possible

This makes it work with Turbolinks.

Fixes gohugoio#6821
bep added a commit to bep/hugo that referenced this issue Jan 29, 2020
… if possible

This makes it work with Turbolinks.

Fixes gohugoio#6821
bep added a commit to bep/hugo that referenced this issue Jan 29, 2020
… if possible

We used to insert the livereload script right before the closing body.

This dord  not work when combined with tools such as Turbolinks.

This commit changes it So we try to inject the script as early as possible.

Fixes gohugoio#6821
@bep bep closed this as completed in #6822 Jan 29, 2020
bep added a commit that referenced this issue Jan 29, 2020
… if possible

We used to insert the livereload script right before the closing body.

This dord  not work when combined with tools such as Turbolinks.

This commit changes it So we try to inject the script as early as possible.

Fixes #6821
bep added a commit that referenced this issue Jan 31, 2020
In #6821 we moved the loading from end of body to head to make Turbolinks and similar work.

This commit adds a defer attribute to avoid page parse blocking.
@hrishikesh-k
Copy link

hrishikesh-k commented Aug 29, 2020

Sorry to bump this thread, but, is it finally working? I am using latest Hugo version (0.74.3), but, I can't get Turbolinks to work with livereload. However, using it with hugo server --disableLiveReload is working.

EDIT: Sorry about the comment. It seems to be working now without any change on my end.

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants