Skip to content

Laika Config #375

Description

@valencik

After chatting with @armanbilge about a PR to selectively exclude pages in indexing in the Typelevel site, we figured we should instead reuse Laika's HOCON configuration system instead of introducing a new one.

Desired behaviour

We introduce a namespaced ("protosearch") boolean configuration value, exclude, that defaults to false.
So the default behaviour is to index all documents in the Laika scope.

  1. A user can exclude a page from indexing by adding an entry to that page's HOCON config header.
{%
  protosearch.exclude = true
%}

Document markup here...
  1. A user can exclude a directory from indexing by adding an entry to the directory.conf

directory.conf

protosearch.exclude = true

Notes

There is some related work in #347 for actually indexing HOCON values.

With this change you should probably still be able to programmatically exclude documents by interacting with the Config on the Document directly as per https://typelevel.org/Laika/latest/07-reference/02-substitution-variables.html#programmatic-access

It's not yet totally clear to me how much of #371 should be undone.

Metadata

Metadata

Assignees

Labels

laikaLaika integration

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions