mirror of
https://github.com/gohugoio/hugo.git
synced 2024-07-05 08:42:12 +00:00
docs: Add guideline for showcase additions
This commit is contained in:
parent
4a15051e4c
commit
cfbae7cea2
|
@ -2,7 +2,7 @@
|
||||||
aliases:
|
aliases:
|
||||||
- /doc/contributing/
|
- /doc/contributing/
|
||||||
- /meta/contributing/
|
- /meta/contributing/
|
||||||
lastmod: 2015-05-25
|
lastmod: 2015-02-12
|
||||||
date: 2013-07-01
|
date: 2013-07-01
|
||||||
menu:
|
menu:
|
||||||
main:
|
main:
|
||||||
|
@ -66,3 +66,55 @@ of the following paths:
|
||||||
go build -o hugo main.go
|
go build -o hugo main.go
|
||||||
mv hugo /usr/local/bin/
|
mv hugo /usr/local/bin/
|
||||||
|
|
||||||
|
|
||||||
|
# Showcase additions
|
||||||
|
|
||||||
|
You got your new website running and it's powered by Hugo? Great. You can add your website with a few steps to the [showcase](/showcase/).
|
||||||
|
|
||||||
|
First, make sure that you created a [fork](https://help.github.com/articles/fork-a-repo/) of Hugo on Github and cloned your fork on your local computer. Next, create a seperate branch for your additions:
|
||||||
|
|
||||||
|
```
|
||||||
|
# You can choose a different descriptive branch name if you like
|
||||||
|
git checkout -b showcase-addition
|
||||||
|
```
|
||||||
|
|
||||||
|
Let's create a new document that contains some metadata of your homepage. Replace `example` in the following examples with something unique like the name of your website. Inside the terminal enter the following commands:
|
||||||
|
|
||||||
|
```
|
||||||
|
cd docs
|
||||||
|
hugo new showcase/example.md
|
||||||
|
```
|
||||||
|
|
||||||
|
You should find the new file at `content/showcase/example.md`. Open it in an editor. The file should contain a frontmatter with predefined variables like below:
|
||||||
|
|
||||||
|
```
|
||||||
|
---
|
||||||
|
date: 2016-02-12T21:01:18+01:00
|
||||||
|
description: ""
|
||||||
|
license: ""
|
||||||
|
licenseLink: ""
|
||||||
|
sitelink: http://spf13.com/
|
||||||
|
sourceLink: https://github.com/spf13/spf13.com
|
||||||
|
tags:
|
||||||
|
- personal
|
||||||
|
- blog
|
||||||
|
thumbnail: /img/spf13-tn.jpg
|
||||||
|
title: example
|
||||||
|
---
|
||||||
|
```
|
||||||
|
|
||||||
|
Add at least values for `sitelink`, `title`, `description` and a path for `thumbnail`.
|
||||||
|
|
||||||
|
Furthermore, we need to create the thumbnail of your website. **It's important that the thumbnail has the required dimensions of 600px by 400px.** Give your thumbnail a name like `example-tn.png` or `example-tn.jpg`. Save it under `docs/static/img/`.
|
||||||
|
|
||||||
|
Check a last time that everything works as expected. Start Hugo's built-in server in order to inspect your local copy of the showcase in the browser:
|
||||||
|
|
||||||
|
hugo server
|
||||||
|
|
||||||
|
If everything looks fine, we are ready to commit your additions. For the sake of best practices, please make sure that your commit follows our [code contribution guideline](https://github.com/spf13/hugo#code-contribution-guideline).
|
||||||
|
|
||||||
|
git commit -m"Add example.com to the showcase"
|
||||||
|
|
||||||
|
Last but not least, we're ready to create a [pull request](https://github.com/spf13/hugo/compare).
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,17 @@
|
||||||
{{ partial "header.html" . }}
|
{{ partial "header.html" . }}
|
||||||
|
|
||||||
<h1 id="title">Hugo-built Sites (with source)</h1>
|
<h1 id="title">Hugo-built Sites (with source)</h1>
|
||||||
<div class="row">
|
|
||||||
{{ range .Data.Pages.ByDate }}
|
<div class="row">
|
||||||
{{ .Render "thumbnail"}}
|
{{ range .Data.Pages.ByDate }}
|
||||||
{{ end }}
|
{{ .Render "thumbnail"}}
|
||||||
</div>
|
{{ end }}
|
||||||
<br><br>
|
</div>
|
||||||
If you want to be added to this page, please send a <a href="https://github.com/spf13/hugo/pulls">pull request</a>.
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<blockquote>
|
||||||
|
If you want to be added to this page, please send a <a href="https://github.com/spf13/hugo/pulls">pull request</a>. Check out the <a href="{{ relref . "community/contributing.md#showcase-additions" }}">how-to guide</a>.
|
||||||
|
</blockquote>
|
||||||
|
|
||||||
{{ partial "footer.html" . }}
|
{{ partial "footer.html" . }}
|
||||||
|
|
Loading…
Reference in a new issue