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

Implement documentation search #8937

Merged
merged 8 commits into from
Nov 13, 2019
Merged

Conversation

jolheiser
Copy link
Member

This uses a gist linked from the Hugo documentation for adding a search to your site.
I chose this method because it doesn't require any other build steps, just hugo.

It combines a few of the changes made by comments as well, such as forgoing jQuery so as to not add a dependency to it.

I added a few other languages based on indexes we have available. I admittedly just translated with Google, so feel free to correct them if it butchered them too badly.
I also moved the Help side-item to the top so it is more prominent.

I do not consider myself a UI or JS expert, so feel free to add corrections if you feel they are necessary.

gitea-docs-search

jolheiser and others added 4 commits November 12, 2019 15:26
Signed-off-by: jolheiser <john.olheiser@gmail.com>
Signed-off-by: jolheiser <john.olheiser@gmail.com>
@codecov-io
Copy link

codecov-io commented Nov 13, 2019

Codecov Report

Merging #8937 into master will increase coverage by 0.05%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8937      +/-   ##
==========================================
+ Coverage   41.22%   41.27%   +0.05%     
==========================================
  Files         547      546       -1     
  Lines       70764    71005     +241     
==========================================
+ Hits        29173    29308     +135     
- Misses      37870    37979     +109     
+ Partials     3721     3718       -3
Impacted Files Coverage Δ
modules/indexer/indexer.go 44.73% <0%> (-10.53%) ⬇️
modules/git/blame.go 76.05% <0%> (-2.21%) ⬇️
services/comments/comments.go 26.31% <0%> (-1.86%) ⬇️
routers/repo/wiki.go 38.88% <0%> (-1.71%) ⬇️
modules/repofiles/action.go 64.77% <0%> (-1.51%) ⬇️
modules/log/event.go 64.61% <0%> (-1.03%) ⬇️
modules/git/repo.go 44.07% <0%> (-1.03%) ⬇️
routers/repo/compare.go 50% <0%> (-0.44%) ⬇️
services/pull/commit_status.go 8.16% <0%> (-0.35%) ⬇️
services/mirror/mirror.go 18.7% <0%> (-0.24%) ⬇️
... and 34 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cda8de2...aa5cb88. Read the comment docs.

@lunny lunny added the type/docs This PR mainly updates/creates documentation label Nov 13, 2019
@jolheiser
Copy link
Member Author

I should amend my original statement, as this implementation does use two libraries, fuse.js and mark.js

Currently they are included as CDN links, since our docs are online. If you'd rather I vendor them, let me know. (would they just be vendored in docs somehow??)

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Nov 13, 2019
docs/content/doc/help.fr-fr.md Outdated Show resolved Hide resolved
docs/content/doc/help.fr-fr.md Outdated Show resolved Hide resolved
jolheiser and others added 2 commits November 13, 2019 06:57
Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Nov 13, 2019
@mrsdizzie
Copy link
Member

Currently docs page already uses CDN for font awesome so regardless I don't think that discussion needs to block this PR

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Nov 13, 2019
@zeripath zeripath merged commit 3b0303a into go-gitea:master Nov 13, 2019
@jolheiser jolheiser deleted the docs_search branch November 13, 2019 18:45
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/docs This PR mainly updates/creates documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants