Skip to content

Commit

Permalink
integrate typesense
Browse files Browse the repository at this point in the history
  • Loading branch information
mkriegeskorte committed Feb 8, 2023
1 parent 2d7661c commit 15e2685
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/docsearch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Automate, customize, and execute your software development workflows right in your repository with GitHub Actions.
# Documentation: https://docs.github.com/en/actions

name: docsearch

on:
workflow_dispatch:
repository_dispatch:
types:
- docsearch

jobs:

docsearch:
steps:
- name: Run DocSearch Scraper
shell: bash
run: |
docker run \
-e TYPESENSE_API_KEY=${{ secrets.TYPESENSE_API_KEY }} \
-e TYPESENSE_HOST="${{ secrets.TYPESENSE_HOST }}" \
-e TYPESENSE_PORT="${{ secrets.TYPESENSE_PORT }}" \
-e TYPESENSE_PROTOCOL="${{ secrets.TYPESENSE_PROTOCOL }}" \
-e CONFIG="$(cat docsearch.config.json | jq -r tostring)" \
typesense/docsearch-scraper
40 changes: 40 additions & 0 deletions docsearch.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"index_name": "tiptap",
"start_urls": [
"https://tiptap.dev"
],
"sitemap_alternate_links": true,
"stop_urls": [
"https://tiptap.dev/hocuspocus"
],
"selectors": {
"default": {
"lvl0": {
"selector": "",
"global": true,
"default_value": "Documentation"
},
"lvl1": "main h1",
"lvl2": "main h2",
"lvl3": "main h3",
"lvl4": "main h4",
"lvl5": "main h5",
"lvl6": "main h6",
"text": "main p, main li, main pre, main td"
}
},
"strip_chars": " .,;:#",
"custom_settings": {
"separatorsToIndex": "_",
"attributesForFaceting": [
"type",
"lang"
],
"attributesToRetrieve": [
"hierarchy",
"text",
"anchor",
"url"
]
}
}

0 comments on commit 15e2685

Please sign in to comment.