Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
# Conflicts:
#	README.md
#	layouts/gallery/list.html
#	layouts/partials/head.html
#	package-lock.json
  • Loading branch information
mfg92 committed Mar 26, 2019
2 parents 9556457 + f11239f commit 0d6dc97
Show file tree
Hide file tree
Showing 126 changed files with 790 additions and 4,803 deletions.
1 change: 0 additions & 1 deletion .gitignore
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
node_modules/
exampleSite/public/
13 changes: 11 additions & 2 deletions .travis.yml
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
git:
depth: false

env:
- HUGO_VERSION="0.41"
- HUGO_VERSION="0.48"
- HUGO_VERSION="0.49.2"
- HUGO_VERSION="0.50"
- HUGO_VERSION="0.51"
- HUGO_VERSION="0.52"
- HUGO_VERSION="0.53"
- HUGO_VERSION="0.54.0"

install:
- wget -q https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_Linux-64bit.tar.gz
Expand All @@ -9,5 +18,5 @@ install:

script:
- cd exampleSite
- hugo --themesDir .. -t . -v
- HUGO_THEME=hugo-theme-sam hugo --themesDir ../.. -v
- htmlproofer public --check-html --disable-external
Empty file modified LICENSE
100644 → 100755
Empty file.
52 changes: 27 additions & 25 deletions README.md
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<h1><a href="https://vickylai.com/call-me-sam/" target="_blank" rel="noopener">Call me Sam: a theme for Hugo</a></h1>
<h1><a href="https://hugo-sam.netlify.com/" target="_blank" rel="noopener">Call me Sam: a theme for Hugo</a></h1>

