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

Option to exclude page from search results #95

Closed
edruid opened this issue Apr 20, 2021 · 4 comments · Fixed by #97
Closed

Option to exclude page from search results #95

edruid opened this issue Apr 20, 2021 · 4 comments · Fixed by #97
Labels
enhancement New feature or request

Comments

@edruid
Copy link
Contributor

edruid commented Apr 20, 2021

Background:
In my setup parts of the page is set up behind authentication while the search isn't. The search itself then becomes a security issue as the search-data file contains most of the information of those secured pages if they are included in the search.

Proposed solution:
Add the ability to add a page variable (geekdocSkipSearch: true?) marking the page as being ignored by search.
Change line 2 in themes/geekdoc/assets/search-data.json to

{{ range $index, $page := (where .Site.Pages "Params.geekdocSkipSearch" "!=" true) }}
@xoxys
Copy link
Member

xoxys commented Apr 20, 2021

I've changed the new parameter to a more generic one as there might be more data files to handle like atom/rss feeds in the future where it might be required to exclude those pages.

@xoxys
Copy link
Member

xoxys commented Apr 20, 2021

@edruid What do you think? Does it make any sense for you?

@xoxys xoxys closed this as completed in #97 Apr 22, 2021
@edruid
Copy link
Contributor Author

edruid commented Apr 22, 2021

That will work fine, thanks! Sorry for not responding earlier (email notification was lost in too many unread emails)

@xoxys
Copy link
Member

xoxys commented Apr 22, 2021

No worries. Thanks for your feedback.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants