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

[WIP] Autocomplete #97

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

[WIP] Autocomplete #97

wants to merge 4 commits into from

Conversation

jonenst
Copy link
Contributor

@jonenst jonenst commented Nov 13, 2019

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
feature

What is the current behavior? (You can also link to an open issue here)
No autocomplete

What is the new behavior (if this is a feature change)?
Autocomplete

Other information:
This is a POC autocomplete. If we decided to keep it, we should continue the work:

  • extract the json in a separate url (it is currently embedded in search.html)
  • setup the autocomplete in all the pages
  • cleanup a bit

demo:

autocomplete

After this patch, the following files are no longer indexed:
"/", because layout == home
"/index.md.bck", not interpreted as markdown so no title
"/docs/loadflow/loadflow.html", layout == todo
"/assets/css/custom.css", no title
"/assets/css/main.css", no title
"/assets/css/style.css", no title

Signed-off-by: Jon Harper <jon.harper87@gmail.com>
Stripping new lines would fuse words across two consecutive lines, putting garbage in the index
lunr handles newlines just fine

Signed-off-by: Jon Harper <jon.harper87@gmail.com>
Signed-off-by: Jon Harper <jon.harper87@gmail.com>
Signed-off-by: Jon Harper <jon.harper87@gmail.com>
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.

1 participant