-
Notifications
You must be signed in to change notification settings - Fork 273
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
Bedrock support: Use home URLs instead of site URL or paths #840
base: develop
Are you sure you want to change the base?
Conversation
8995020
to
250de05
Compare
Hi @oriolarcas, many thanks for this PR! I'm excited to get it merged, but also want to make sure we're not changing behaviour in an unexpected way for non-Bedrock/custom dir sites. There are some failing tests in this PR - could you please run
@palmiak I think you're running Bedrock - what do you think about this PR? |
I did some work to try adding Bedrock to our integration tests. In order to get crawling working, I had to change https://github.com/leonstafford/wp2static/blob/1db23dc1ed9e0c13bc82d8efa5f2e1831dd463ec/src/Crawler.php#L116 to Did you also need to make a change in that area, or is there some other way to deal with that? |
250de05
to
6ce45a7
Compare
6ce45a7
to
6cce684
Compare
I made some other changes to get crawling and post-processing working, and added Bedrock to the integration tests. I believe that this is the correct behavior in general and not a Bedrock-specific fix. However, this is a breaking change, and it's possible that someone has a working website that depends on the current behavior. We may want to add an option like "Use WP home URL as the site root". |
@john-shaffer cool - time for a BC release version, seems all the fun in PHP these days :D Still some failing tests on the PR though |
(or does it need GH actions re-run/forced run after last push?) |
Sorry, I should have mentioned that this is still WIP |
I have some work on adding an option for this at john-shaffer@f18c15c However, I find it impossible to predict what the impact of these changes will be on real sites. |
@leonstafford can you take a look at my review notes from earlier? If we can address those, I would be okay with merging this. I'm pretty sure that using the home URL is the correct behavior, and I guess that adding an option for the old incorrect behavior wasn't the best idea. We can do without that. |
Sorry for the delay, @john-shaffer, will get to reviewing your notes this soon! |
@john-shaffer sorry for delays. If you could please resolve conflicts and choose whether you want the option from your branch in, I'll merge this in soon. We can see what kind of reports if any we get in from the repo users before bundling into next major release |
Hate to be "that guy", but any update on this? |
Hi @SharkWipf thanks for keeping pressure on, I've got a lot of catching up to do on this repo! |
f18c15c
to
6cce684
Compare
Sorry for not answering @john-shaffer, thank you for taking over the PR. |
WP2Static assumes that the base path of some directories is the root of the Wordpress install, but in some environments like Bedrock these directories can be in a different subdirectory (like "wp/"). This assumption adds private directories to the detected URLs. This PR removes that assumption.