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

feat: add required javascript for pagefind in desktop help pages #1057

Merged
merged 2 commits into from
Feb 24, 2025

Conversation

nicodh
Copy link
Member

@nicodh nicodh commented Feb 21, 2025

Adds javascript needed for deltachat/deltachat-desktop#4691

Copy link

Check out the page preview at https://staging.delta.chat/1057/en/

@r10s
Copy link
Member

r10s commented Feb 21, 2025

as this script is used also for iOS and android, which already have a search, we should add the <script> tags only conditionally (similar to --add-top-links)

<title> and <span> anchor can be added unconditionally - but is <title> needed? it is not localised and seems not to be displayed at all on desktop

@nicodh
Copy link
Member Author

nicodh commented Feb 21, 2025

as this script is used also for iOS and android, which already have a search, we should add the <script> tags only conditionally (similar to --add-top-links)

ah ok, didin't know that - of course I will add a condition for that

<title> and <span> anchor can be added unconditionally - but is <title> needed? it is not localised and seems not to be displayed at all on desktop

title can be removed since it's dynamically set (and localized) with Javascript onload

- use argparse for handling passed arguments
@nicodh nicodh changed the title feat: add required html for pagefind in desktop help pages feat: add required javascript for pagefind in desktop help pages Feb 22, 2025
@nicodh nicodh requested a review from r10s February 22, 2025 07:33
@nicodh
Copy link
Member Author

nicodh commented Feb 24, 2025

I added the requested changes and refactored the script a bit

Copy link
Member

@r10s r10s left a comment

Choose a reason for hiding this comment

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

lgtm, did not test

@nicodh nicodh merged commit 46aca50 into main Feb 24, 2025
3 checks passed
@nicodh nicodh deleted the add-pagefind-search branch February 24, 2025 21:44
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.

3 participants