Comments (6)
Hi,
I think you need to apply as an open source project first at https://docsearch.algolia.com/
Regarding integration in docsforge, I did some testing and the following method worked for me.
I followed the guideline at https://docsearch.algolia.com/docs/dropdown
You can add custom JS and CSS into docsforge, by editing project settings (cog icon, https://anyfig.docsforge.com/admin/edit-project-settings/)
Add the following CSS:
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/cdn/docsearch.min.css"
/>
Add the following JS: (I tried algolia example test project)
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/cdn/docsearch.min.js"></script>
<script>
docsearch({
apiKey: '25626fae796133dc1e734c6bcaaeac3c',
indexName: 'docsearch',
inputSelector: '#search-in-project',
debug: false,
});
</script>
I have however no experience with optimizing algolia's search output (crawler + scraper), so let me know how well it works.
from docsforge.
I can see at https://anyfig.docsforge.com/ that the old search is still visible. I'll have an option to disable it on my next release.
I do see however that algolia search results link to pages in https://anyfig.now.sh/ website. Can that be changed?
from docsforge.
Hi, thanks for helping out! I tried the method that you suggested and it seems to be working, but as you said - the links go to the old website. Algolia fixes this manually by configuring their crawler https://github.com/algolia/docsearch-configs/blob/master/configs/anyfig.json.
That configuration file should also contain options to get the search functionality working well/optimized. I'm still waiting for Algolia to get back to me. Once they do and we've made the necessary changes I'll write here again :)
I'll have an option to disable it on my next release.
Great!
from docsforge.
Fixed, you can now disable the default search in your project settings. I've added a short help section in https://help.docsforge.com/master/search-engines/ .
Tell me if their crawler behaves well, and if it doesn't, maybe I can help. Leaving issue open for now.
from docsforge.
Works great! Unfortunately, Algolia hasn't replied to my emails about reconfiguring the crawler. I'm not sure why but I want to believe that they're just overloaded. I'm not in a rush so it's ok.
I'll ping you if I run into problems with the crawler, thanks for offering :)
from docsforge.
Hello, I've managed to add the Algolia search for the docsforge website with the help from Algolia. We changed the config in their gir repo. This new config supports both the old anyfig-website as well as the new docsforge one.
It seems to be working well, I can search for text in the tutorial as well as the API. I'm quite happy with the result - just want to flag that it won't support multiple versions the way it's set up now. Algolia can crawl different versions and it's up to the user to separate the versions/tags they want to show to the user. This is described in their docs
I changed the inserted javascript on the docsforge website to include the facetFilters
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/cdn/docsearch.min.js"></script>
<script>
docsearch({
apiKey: 'real-api-key',
indexName: 'anyfig',
inputSelector: '#search-in-project',
debug: false,
algoliaOptions: {
'facetFilters': ["tags:docsforge", "version:master"]
},
});
</script>
This makes it so that I only get results for the tags:docsforge and version:master. If one needs to support search for more versions, the master version can't be hardcoded. I suppose inserting different javascript on different versions of the website would solve this but I'm OK with just one version at the moment :)
I'm closing the issue, thanks for the help
from docsforge.
Related Issues (20)
- Variables added from the README documentation HOT 2
- Macros in code are causing parser errors. HOT 6
- Public Api sidebar is not displayed correctly HOT 2
- Download configuration file isn't working HOT 2
- Allow displaying doxygen's html output. HOT 2
- Broken link in Home / Versions HOT 3
- Inconsistent punctuation in member function descriptions, and expressions like "i.e." or "e.g." HOT 3
- Missing documentation for two stream inserters
- Request: showing parameter list and return type in function descriptions HOT 5
- Thoughts about using docsforge with existing readthedocs / sphinx documentation HOT 1
- Request: adding EXTRACT_PRIV_VIRTUAL
- Related global functions shown as methods HOT 1
- Public class members other than member functions not shown
- Two enum-related problems
- "Global" language pill switching
- Suppress link generation for commonly used words
- Error generating automatic API documentation when input folder has same name as project
- ERROR!! Your sidebar section Public API has 0 pages HOT 2
- 错误,网站打不开了? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docsforge.