Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/docsearch-scraper-production.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: DocSearch Scraper

on:
push:
branches:
- release
paths:
- 'content/docs/**'

jobs:
docsearch_crawler:
name: DocSearch Crawl & Index
runs-on: ubuntu-20.04

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Get the content of docsearch.json as config
id: docsearch-config
run: echo "::set-output name=config::$(cat docsearch-prod.json | jq -r tostring)"

- name: Algolia DocSearch Action
id: algolia
uses: adapttive/algolia-docsearch-action@1.1.1
env:
APPLICATION_ID: ${{ secrets.ALGOLIA_APPLICATION_ID }}
API_KEY: ${{ secrets.ALGOLIA_ADMIN_API_KEY }}
CONFIG: ${{ steps.docsearch-config.outputs.config }}
2 changes: 1 addition & 1 deletion config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ enableGitInfo = true # N.B. .GitInfo does not currently function with submodule
[params.docsearch] # Parameters for DocSearch
appID = "O2QIOCBDAK" # Algolia Application ID
apiKey = "fdc60eee76a72a35d739b54521498b77" # Algolia Search-Only API Key
indexName = "dev_lotusdocs.dev" # Index Name to perform search on
indexName = "prod_lotusdocs.dev" # Index Name to perform search on

[menu]
# [[menu.primary]]
Expand Down
30 changes: 30 additions & 0 deletions docsearch-prod.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"index_name": "prod_lotusdocs.dev",
"sitemap_urls": [
"https://lotusdocs.dev/sitemap.xml"
],
"start_urls": [
"https://lotusdocs.dev/docs/"
],
"stop_urls": [
".*(?<!/)$"
],
"use_anchors": true,
"strip_chars": "#",
"selectors_exclude": [
"i",
".material-icons",
"#sidebar",
"#toc",
"#breadcrumbs"
],
"selectors": {
"lvl0": ".docs-content .content-title",
"lvl1": ".docs-content .lead",
"lvl2": "#content h2",
"lvl3": "#content h3",
"lvl4": "#content h4",
"lvl5": "#content h5",
"text": "#content p,#content ul,#content ol,#content .alert,#content blockquote"
}
}