Empty static page from theme

How can I create a static page that is adressable?

Specifically, I want to create a /search URL that loads an empty page (but uses the same layout as all other pages), into which I will inject some JavaScript to display a dynamic search component.

Obivously, there is not actual /content to be displayed. But putting that page into /static will strip me of the possibility to use the same baseof template as all other templates.

How might I achieve this?

A page with a layout needs a content file (Markdown, HTML or similar). Create /content/search.md with some minimal front matter (title). I have no idea how your layouts look like, but the above should get you “something”. You may want to create a specific template for the search page …

1 Like