The theme is custom made with snippets taken from the [hugo capser theme](https://github.com/vjeantet/hugo-theme-casper).
SCSS is used for the styling. Install NPM dependencies via `npm install` or `yarn` then you can use `npm run build` to build the css and site once or `npm run dev` to watch for changes.
+
+
+### Search
+
+Search is handled via [Meilisearch](https://www.meilisearch.com/). A nightly scrape runs to index the site pages for search.
+This is all docker-based, and the configuration used can be found in the `search/` directory of this repo.
\ No newline at end of file
--- /dev/null
+{
+ "index_uid": "docs",
+ "start_urls": [
+ {
+ "url": "https://www.bookstackapp.com/docs/",
+ "page_rank": 5,
+ "selectors_key": "docs"
+ },
+ {
+ "url": "https://www.bookstackapp.com/blog/",
+ "page_rank": 1,
+ "selectors_key": "blog"
+ },
+ "https://www.bookstackapp.com/"
+ ],
+ "sitemap_urls": [
+ "https://www.bookstackapp.com/sitemap.xml"
+ ],
+ "stop_urls": [
+ "https://www.bookstackapp.com/categories/",
+ "https://www.bookstackapp.com/tags/",
+ "https://www.bookstackapp.com/blog/page/"
+ ],
+ "selectors": {
+ "default": {
+ "lvl0": {
+ "selector": ".homepage h1",
+ "global": true,
+ "default_value": "Website"
+ },
+ "lvl1": {
+ "selector": ".homepage h1",
+ "global": true,
+ "default_value": "Homepage"
+ },
+ "lvl2": ".homepage h2",
+ "lvl3": ".homepage h3",
+ "lvl4": ".homepage h4",
+ "text": ".homepage p"
+ },
+ "docs": {
+ "lvl0": {
+ "selector": ".docs-section-title",
+ "global": true,
+ "default_value": "Documentation"
+ },
+ "lvl1": {
+ "selector": "main h1",
+ "global": true,
+ "default_value": "Topic"
+ },
+ "lvl2": "main h2",
+ "lvl3": "main h3",
+ "lvl4": "main h4",
+ "text": "main > *"
+ },
+ "blog": {
+ "lvl0": {
+ "selector": "a[href=\"/blog\"]",
+ "global": true,
+ "default_value": "Blogpost"
+ },
+ "lvl1": {
+ "selector": "main h1",
+ "global": true,
+ "default_value": "Topic"
+ },
+ "lvl2": "main h2",
+ "lvl3": "main h3",
+ "lvl4": "main h4",
+ "text": "main > *"
+ }
+ },
+ "selectors_exclude": [
+ ".footer-content",
+ ".edit-link",
+ ".icon"
+ ]
+}
\ No newline at end of file
--- /dev/null
+#!/bin/bash
+
+# This is a script that's typically ran via cront to start a scraping operation
+# so the search index is updated.
+# Cron example:
+# 2 3 * * * /var/www/meilisearch/scrape.sh >> /dev/null 2>&1
+
+docker run -t --rm \
+ --network=host \
+ -e MEILISEARCH_HOST_URL='http://localhost:7700' \
+ -e MEILISEARCH_API_KEY='def456' \
+ -v /var/www/meilisearch/config.json:/docs-scraper/config.json \
+ getmeili/docs-scraper:latest pipenv run ./docs_scraper config.json
\ No newline at end of file