Compare commits
18 Commits
Author | SHA1 | Date |
---|---|---|
Jordan Orelli | 3bb60cc52e | 4 years ago |
Jordan Orelli | cd6897a837 | 4 years ago |
Hang Jiang | 8628c19610 | 4 years ago |
Hang Jiang | 7a1181feed | 4 years ago |
Hang Jiang | a91caa4403 | 4 years ago |
nodejh | 51c30b9997 | 4 years ago |
nodejh | 1a4e44e0fa | 4 years ago |
nodejh | e809bb8c9d | 4 years ago |
nodejh | 34d3c2dd68 | 4 years ago |
nodejh | ffea239839 | 4 years ago |
nodejh | 81a13c63f8 | 4 years ago |
nodejh | 44525d25c8 | 4 years ago |
nodejh | 82a3842d31 | 4 years ago |
nodejh | 3c0b005454 | 4 years ago |
nodejh | ad3d821844 | 4 years ago |
nodejh | 706cd8f8e9 | 4 years ago |
nodejh | ed49811eda | 4 years ago |
nodejh | 2286e5a59b | 4 years ago |
@ -1,12 +1,15 @@
|
||||
# Hugo default output directory
|
||||
/public
|
||||
|
||||
## OS Files
|
||||
# Windows
|
||||
Thumbs.db
|
||||
ehthumbs.db
|
||||
Desktop.ini
|
||||
$RECYCLE.BIN/
|
||||
|
||||
# OSX
|
||||
# MacOS
|
||||
.DS_Store
|
||||
|
||||
# exampleSite
|
||||
exampleSite/themes
|
||||
exampleSite/public
|
@ -1 +1,121 @@
|
||||
## WIP
|
||||
# Hugo Theme Mini
|
||||
|
||||
English | [简体中文](https://github.com/nodejh/hugo-theme-mini/tree/master/README-zh_CN.md)
|
||||
|
||||
A fast, minimalist and responsive hugo theme.
|
||||
|
||||
![./images/screenshot.png](https://raw.githubusercontent.com/nodejh/hugo-theme-mini/master/images/screenshot.png)
|
||||
|
||||
- [Online demo](https://nodejh.github.io/hugo-theme-mini)
|
||||
- [Example Site Source](https://github.com/nodejh/hugo-theme-mini/tree/master/exampleSite)
|
||||
|
||||
Features:
|
||||
|
||||
- Fast
|
||||
- Minimalist
|
||||
- Responsive
|
||||
- Archive
|
||||
- Tags
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
|
||||
### As a Hugo Module (recommended)
|
||||
|
||||
> ⚠️ If you installed a [Hugo binary](https://gohugo.io/getting-started/installing/#binary-cross-platform), you may not have Go installed on your machine. To check if Go is installed:
|
||||
> ```
|
||||
> $ go version
|
||||
> ```
|
||||
> Go modules were considered production ready in v1.14. [Download Go](https://golang.org/dl/).
|
||||
|
||||
1. From your project's root directory, initiate the hugo module system if you haven't already:
|
||||
|
||||
```bash
|
||||
$ hugo mod init github.com/<your_user>/<your_project>
|
||||
```
|
||||
|
||||
2. Add the theme's repo to your `config.yaml`:
|
||||
|
||||
```yaml
|
||||
theme:
|
||||
- github.com/nodejh/hugo-theme-mini
|
||||
```
|
||||
|
||||
### As Git Submodule
|
||||
|
||||
1. Inside the folder of your Hugo site run:
|
||||
|
||||
```bash
|
||||
$ git submodule add https://github.com/nodejh/hugo-theme-mini.git themes/mini
|
||||
```
|
||||
|
||||
2. Add the theme's directory to your `config.yaml`:
|
||||
|
||||
```yaml
|
||||
theme: mini
|
||||
```
|
||||
|
||||
For more information read the official [setup guide](//gohugo.io/overview/installing/) of Hugo.
|
||||
|
||||
|
||||
## Getting started
|
||||
|
||||
After installing the theme successfully it requires a just a few more steps to get your site running.
|
||||
|
||||
|
||||
### The config file
|
||||
|
||||
Take a look inside the [`exampleSite`](https://github.com/nodejh/hugo-theme-mini/tree/master/exampleSite) folder of this theme. You'll find a file called [`config.yaml`](https://github.com/nodejh/hugo-theme-mini/blob/master/exampleSite/config.yaml). To use it, copy the [`config.yaml`](https://github.com/nodejh/hugo-theme-mini/blob/master/exampleSite/config.yaml) in the root folder of your Hugo site. Feel free to change the strings in this theme.
|
||||
|
||||
> ⚠️ You may need to delete the line: `themesDir: ../../`
|
||||
|
||||
### Add Comments
|
||||
|
||||
To enable comments, add following to your config file:
|
||||
|
||||
- Disqus shortname: `disqusShortname: your-disqus-shortname`
|
||||
- Enable Comment:
|
||||
|
||||
```yaml
|
||||
params:
|
||||
enableComments: true
|
||||
```
|
||||
|
||||
### Google Analytics
|
||||
|
||||
To enable google analytics, add following to your config file:
|
||||
|
||||
- Google Analytics ID: `googleAnalytics: your-google-analytics-id`
|
||||
- Enable Google Analytics:
|
||||
|
||||
```yaml
|
||||
params:
|
||||
enableGoogleAnalytics: true
|
||||
```
|
||||
|
||||
### Logo and favicon
|
||||
|
||||
You can replace the log in the top of each page and favicon with your own images. To do that put your own logo and favicon into the `images` directory of your website static directory, then named them `avatar.png` and `favicon.ico`. For example:
|
||||
|
||||
```
|
||||
- content
|
||||
- static
|
||||
└── images
|
||||
├── avatar.png
|
||||
└── favicon.ico
|
||||
```
|
||||
|
||||
### Nearly finished
|
||||
|
||||
In order to see your site in action, run Hugo's built-in local server.
|
||||
|
||||
```bash
|
||||
$ hugo server
|
||||
```
|
||||
|
||||
Now enter http://localhost:1313 in the address bar of your browser.
|
||||
|
||||
## License
|
||||
|
||||
[MIT](https://github.com/nodejh/hugo-theme-mini/blob/master/LICENSE.md)
|
@ -1,55 +0,0 @@
|
||||
baseURL: https://gohugo.io
|
||||
languageCode: en-us
|
||||
title: Hugo Themes
|
||||
theme: mini
|
||||
googleAnalytics: your-google-analytics-id
|
||||
hasCJKLanguage: true
|
||||
permalinks:
|
||||
posts: /posts/:title/
|
||||
|
||||
disqusShortname: your-disqus-shorname
|
||||
|
||||
# Hugo Configure Markup
|
||||
# see: https://gohugo.io/getting-started/configuration-markup#highlight
|
||||
markup:
|
||||
highlight:
|
||||
guessSyntax: true
|
||||
style: emacs
|
||||
|
||||
|
||||
# Social links in footer, support github,twitter,stackoverflow,facebook
|
||||
social:
|
||||
# e.g.
|
||||
github: 'your-github-link'
|
||||
twitter: 'your-github-link'
|
||||
stackoverflow: 'your-github-link'
|
||||
# facebook: 'your-facebook-link'
|
||||
|
||||
|
||||
# Site parameters
|
||||
params:
|
||||
# Site Author
|
||||
author: Author
|
||||
# Author biography
|
||||
bio: Software Engineer
|
||||
# Site Description, used in HTML meat
|
||||
description: My Blog
|
||||
enableRSS: true
|
||||
|
||||
# Optional
|
||||
home: '' # Default: Home
|
||||
about: '' # Default: About
|
||||
archive: '' # Default: Archive
|
||||
subscribe: '' # Default: Subscribe
|
||||
olderPosts: '' # Default: Older Posts
|
||||
newerPosts: '' # Default: Newer Posts
|
||||
copyright: ''
|
||||
title404: '' # Default: 404 - Page Not Found
|
||||
subtitle404: '' # Default: The content you're looking for doesn't seem to exist.
|
||||
readMore: '' # Default: Read More
|
||||
|
||||
# Extra links in navigation
|
||||
links:
|
||||
# e.g.
|
||||
# - name: Project
|
||||
# path: /project
|
@ -1,29 +1,18 @@
|
||||
# hugoBasicExample
|
||||
# Hugo Theme Mini Example Site
|
||||
|
||||
This repository offers an example site for [Hugo](https://gohugo.io/) and also it provides the default content for demos hosted on the [Hugo Themes Showcase](https://themes.gohugo.io/).
|
||||
This repository offers an example site for [Hugo Theme mini](https://github.com/nodejh/hugo-theme-mini) and also it provides the default content for [Online Demo](http://nodejh.github.io/hugo-theme-mini).
|
||||
|
||||
# Using
|
||||
|
||||
1. [Install Hugo](https://gohugo.io/overview/installing/)
|
||||
2. Clone this repository
|
||||
|
||||
```bash
|
||||
git clone https://github.com/gohugoio/hugoBasicExample.git
|
||||
cd hugoBasicExample
|
||||
```
|
||||
```bash
|
||||
$ git clone https://github.com/nodejh/hugo-theme-mini
|
||||
$ cd exampleSite
|
||||
```
|
||||
3. Run Hugo server. The exampleSite use theme `hugo-theme-mini` by setting `themesDir` as `../../`
|
||||
|
||||
3. Clone the repository you want to test. If you want to test all Hugo Themes then follow the instructions provided [here](https://github.com/gohugoio/hugoThemes#installing-all-themes)
|
||||
|
||||
4. Run Hugo and select the theme of your choosing
|
||||
|
||||
```bash
|
||||
hugo server -t YOURTHEME
|
||||
```
|
||||
|
||||
5. Under `/content/` this repository contains the following:
|
||||
|
||||
- A section called `/post/` with sample markdown content
|
||||
- A headless bundle called `homepage` that you may want to use for single page applications. You can find instructions about headless bundles over [here](https://gohugo.io/content-management/page-bundles/#headless-bundle)
|
||||
- An `about.md` that is intended to provide the `/about/` page for a theme demo
|
||||
|
||||
6. If you intend to build a theme that does not fit in the content structure provided in this repository, then you are still more than welcome to submit it for review at the [Hugo Themes](https://github.com/gohugoio/hugoThemes/issues) respository
|
||||
```bash
|
||||
$ hugo server
|
||||
```
|
||||
|
@ -0,0 +1,36 @@
|
||||
baseURL: https://nodejh.github.io/hugo-theme-mini
|
||||
languageCode: en-us
|
||||
title: Hugo
|
||||
theme: hugo-theme-mini
|
||||
paginate: 3
|
||||
|
||||
# for exampleSite only, you may need to delete the line: `themesDir: ../../`
|
||||
themesDir: ../../
|
||||
|
||||
hasCJKLanguage: true
|
||||
permalinks:
|
||||
posts: /posts/:title/
|
||||
|
||||
googleAnalytics: UA-123-45
|
||||
disqusShortname: nodejh
|
||||
|
||||
|
||||
markup:
|
||||
highlight:
|
||||
guessSyntax: true
|
||||
style: emacs
|
||||
|
||||
|
||||
social:
|
||||
github: https://github.com/nodejh
|
||||
twitter: https://github.com/nodejh
|
||||
stackoverflow: https://stackoverflow.com/users/4518882/nodejh
|
||||
|
||||
|
||||
params:
|
||||
author: nodejh
|
||||
bio: Software Engineer
|
||||
description: My Blog
|
||||
enableRSS: true
|
||||
enableComments: true
|
||||
enableGoogleAnalytics: true
|
@ -1,3 +0,0 @@
|
||||
+++
|
||||
author = "Hugo Authors"
|
||||
+++
|
@ -1,5 +0,0 @@
|
||||
---
|
||||
date: 2019-05-28
|
||||
type: section
|
||||
layout: "archives"
|
||||
---
|
@ -1,7 +0,0 @@
|
||||
---
|
||||
title: 'Our Difference'
|
||||
button: 'About us'
|
||||
weight: 2
|
||||
---
|
||||
|
||||
Lorem ipsum dolor sit amet, et essent mediocritatem quo, choro volumus oporteat an mei. Ipsum dolor sit amet, et essent mediocritatem quo.
|
@ -1,3 +0,0 @@
|
||||
---
|
||||
headless: true
|
||||
---
|
@ -1,7 +0,0 @@
|
||||
---
|
||||
title: 'We Help Business Grow'
|
||||
button: 'Our Work'
|
||||
weight: 1
|
||||
---
|
||||
|
||||
Lorem ipsum dolor sit amet, et essent mediocritatem quo, choro volumus oporteat an mei. Numquam dolores mel eu, mea docendi omittantur et, mea ea duis erat. Elit melius cu ius. Per ex novum tantas putant, ei his nullam aliquam apeirian. Aeterno quaestio constituto sea an, no eum intellegat assueverit.
|
@ -1,6 +0,0 @@
|
||||
+++
|
||||
aliases = ["posts", "articles", "blog", "showcase", "docs"]
|
||||
title = "Posts"
|
||||
author = "Hugo Authors"
|
||||
tags = ["index"]
|
||||
+++
|
@ -0,0 +1,3 @@
|
||||
module github.com/jordanorelli/hugo-theme-mini
|
||||
|
||||
go 1.15
|
Binary file not shown.
Before Width: | Height: | Size: 5.7 MiB |
Binary file not shown.
Before Width: | Height: | Size: 5.7 MiB After Width: | Height: | Size: 80 KiB |
Binary file not shown.
Before Width: | Height: | Size: 5.7 MiB |
Binary file not shown.
Before Width: | Height: | Size: 2.1 MiB After Width: | Height: | Size: 38 KiB |
@ -1,4 +1,6 @@
|
||||
<div id="comment">
|
||||
<!-- https://gohugo.io/templates/internal/#use-the-disqus-template -->
|
||||
{{ template "_internal/disqus.html" . }}
|
||||
</div>
|
||||
{{ if .Site.Params.enableComments }}
|
||||
<div id="comment">
|
||||
<!-- https://gohugo.io/templates/internal/#use-the-disqus-template -->
|
||||
{{ template "_internal/disqus.html" . }}
|
||||
</div>
|
||||
{{ end }}
|
@ -1,17 +1,16 @@
|
||||
<nav class="navigation">
|
||||
{{ $url := replace .Permalink .Site.BaseURL "" }}
|
||||
{{ if not .IsHome }}
|
||||
<a href='{{ .Site.BaseURL }}'> <span class="arrow">←</span>{{ with .Site.Params.home }}{{ . }}{{ else }}Home{{ end }}</a>
|
||||
<a href="{{ "/" | relURL }}"> <span class="arrow">←</span>{{ with .Site.Params.home }}{{ . }}{{ else }}Home{{ end }}</a>
|
||||
{{ end }}
|
||||
<a href='{{ .Site.BaseURL }}posts'>{{ with .Site.Params.archive }}{{ . }}{{ else }}Archive{{ end }}</a>
|
||||
<a href='{{ .Site.BaseURL }}tags'>{{ with .Site.Params.tags }}{{ . }}{{ else }}Tags{{ end }}</a>
|
||||
<a href='{{ .Site.BaseURL }}about'>{{ with .Site.Params.about }}{{ . }}{{ else }}About{{ end }}</a>
|
||||
<a href="{{ "/posts" | relURL }}">{{ with .Site.Params.archive }}{{ . }}{{ else }}Archive{{ end }}</a>
|
||||
<a href="{{ "/tags" | relURL }}">{{ with .Site.Params.tags }}{{ . }}{{ else }}Tags{{ end }}</a>
|
||||
<a href="{{ "/about" | relURL }}">{{ with .Site.Params.about }}{{ . }}{{ else }}About{{ end }}</a>
|
||||
|
||||
{{ range $element := .Site.Params.Links }}
|
||||
<a href="{{ $element.path }}">{{ $element.name }}</a>
|
||||
{{ end }}
|
||||
|
||||
{{ if .Site.Params.enableRSS }}
|
||||
<a class="button" href="{{ .Site.RSSLink }}">{{ with .Site.Params.subscribe }}{{ . }}{{ else }}Subscribe{{ end }}</a>
|
||||
<a class="button" href="{{ .Site.RSSLink }}">{{ with .Site.Params.subscribe }}{{ . }}{{ else }}Subscribe{{ end }}</a>
|
||||
{{ end }}
|
||||
</nav>
|
||||
|
Loading…
Reference in New Issue