HOSTED SPACES

Custom Landing Page

4min

You can set up a custom HTML page to load instead of the first document - which is the default option when the docs site loads.

To change the landing page option follow the next steps:

1

Click on the Space you want to add a custom HTML landing page

2

Look for the Settings gear ( βš™οΈ ) and click on it

3

In the Space Settings window, go to the Landing Page tab

4

Select Custom HTML

5

Add your HTML code in Landing page HTML field and hit Save. Keep in mind that this is your index.html file.

Custom HTML
Custom HTML
ο»Ώ

The Custom HTML supportsΒ Handlebars and Tailwind. You can interpolate some variables in the HTML template.

Here is the object that we pass to the template; you can render any of these variables:

First level variables
Prop Interfaces
ο»Ώ

This is an example html for rendering custom html in the landing page:

HTML
ο»Ώ

For a structure like this and an uploaded logo:

Document image
ο»Ώ

You should see something like this, with the above code:

Document image
ο»Ώ

Custom functions for activating search

On a custom landing page you can build your own search input, but you'll also need a way to show the search modal β€” we've got you covered.

On the `window` object of the browser there are 2 methods you can call to control the search modal.

JS
ο»Ώ

These functions are also available for usage in your custom scripts.

πŸ€”
Have a question?
Our super-smart AI, knowledgeable support team and an awesome community will get you an answer in a flash.
To ask a question or participate in discussions, you'll need to authenticate first.

ο»Ώ