-
Notifications
You must be signed in to change notification settings - Fork 39
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 search #735
base: main
Are you sure you want to change the base?
Feat search #735
Conversation
✅ Deploy Preview for scientific-python-org ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
pre-commit.ci autofix |
Can you use the theme search feature? |
Sure, thank you for your help |
Hello @jarrodmillman |
You should use the css and javascript from the theme. If you need improvements, it should be done there. I also don't think you need to edit the netlify config. |
I need to add the NODE to the netlify environment to install the pagfind library. |
assets/css/search.css
Outdated
@@ -0,0 +1,26 @@ | |||
.search-button { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should already be part of the theme?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
assets/js/search.js
Outdated
@@ -0,0 +1,123 @@ | |||
// This file is attributed to the Scientific Python Developers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As should this be.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -20,7 +20,7 @@ params: | |||
author: | |||
name: Scientific Python team | |||
description: Community developed and owned ecosystem for scientific computing | |||
|
|||
search: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be enough to pull in the JS and CSS from the theme.
netlify.toml
Outdated
@@ -1,7 +1,8 @@ | |||
[build.environment] | |||
PYTHON_VERSION = "3.13" | |||
HUGO_VERSION = "0.141.0" | |||
DART_SASS_VERSION = "1.83.4" | |||
HUGO_VERSION = "0.142.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leave these alone, for another PR.
netlify.toml
Outdated
HUGO_VERSION = "0.141.0" | ||
DART_SASS_VERSION = "1.83.4" | ||
HUGO_VERSION = "0.142.0" | ||
NODE_VERSION = "20" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, please remove the node version. This is handled on the netlify site.
We are already using Node 20. |
Makefile
Outdated
@@ -55,12 +55,18 @@ content/specs/core-projects/core-projects.json: content/specs/core-projects/[^_] | |||
@python tools/md-header-to-json.py $? > $@ | |||
|
|||
html: prepare calendars core-project-json ## build the website in ./public | |||
hugo --themesDir="./themes"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should be able to just add:
hugo; $(SEARCH)
to the prepare target and remove it everywhere else. (I also removed the --themesDir
option.
Makefile
Outdated
@@ -2,7 +2,6 @@ | |||
.DEFAULT_GOAL := help | |||
SHELL:=/bin/bash | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove unrelated edit.
Hello @jarrodmillman, and @stefanv |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Bashamega!
Fix #673
I have added the search input