-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
fix live preview #6013
base: main
Are you sure you want to change the base?
fix live preview #6013
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: shivamgupta2020 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
✅ Deploy Preview for knative ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
/cc @Cali0707 |
/cc @Leo6Leo |
@shivamgupta2020 @Cali0707 Can you provide me with more context about this PR? Is it trying to solve these failures of github actions? Without the changes in this PR, the compilation works fine on my sample app PR and locally. Not sure what is the issue with live preview. If clarification can be provided, that would be really appretiated. |
@Leo6Leo this is to fix the live preview reloading for all the pages, it seems like it currently does not work for pages in the blog directory |
@Leo6Leo , currently the website doesn't reload when changes are made. We have to run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see the comment. Nice catch! @shivamgupta2020
@@ -7,5 +7,5 @@ IMAGE=${3:-ghcr.io/knative/knative-docs:latest} | |||
set -x | |||
|
|||
docker pull ${IMAGE} --platform linux/amd64 | |||
docker run --rm -p "${PORT}:8000" -v "${SCRIPT_DIR}/../../:/site" ${IMAGE} serve --dirtyreload --dev-addr=0.0.0.0:8000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing --dirtyreload
will result in rebuilding the whole sites when you are making changes to .md files. That makes it really non-efficient. You can see the distinct time difference with --dirtyreload
and without --dirtyreload
.
According to the doc here:
This mode simply compares the modified time of the generated HTML and source markdown. If the markdown has changed since the HTML then the page is re-constructed. Otherwise, the page remains as is.
https://www.mkdocs.org/about/release-notes/#support-for-dirty-builds-990
I see the problem that when you are making changes to the file in /overrides
, the pages will not be updated unless you manually re-run the ./hack/docker/run.sh
. I would suggest you to find another solution to resolve this issue. @shivamgupta2020
This Pull Request is stale because it has been open for 90 days with |
This PR resolve live preview that is currently not working properly.