This repository has been archived by the owner on Feb 2, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add yarn.lock file for npm dependencies Signed-off-by: lucperkins <[email protected]> * Add baseline templates for blog landing page and individual posts Signed-off-by: lucperkins <[email protected]> * Remove date from blog landing page Signed-off-by: lucperkins <[email protected]> * Place container inside hero-body in blog hero partial Signed-off-by: lucperkins <[email protected]> * Add blog post title block Signed-off-by: lucperkins <[email protected]> * Add black background to main blog page Signed-off-by: lucperkins <[email protected]> * Add README instructions for blog and for running locally Signed-off-by: lucperkins <[email protected]> * Hide blog until first post is added Signed-off-by: lucperkins <[email protected]>
- Loading branch information
1 parent
f6294aa
commit c0d4220
Showing
16 changed files
with
145 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,16 @@ | ||
# website | ||
# The TiKV website | ||
|
||
This repo houses the assets used to build the [TiKV](../tikv) website available at https://tikv.org. | ||
|
||
## Publishing | ||
|
||
The site is published automatically by [Netlify](https://netlify.com) whenever changes are pushed to the `master` branch. You do not need to manually publish or manage the site deployment. | ||
|
||
## Running the site locally | ||
|
||
To run the site locally, you'll need to install [Yarn](https://yarnpkg.com) and [Hugo](https://gohugo.io) (in particular the [extended](https://gohugo.io/getting-started/installing/) version). | ||
|
||
|
||
## Adding blog posts | ||
|
||
To add a new blog post, add a Markdown file to the `content/blog` folder. There's currently a `first-post.md` file in that directory that can serve as a template. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
title: The TiKV blog | ||
--- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
title: First post | ||
date: 2018-12-01 | ||
author: John Doe | ||
draft: true | ||
--- | ||
|
||
Here is some blog post content that's included in the post summary. | ||
|
||
<!--more--> | ||
|
||
Here is some content not included in the summary. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,31 @@ | ||
{{- $date := dateFormat "Monday, Jan 2, 2006" .Date }} | ||
{{- $date := dateFormat "January 2, 2006" .Date }} | ||
{{- $hasAuthor := .Params.author }} | ||
<a href="{{ .URL }}"> | ||
<div class="card"> | ||
<div class="card-content"> | ||
<div class="media"> | ||
<div class="media-content"> | ||
<nav class="level"> | ||
<div class="level-left"> | ||
<div class="level-item"> | ||
<span class="is-size-3 is-size-4-mobile"> | ||
{{ .Title }} | ||
</span> | ||
</div> | ||
</div> | ||
{{- with .Params.author }} | ||
<div class="level-right"> | ||
<div class="level-item"> | ||
<span class="is-size-4 is-size-5-mobile"> | ||
{{ . }} | ||
</span> | ||
</div> | ||
</div> | ||
{{- end }} | ||
</nav> | ||
<p class="title is-size-1 has-text-weight-light{{ if $hasAuthor }} is-spaced{{ end }}"> | ||
{{ .Title }} | ||
</p> | ||
|
||
<p class="subtitle is-6 has-text-weight-light"> | ||
{{ $date }} | ||
</p> | ||
</div> | ||
</div> | ||
{{- with .Params.author }} | ||
<p class="subtitle is-size-3"> | ||
{{ . }} | ||
</p> | ||
{{- end }} | ||
|
||
<p class="is-size-4"> | ||
{{ $date }} | ||
</p> | ||
|
||
{{- with .Summary }} | ||
<hr class="has-background-primary" /> | ||
|
||
<hr class="hr"> | ||
|
||
<div class="content"> | ||
{{- with .Summary }} | ||
{{ . | markdownify }} | ||
{{- end }} | ||
<div class="content is-medium"> | ||
{{ . }} | ||
</div> | ||
{{- end }} | ||
</div> | ||
</div> | ||
</a> | ||
<br /> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{{- $date := dateFormat "January 2, 2006" .Date }} | ||
<a class="navbar-item" href="{{ .URL }}"> | ||
{{ .Title }} | ||
</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{{ define "title" }} | ||
TiKV | Blog | ||
{{ end }} | ||
|
||
{{ define "main" }} | ||
{{- partial "blog/hero.html" . }} | ||
{{- partial "blog/post-list.html" . }} | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{{ define "title" }} | ||
The TiKV blog | {{ .Title }} | ||
{{ end }} | ||
|
||
{{ define "main" }} | ||
{{ partial "blog/hero.html" . }} | ||
{{ partial "blog/post.html" . }} | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{{- $author := .Params.author }} | ||
{{- $date := dateFormat "January 2, 2006" .Date }} | ||
<section class="hero is-black"> | ||
<div class="hero-body"> | ||
<div class="container"> | ||
<h1 class="title is-size-1 has-text-weight-light{{ if $author }} is-spaced{{ end }}"> | ||
{{ .Title }} | ||
</h1> | ||
{{- with $author }} | ||
<p class="subtitle is-size-3"> | ||
{{ . }} | ||
</p> | ||
{{- end }} | ||
{{- if ne .URL "/blog/" }} | ||
<p class="is-size-5"> | ||
{{ $date }} | ||
</p> | ||
{{- end }} | ||
</div> | ||
</div> | ||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{{- $posts := where .Site.RegularPages "Section" "blog" }} | ||
<section class="section is-black"> | ||
<div class="container"> | ||
<div class="columns"> | ||
<div class="column"> | ||
{{- range $posts }} | ||
{{ .Render "blog/card" }} | ||
{{- end }} | ||
</div> | ||
</div> | ||
</div> | ||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<section class="section"> | ||
<div class="container"> | ||
<div class="content is-medium"> | ||
{{ .Content }} | ||
</div> | ||
</div> | ||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
resources/_gen/assets/sass/sass/style.sass_6af550c30182af2cbd2f775fdbb9d3bc.content
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
resources/_gen/assets/sass/sass/style.sass_6af550c30182af2cbd2f775fdbb9d3bc.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"Target":"css/style.da592468b3215fe4030c7d9dac0dcd5ac581dfaf751f8bf7a296c253d440c885.css","MediaType":"text/css","Data":{"Integrity":"sha256-2lkkaLMhX+QDDH2drA3NWsWB3691H4v3opbCU9RAyIU="}} | ||
{"Target":"css/style.0dde752f2438cce617f3ac10f30e11004150ed877465896b15635535fd15480f.css","MediaType":"text/css","Data":{"Integrity":"sha256-Dd51LyQ4zOYX86wQ8w4RAEFQ7Yd0ZYlrFWNVNf0VSA8="}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters