Skip to content

Read me

Git Pull

pull the changes from the main branch

git pull

Check Git Status

git status

Add git changes to local repo

git add .

commit your local repo

git commit -m "Your changes"

push your changes to main repo

git push origin main

Start the dev server

command to start the dev docs server

npm run docs:dev

Documentation

Documentation.


Fix git filename case on whole repo:

Fix git filename case on whole repo: (replace . with (sub-)folder name for just part of the repo)

git rm -r --cached .
git add --all .

git status ##Review that **only** changes staged are renames

Commit your changes after reviewing:

git commit -a -m "Fixing file name casing"
git push origin main

Typesense Docsearch Scraper

Documentation

https://typesense.org/docs/guide/docsearch.html#run-the-scraper

typesense.env

TYPESENSE_API_KEY=xxx
TYPESENSE_HOST=typesense.alratv.studio
TYPESENSE_PORT=443
TYPESENSE_PROTOCOL=https3

config.json

{
  "index_name": "trog",
  "use_index_suffix": false,
  "start_urls": ["https://trog-app-bszal.ondigitalocean.app"],
  "sitemap_urls": ["https://trog-app-bszal.ondigitalocean.app/sitemap.xml"],
  "selectors": {
    "lvl0": {
      "selector": "section.has-active div h2",
      "global": true,
      "default_value": "Documentation"
    },
    "lvl1": ".content h1",
    "lvl2": ".content h2",
    "lvl3": ".content h3",
    "lvl4": ".content h4",
    "lvl5": ".content h5",
    "text": ".content p, .content li"
  },
  "scrape_start_urls": false,
  "strip_chars": " .,;:#"
}

Goto the directory with config.json and typesense.env file and run the following to index the book again

docker run -it --env-file=typesense.env -e "CONFIG=$(cat config.json | jq -r tostring)" typesense/docsearch-scraper:latest