Skip to content

Commit

Permalink
feat: add the landing page layout
Browse files Browse the repository at this point in the history
  • Loading branch information
razonyang committed Sep 15, 2022
1 parent b4e4c08 commit 12d70b6
Show file tree
Hide file tree
Showing 5 changed files with 208 additions and 0 deletions.
66 changes: 66 additions & 0 deletions exampleSite/content/docs/layouts/landing/index.md
@@ -0,0 +1,66 @@
+++
# type = "docs"
title = "Landing Page Layout"
linkTitle = "Landing Page"
date = 2022-09-15T10:46:23+08:00
# description = "" # Used by description meta tag, summary will be used instead if not set or empty.
featured = false
draft = false
comment = true
toc = true
reward = true
pinned = false
carousel = false
categories = []
tags = ["Landing Page"]
series = ["Docs"]
images = []
authors = ["RazonYang"]
+++

In this article, we'll talk about the landing page layout, you may be interested in it if you're going to customizing the pages in Markdown way.

<!--more-->

## What is it?

The landing page layout is just a skeleton container, the body is consists by three parts: top app bar, page content and footer.

### Advantages

- Writing content in Markdown.
- Reusable shortcodes.

## How to use it?

It's quite simple to use it, just specify the `type` as `landing` and `sidebar` as `false` in the page front matter, the rest is all about your content.

```
+++
type = "landing"
sidebar = false
+++
```

Let's take home page as an example, create the `content/_index.md` with the following content.

{{% alert "warning" %}}
The home page MUST be `content/_index.md`, not `content/index.md`.
{{% /alert %}}

```
---
title: Home
type: landing
---
{{</* text/align-center */>}}
<h1>Hello world.</h1>
{{</* /text/align-center */>}}
<br>
{{</* text/align-center >}}
<h2>The subtitle landing page example.</h2>
{{</* /text/align-center */>}}
```
65 changes: 65 additions & 0 deletions exampleSite/content/docs/layouts/landing/index.zh-hans.md
@@ -0,0 +1,65 @@
+++
# type = "docs"
title = "落地页布局"
linkTitle = "落地页"
date = 2022-09-15T10:46:23+08:00
# description = "" # Used by description meta tag, summary will be used instead if not set or empty.
featured = false
draft = false
comment = true
toc = true
reward = true
pinned = false
carousel = false
categories = ["布局"]
tags = ["落地页"]
series = ["文档"]
images = []
authors = ["RazonYang"]
+++

In this article, we'll talk about the landing page layout, you may be interested in it if you're going to customizing the pages in Markdown way.

<!--more-->

## What is it?

The landing page layout is just a skeleton container, the body is consists by three parts: top app bar, page content and footer.

### Advantages

- Writing content in Markdown.
- Reusable shortcodes.

## How to use it?

It's quite simple to use it, just specify the `type` as `landing` in the page front matter, the rest is all about your content.

```
+++
type = "landing"
+++
```

Let's take home page as an example, create the `content/_index.md` with the following content.

{{% alert "warning" %}}
The home page MUST be `content/_index.md`, not `content/index.md`.
{{% /alert %}}

```
---
title: Home
type: landing
---
{{</* text/align-center */>}}
<h1>Hello world.</h1>
{{</* /text/align-center */>}}
<br>
{{</* text/align-center >}}
<h2>The subtitle landing page example.</h2>
{{</* /text/align-center */>}}
```
65 changes: 65 additions & 0 deletions exampleSite/content/docs/layouts/landing/index.zh-hant.md
@@ -0,0 +1,65 @@
+++
# type = "docs"
title = "落地頁佈局"
linkTitle = "落地頁"
date = 2022-09-15T10:46:23+08:00
# description = "" # Used by description meta tag, summary will be used instead if not set or empty.
featured = false
draft = false
comment = true
toc = true
reward = true
pinned = false
carousel = false
categories = ["佈局"]
tags = ["落地頁"]
series = ["文檔"]
images = []
authors = ["RazonYang"]
+++

In this article, we'll talk about the landing page layout, you may be interested in it if you're going to customizing the pages in Markdown way.

<!--more-->

## What is it?

The landing page layout is just a skeleton container, the body is consists by three parts: top app bar, page content and footer.

### Advantages

- Writing content in Markdown.
- Reusable shortcodes.

## How to use it?

It's quite simple to use it, just specify the `type` as `landing` in the page front matter, the rest is all about your content.

```
+++
type = "landing"
+++
```

Let's take home page as an example, create the `content/_index.md` with the following content.

{{% alert "warning" %}}
The home page MUST be `content/_index.md`, not `content/index.md`.
{{% /alert %}}

```
---
title: Home
type: landing
---
{{</* text/align-center */>}}
<h1>Hello world.</h1>
{{</* /text/align-center */>}}
<br>
{{</* text/align-center >}}
<h2>The subtitle landing page example.</h2>
{{</* /text/align-center */>}}
```
6 changes: 6 additions & 0 deletions layouts/landing/list.html
@@ -0,0 +1,6 @@
{{ define "content" }}
<div class="{{ if default true .Params.sidebar }}col-lg-8{{ else }}col-lg-12{{ end }}">
{{ .Content }}
</div>
{{- partial "sidebar" . }}
{{ end }}
6 changes: 6 additions & 0 deletions layouts/landing/single.html
@@ -0,0 +1,6 @@
{{ define "content" }}
<div class="{{ if default true .Params.sidebar }}col-lg-8{{ else }}col-lg-12{{ end }}">
{{ .Content }}
</div>
{{- partial "sidebar" . }}
{{ end }}

0 comments on commit 12d70b6

Please sign in to comment.