Rewrite

Layout to rewrite page to another page.

Donate

Become a backer or sponsor to support our work.

Sponsors

Parameters

layout

NameContextTypeRequiredDefaultSinceExample
layout-string---

MUST be rewrite.

rewrite.path

NameContextTypeRequiredDefaultSinceExample
rewrite.path-string---

The path of page.

rewrite.template

NameContextTypeRequiredDefaultSinceExample
rewrite.template-string-single--

The render template.

Example

Let’s said there is a /docs/overview detailed page, and rewrite the homepage to that page, you’ll need to configure parameters on front matter as follows.

content/_index.md
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-markdown" data-lang="markdown"><span class="line"><span class="ln">1</span><span class="cl">---

2layout: rewrite 3rewrite: 4 path: /docs/overview 5