Skip to content

Conversation

@adamwojs
Copy link
Member

@adamwojs adamwojs commented Oct 10, 2023

Question Answer
JIRA Ticket N/A
Versions All
Edition All

Fixed missing search icon on subpages:

image

Checklist

  • Text renders correctly
  • Text has been checked with vale
  • Description metadata is up to date
  • Redirects cover removed/moved pages
  • Code samples are working
  • PHP code samples have been fixed with PHP CS fixer
  • Added link to this PR in relevant JIRA ticket or code PR

@julitafalcondusza
Copy link
Contributor

Still doesn't work:
image

Copy link
Contributor

@julitafalcondusza julitafalcondusza left a comment

Choose a reason for hiding this comment

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

Search icon still not visible.

Copy link
Contributor

@adriendupuis adriendupuis left a comment

Choose a reason for hiding this comment

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

/images/icons.svg works thanks to a 302 redirect https://doc.ibexa.co/images/icons.svghttps://doc.ibexa.co/en/master/images/icons.svg (tested with curl -IL "https://doc.ibexa.co/images/icons.svg")

Notice: It doesn't work on the PR preview build where it ends with a 404 because of the way those builds are made without a proper master version. But it should work in production.

@adriendupuis
Copy link
Contributor

adriendupuis commented Oct 10, 2023

A more proper solution, from https://www.mkdocs.org/user-guide/customizing-your-theme/, would be to move copy the icons.svg to the theme directory (theme/images/icons.svg) and use <svg><use xlink:href="{{ base_url }}/images/icons.svg#search" /></svg>.

Edit: I do not like duplicats. The probleme is that this file is used from both theme and content…
Re-Edit: {{ base_url }} alone is the solution without moving or copying the file.

@MagdalenaZuba
Copy link
Contributor

I can confirm that with this approach, the icon is visible on all pages.

Copy link
Contributor

@adriendupuis adriendupuis left a comment

Choose a reason for hiding this comment

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

It now also works on PR build thanks to {{ base_url }} outputing relative paths.
For example, https://ez-systems-developer-documentation--2160.com.readthedocs.build/en/2160/getting_started/getting_started/ got <use xlink:href="../../images/icons.svg#search"></use>.

@adriendupuis adriendupuis merged commit 2e475a4 into master Oct 10, 2023
@adriendupuis adriendupuis deleted the fixed_search_icon branch October 10, 2023 08:31
adriendupuis added a commit that referenced this pull request Oct 10, 2023
Use {{ base_url }} for propoer path on subpages.

---------

Co-authored-by: Adam Wójs <211967+adamwojs@users.noreply.github.com>
Co-authored-by: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com>
(cherry picked from commit 2e475a4)
adriendupuis added a commit that referenced this pull request Oct 10, 2023
Use {{ base_url }} for propoer path on subpages.

---------

Co-authored-by: Adam Wójs <211967+adamwojs@users.noreply.github.com>
Co-authored-by: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com>
(cherry picked from commit 2e475a4)
adriendupuis added a commit that referenced this pull request Oct 10, 2023
Use {{ base_url }} for propoer path on subpages.

---------

Co-authored-by: Adam Wójs <211967+adamwojs@users.noreply.github.com>
Co-authored-by: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com>
(cherry picked from commit 2e475a4)
adriendupuis added a commit to ibexa/documentation-user that referenced this pull request Oct 20, 2023
adriendupuis added a commit to ibexa/documentation-user that referenced this pull request Oct 20, 2023
adriendupuis added a commit to ibexa/documentation-user that referenced this pull request Oct 20, 2023
adriendupuis added a commit to ibexa/documentation-user that referenced this pull request Oct 20, 2023
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.

4 participants