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

Fix get_url resolving asset path to invalid url on Windows #1632

Merged
merged 2 commits into from
Oct 5, 2021

Conversation

scria1000
Copy link
Contributor

@scria1000 scria1000 commented Oct 3, 2021

Hi, I'm a beginner in Rust. I followed this example on the documentation page. However, there is an issue on Windows where get_url resolves colocated asset paths (page\section\asset.jpg) to something like this 'http://localhost/page\section\asset.jpg'. This is my attempt at a fix/workaround.

Sanity check:

  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

Code changes

(Delete or ignore this section for documentation changes)

  • Are you doing the PR on the next branch?

If the change is a new feature or adding to/changing an existing one:

  • Have you created/updated the relevant documentation page(s)?

@scria1000 scria1000 marked this pull request as ready for review October 3, 2021 20:20
@@ -456,6 +463,28 @@ title = "A title"
);
}

#[test]
#[cfg(target_os = "windows")]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this needs to be only for Windows?

@scria1000 scria1000 requested a review from Keats October 5, 2021 06:13
@Keats Keats merged commit 7fa58ef into getzola:next Oct 5, 2021
@Keats
Copy link
Collaborator

Keats commented Oct 5, 2021

Thanks!

thomasantony pushed a commit to thomasantony/zola that referenced this pull request Sep 17, 2022
)

* Fix get_url resolving asset path to invalid url on Windows

* Make unit test available for all targets
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.

2 participants