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

Update pretty relative index links to rewrite to ./ instead of / #1238

Merged
merged 4 commits into from
Mar 8, 2023

Conversation

caendesilva
Copy link
Member

@caendesilva caendesilva commented Mar 8, 2023

This fixes an edge case bug when using pretty URLs in a subdirectory where the index page was not properly resolved relatively.

So a link to 'index.html' when using pretty URLs is now actually relative, instead of linking to the webroot which breaks subdirectories and local browsing. Both . and ./ work, so I choose the latter as I think it looks better.

@caendesilva caendesilva changed the title Update pretty relative index links to rewrite to . instead of / Update pretty relative index links to rewrite to ./ instead of / Mar 8, 2023
Update pretty relative index links to rewrite to `./` instead of `/` so they are indeed relative
@caendesilva caendesilva marked this pull request as ready for review March 8, 2023 11:31
@codecov
Copy link

codecov bot commented Mar 8, 2023

Codecov Report

Merging #1238 (d5f89a2) into master (03d3235) will not change coverage.
The diff coverage is 100.00%.

@@              Coverage Diff              @@
##              master     #1238     +/-   ##
=============================================
  Coverage     100.00%   100.00%             
- Complexity      1315      2634   +1319     
=============================================
  Files            152       304    +152     
  Lines           3457      6918   +3461     
=============================================
+ Hits            3457      6918   +3461     
Impacted Files Coverage Δ
...ges/framework/src/Foundation/Kernel/Hyperlinks.php 100.00% <100.00%> (ø)
...amework/Actions/PostBuildTasks/GenerateRssFeed.php 100.00% <0.00%> (ø)
...framework/src/Console/Commands/MakePostCommand.php 100.00% <0.00%> (ø)
...ackages/framework/src/Foundation/Facades/Pages.php 100.00% <0.00%> (ø)
.../packages/framework/src/Foundation/PharSupport.php 100.00% <0.00%> (ø)
...rk/src/Framework/Factories/Concerns/HasFactory.php 100.00% <0.00%> (ø)
...src/Framework/Exceptions/FileNotFoundException.php 100.00% <0.00%> (ø)
...c/Framework/Actions/CreatesNewMarkdownPostFile.php 100.00% <0.00%> (ø)
...work/src/Console/Commands/VendorPublishCommand.php 100.00% <0.00%> (ø)
...ework/src/Console/Commands/BuildSitemapCommand.php 100.00% <0.00%> (ø)
... and 143 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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

Successfully merging this pull request may close these issues.

1 participant