wp-search-index

Module for indexing wp sites for our search service

Usage no npm install needed!

<script type="module">
  import wpSearchIndex from 'https://cdn.skypack.dev/wp-search-index';
</script>

README

Build Status js-standard-style

wp-search-index

Module for indexing wp sites for our search service

Config

Setup your environment in an .env file

API_URL=http://localhost/wp-json/wp/v2/posts
SEARCH_SERVICE=http://localhost:3000
SEARCH_INDEX=www
SEARCH_INDEX_TYPE=article
JWT_SECRET=Louie Louie, oh no, I got to go Louie Louie, oh no, I got to go
PAPERTRAIL_HOSTNAME=wp-search-index
PAPERTRAIL_HOST=logs.papertrailapp.com
PAPERTRAIL_PORT=12345

Usage

$ npx wp-search-index .env

This will start the indexing with the enironmental variables from .env

Related

License

MIT