![Main page screenshot](https://github.com/mfg92/hugo-theme-sam/blob/master/images/screenshot.png)

Expand All @@ -18,8 +18,8 @@ Focused on content and typography, the stylized index page is really just a list
- Custom footer text
- Developer-approved
- Syntax highlighting
- Share-ready metadata set via `config.toml` (OpenGraph and Twitter Cards integration)
- Easy-to-navigate Sass files included
- Share-ready pages with [Open Graph](https://gohugo.io/templates/internal/#open-graph) and [Twitter](https://gohugo.io/templates/internal/#twitter-cards) metadata you can customize in `config.toml` and page front-matter
- Effortless use of Hugo Pipes to generate CSS from Sass files

# Differences to vickylai's original version

Expand Down Expand Up @@ -98,7 +98,7 @@ $ hugo new posts/your-post-title.md

## Image gallery

To create an image gallery, place all the files you want included in a folder within `/content/gallery/`. The exampleSite has this configured as `content/gallery/images/` but you can change the name of the "images" folder in `config.toml` if you wish.
To create an image gallery, place all the files you want included in a folder called "images" (you can change the name of the "images" folder in `config.toml` if you wish). Place your "images" folder in a subfolder of `content/` with any name. The directory structure then looks like this:

```
content/
Expand All @@ -110,7 +110,7 @@ content/
└── _index.md
```

The gallery title is defined in the front matter of `_index.md`. You can also optionally define the page URL using `url`:
To automagically generate a gallery from the images, set `type: "gallery"` in the front-matter of `_index.md`. The gallery title is defined in the front-matter as well. You can also optionally define the page URL using `url`. Here is an example of a gallery's `_index.md`:

```
---
Expand All @@ -120,7 +120,25 @@ url: "/portrait-gallery"
---
```

In order to create more than one gallery, create multiple folders in `content/` with this file structure and `type: "gallery"` defined in the `_index.md` front matter.
In order to create more than one gallery, create multiple subfolders in `content/` with this file structure and `type: "gallery"` defined in the `_index.md` front matter. For example:


```
content/
| └── gallery/
| └── images/
| | ├── file_1.jpg
| | ├── file_2.jpg
| | └── file_3.jpg
| └── _index.md
|
└── portfolio/
└── images/
| ├── file_1.jpg
| ├── file_2.jpg
| └── file_3.jpg
└── _index.md
```

In `config.toml`, you can set `smallPreviewImages` to `true` in order to use small sized thumbnails. Include those thumbnail files in your gallery image folder. In exampleSite, this looks like:

Expand All @@ -144,31 +162,15 @@ That's it! Sam's gallery layout template will automagically build the page from

# Editing the theme

All the theme's Sass files are included. You can compile these to CSS using the npm scripts included in `package.json`.

Prerequisites:
* Node.js and npm: https://www.npmjs.com/get-npm

To install all dependencies:

```sh
$ npm install
```

Available commands are:

* `npm run build:sass` compiles Sass files to compressed CSS
* `npm run autoprefixer` autoprefixes the compiled CSS
* `npm run build` does all the above
* `npm run watch` watches Sass files for changes and automatically recompiles and autoprefixes the CSS
This theme uses [Hugo Pipes](https://gohugo.io/hugo-pipes/introduction/) to compile, autoprefix, and minify its CSS styles from the included Sass files. You can run the built-in server to preview the site as you make changes to the Sass files!

# Contributing

Pull requests for bug fixes and enhancements are welcome.

__Thank you to:__ @paskal, @crownsedge, @jazzi, @hakamadare, @mfg92, @Hanzei, and @lx4r!
Open source themes like this one would not be possible without some amazing __[contributors](https://github.com/victoriadotdev/hugo-theme-sam/graphs/contributors)__. Thank you!

# License
Copyright (C) 2018 Vicky Lai
Copyright (C) 2018 Victoria Lai

Licensed under [AGPL-3.0](https://github.com/mfg92/hugo-theme-sam/blob/master/LICENSE)
Empty file modified archetypes/default.md
100644 → 100755
Empty file.
Empty file modified archetypes/posts.md
100644 → 100755
Empty file.
5 changes: 5 additions & 0 deletions sass/_elements.sass → assets/sass/_elements.sass
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@
td, th
text-align: left
border: 0
& .gist-meta
background-color: transparent
color: $body-text
& a
color: $body-text

.tag
padding: 0.25em 0em
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
13 changes: 13 additions & 0 deletions docs/about/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html><html><head><meta charset=utf-8><meta http-equiv=x-ua-compatible content="chrome=1"><meta name=HandheldFriendly content=True><meta name=MobileOptimized content=320><meta name=viewport content="width=device-width,initial-scale=1"><meta name=referrer content=no-referrer><meta name=description content="A new Hugo site."><title>About - Call me Sam</title><link rel="shortcut icon" href=/sam.ico><link rel=stylesheet href=/css/main.min.81bbafc4df93b11c1c3e2449464373c384aa4903731b4fc7a77dfcdd979e184f.css integrity="sha256-gbuvxN&#43;TsRwcPiRJRkNzw4SqSQNzG0/Hp3383ZeeGE8=" crossorigin=anonymous media=screen><link rel=stylesheet href="https://fonts.googleapis.com/css?family=Didact+Gothic"><meta name=twitter:card content=summary_large_image><meta name=twitter:image content=https://example.com/tn.png><meta name=twitter:title content=About><meta name=twitter:description content="Hello, I&rsquo;m Sam. I&rsquo;m a theme for Hugo. I&rsquo;m an extremely customizable, content-focused theme that lets you showcase your work your way.
I have slick minimalist templates for list pages (such as a list of blog posts) and single pages (a page to read one blog post). You can use tags on your content, and view content by tags.
I also have a simple responsive gallery built with CSS grid. It&rsquo;ll look great on any screen, and all you have to do is provide a folder of images."><meta property=og:title content=About><meta property=og:description content="Hello, I&rsquo;m Sam. I&rsquo;m a theme for Hugo. I&rsquo;m an extremely customizable, content-focused theme that lets you showcase your work your way.
I have slick minimalist templates for list pages (such as a list of blog posts) and single pages (a page to read one blog post). You can use tags on your content, and view content by tags.
I also have a simple responsive gallery built with CSS grid. It&rsquo;ll look great on any screen, and all you have to do is provide a folder of images."><meta property=og:type content=article><meta property=og:url content=https://example.com/about/><meta property=og:image content=https://example.com/tn.png><meta property=article:published_time content=2018-02-13T13:42:49-05:00><meta property=article:modified_time content=2018-02-13T13:42:49-05:00><meta property=og:site_name content="Call me Sam"><title>About</title></head><body><div class=wrap><div class=section id=title>About</div><div class=section id=content><p>Hello, I&rsquo;m Sam. I&rsquo;m a theme for <a href=https://gohugo.io/>Hugo</a>. I&rsquo;m an extremely customizable, content-focused theme that lets you showcase your work your way.</p><p>I have slick minimalist templates for list pages (such as a list of blog posts) and single pages (a page to read one blog post). You can use tags on your content, and view content by tags.</p><p>I also have a simple responsive gallery built with CSS grid. It&rsquo;ll look great on any screen, and all you have to do is provide a folder of images.</p><p>I&rsquo;m built and maintained by <a href=https://victoria.dev>Victoria Lai</a>. Here&rsquo;s her <a href=https://github.com/victoriadotdev>GitHub</a>.</p><p>This page uses the default <code>single.html</code> template.</p></div><div class="section bottom-menu"><hr><p><a href=/posts>posts</a>
&#183;
<a href=/gallery>gallery</a>
&#183;
<a href=/portfolio>portfolio</a>
&#183;
<a href=/about>who is sam?</a>
&#183;
<a href=https://example.com/>main</a></p></div><div class="section footer">Call me Sam, a theme for Hugo.</div></div></body></html>
9 changes: 9 additions & 0 deletions docs/categories/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!doctype html><html><head><meta charset=utf-8><meta http-equiv=x-ua-compatible content="chrome=1"><meta name=HandheldFriendly content=True><meta name=MobileOptimized content=320><meta name=viewport content="width=device-width,initial-scale=1"><meta name=referrer content=no-referrer><meta name=description content="A new Hugo site."><title>Categories - Call me Sam</title><link href=https://example.com/categories/index.xml rel=alternate type=application/rss+xml title="Call me Sam"><link rel="shortcut icon" href=/sam.ico><link rel=stylesheet href=/css/main.min.81bbafc4df93b11c1c3e2449464373c384aa4903731b4fc7a77dfcdd979e184f.css integrity="sha256-gbuvxN&#43;TsRwcPiRJRkNzw4SqSQNzG0/Hp3383ZeeGE8=" crossorigin=anonymous media=screen><link rel=stylesheet href="https://fonts.googleapis.com/css?family=Didact+Gothic"><meta name=twitter:card content=summary_large_image><meta name=twitter:image content=https://example.com/tn.png><meta name=twitter:title content=Categories><meta name=twitter:description content="A new Hugo site."><meta property=og:title content=Categories><meta property=og:description content="A new Hugo site."><meta property=og:type content=website><meta property=og:url content=https://example.com/categories/><meta property=og:image content=https://example.com/tn.png><meta property=og:site_name content="Call me Sam"><title>Categories</title></head><body><div class=wrap><div class=section id=title>Categories</div><div class=section id=content><ul></ul></div><div class="section bottom-menu"><hr><p><a href=/posts>posts</a>
&#183;
<a href=/gallery>gallery</a>
&#183;
<a href=/portfolio>portfolio</a>
&#183;
<a href=/about>who is sam?</a>
&#183;
<a href=https://example.com/>main</a></p></div><div class="section footer">Call me Sam, a theme for Hugo.</div></div></body></html>
1 change: 1 addition & 0 deletions docs/categories/index.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Categories on Call me Sam</title><link>https://example.com/categories/</link><description>Recent content in Categories on Call me Sam</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><atom:link href="https://example.com/categories/index.xml" rel="self" type="application/rss+xml"/></channel></rss>
Loading

0 comments on commit 0d6dc97

Please sign in to comment.