Giter VIP home page Giter VIP logo

hugo-theme-sam's Introduction

Test Hugo versions Latest Release

Main page screenshot

Sam is a Simple and Minimalist theme for Hugo. It lets you categorize and showcase your content the way you want to.

Focused on content and typography, the stylized index page is really just a list of navigation links that you can set in your config.toml. This versatile design is limited only by your imagination, as you can make it say anything you like. Here are some ideas.

Index page iterations.

Features

  • Showcase content
    • Content-focused page templates for list pages, single pages, and posts
    • A responsive CSS grid gallery page that renders from images in your Page Bundle
  • Customize
    • Custom navigation menu set via config.toml
    • Custom footer text
    • Custom background video via config.toml
  • Developer-approved
    • Syntax highlighting
    • Share-ready pages with Open Graph and Twitter metadata you can customize in config.toml and page front-matter
    • Effortless use of Hugo Pipes to generate CSS from Sass files
    • Tested for compatibility with Hugo versions as far back as 0.49.2

Quick start

Requirements

Requires the extended version of Hugo. You can find installation instructions here (latest version recommended). Here's a handy Bash function for downloading a specific Hugo version.

Extended Hugo's PostCSS requires JavaScript packages to compile the styles for this theme. If you're seeing an error like this:

Error: Error building site: POSTCSS failed to transform "css/main.css"

Install the required packages globally using npm. You'll need postcss, postcss-cli, and autoprefixer.

npm i -g postcss postcss-cli autoprefixer

If you're new to Node.js and npm, learn how to install and use npm here. It is recommended that you use a version manager for your Node.js installation, such as nvm.

Note: If you are using Hugo as a snap app, the above two Node.js packages have to be installed locally inside exampleSite.

cd exampleSite/
npm i postcss postcss-cli autoprefixer

1. Get the theme

Use the theme as hugo module

  1. Ensure that Go is installed (version >= 1.12). Download the Go installer here.

  2. Turn your new or existing site into a hugo module by issuing this command from site root:

    hugo mod init github.com/me/my-sam-based-site
  3. Declare the sam theme module as a dependency of your site:

    hugo mod get github.com/victoriadrake/hugo-theme-sam

Use the theme locally with git clone or as a submodule

Run from the root of your Hugo site:

git clone https://github.com/victoriadrake/hugo-theme-sam.git themes/sam

Alternatively you can include this repository as a git submodule. This makes it easier to update this theme if you have your Hugo site in git as well. For this you need to run:

git submodule add https://github.com/victoriadrake/hugo-theme-sam.git themes/sam

2. Configure your site

From the exampleSite, copy config.toml to the root folder of your Hugo site. Inside this file, identify the theme = ... line.

To configure as a Hugo module

Make sure the following line is uncommented in order to activate your theme as hugo module:

theme = "github.com/victoriadrake/hugo-theme-sam"

To configure a local theme

Make sure the following line is uncommented:

theme = "sam"

Afterwards, adapt the configuration parameters inside config.toml as you like. There are helpful hints in the file.

3. Create pages

Run:

hugo new page.md

Where page can be anything you like. A contact page, a bio, dates for your upcoming world tour... Anything!

4. Design your main menu and index page

In config.toml, customize the entries for [[params.mainMenu]] however you like. You can have as many or as few entries as you like. You can even include external links.

This list comprises the index page and part of the navigation menu at the bottom of single content pages. Here's an example:

[[params.mainMenu]]
    link = "/photography"
    text = "photography"

[[params.mainMenu]]
    link = "/posts"
    text = "writing"

[[params.mainMenu]]
    link = "/about"
    text = "who dis?"

Preview your site locally

Use Hugo's built-in server to see your site in action as you make changes.

hugo serve -t sam

Visit localhost:1313 in your browser to see a live preview of your site.

Posts

To create a new post, run:

hugo new posts/your-post-title.md

Image gallery

To create an image gallery, place all the files you want included in your Page Bundle. The directory structure might then look like this:

content/
 └── gallery/
      ├── _index.md
      ├── file_1.jpg
      ├── file_2.jpg
      └── file_3.jpg

To automagically generate a gallery from the images, set type: "gallery" in the front-matter of _index.md. You can also set other options for the gallery:

  • The gallery title
  • The page link with url
  • The maxWidth of the resized images
  • Whether you want the images to link to the full size files, with clickablePhotos
  • You can keep the orignal aspect ratio of the images in the grid with keepAspectRatio

Here is an example of a gallery's _index.md:

---
title: "Portraits"
type: "gallery"
url: "/portrait-gallery"
maxWidth: "800x"
clickablePhotos: true
keepAspectRatio: false
---

In order to create more than one gallery, create multiple Page Bundles with images and type: "gallery" defined in the _index.md front matter. For example:

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

That's it! Sam's gallery layout template will automagically build the page from your images.

Custom video background

To change the default home page background to a looping video, you need to set a list of video sources and optionally an overlay color (default: rgba(0, 0, 0, 0.4)).

Here is an example configuration of config.toml:

[[params.videoBackground.sources]]
    source  = "/background.mp4" # Your video file
    type    = "video/mp4"
    poster  = "/background.jpg" # The image to show when the video isn't playing

[params.videoBackground]
    overlay = "rgba(0, 0, 0, 0.4)" # optional

And here is a screenshot of what that might look like:

Video background main page screenshot

Editing the theme

This theme uses Hugo Pipes to compile, autoprefix, and minify its CSS styles from the included Sass files.

To make changes to the CSS, edit the Sass files located in assets/sass/, then build your site using extended Hugo, which you can obtain from Hugo Releases.

If when building you do not see the changes you have done, make sure to build your website with the --ignoreCache flag, otherwise Hugo will attempt to use its own cached Sass files.

You can run the built-in server to preview the site as you make changes to the Sass files!

Issues

If you have a question or get stuck, please open an issue for help and to help those who come after you. The more information you can provide, the better!

Contributing

Pull requests for bug fixes and enhancements are welcome! Please ensure you first read about contributing to this project.

Open source themes like this one would not be possible without some amazing contributors. Thank you!

License

Copyright (C) 2018-2022 Victoria Drake

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

hugo-theme-sam's People

Contributors

alexraileanu avatar arthurbailao avatar deining avatar elelay avatar hakamadare avatar hanzei avatar imjma avatar lx4r avatar mfg92 avatar purrloftruth avatar tojimjiang avatar undergroundwires avatar victoriadrake avatar zach-johnson avatar zkanda avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

hugo-theme-sam's Issues

change font and color

Hey Victoria,

I’am totally overwhelmed about Hugo and your theme “Sam” - it works really fine with netlify.
Thank you for creating and sharing it, but I get stucked at two things.

I want to change the font and the backgroundcolor, but since some days I get stucked. I have no idea where I can put in a link to googlefont, and when I want to change the backgroundcolor - the sass files doesn’t seem to work. I was helping me out to change the background color in the head of my index.html file, but that’s not the best way, because one idea is: when you refresh the website: backgroundcolor, font, and font-color is changing evry time. So I would be totally if you can give me an hint how to solve this.
here is my github:
https://github.com/lulu-mit-sahne/cinema

and that's the page till now:
https://sad-wilson-a543af.netlify.com/

Thank you :)
Julius

Multiple Galleries

Is it possible to have multiple galleries? For example, a wedding gallery and a portrait gallery.

I can think of maybe two ways which might answer this.

  1. Name the files according to their grouping and save in image folder. Use get.resource or resources.match.

  2. Duplicate the current gallery on the theme and rename folder, links and components.

Any ideas of which is best?

Thanks for your time and for producing the theme. It's amazing.

Text does not wrap around image

https://mrjules.gitlab.io/hugo2/about/

It's only when I add float: right to #content img and remove display: flex from .section does my text wrap around the image, but doing that breaks the alignment for my other pages.

Do I have to add two classes; one for the image and the content of my about page in order to use flexbox properties correctly? Cause I've done it locally and can't seem to get my text to wrap around my image, besides using the above method. Or maybe I'm not using the right properties?

How can I remove the line under the word on the homepage?

Sorry, I'm not good at this...

I would like to permanently remove the underlined links on the homepage. Meaning, keep the links but just remove the style underline. Can you please help me with this?

edit: I've tried manipulating style.sass and I've also tried adding 'text-decoration: none' in every place imaginable. Nothing removes the underlined links :(

Markdownify post titles

Thank you very much for the beautiful theme.
I would like to make some of my blog post's titles have italics and/or code formatted text, but doing so gives me this error:
image
(I'm using Rstudio's blogdown to render the content, BTW)

Is there a way to modify the layouts documents to markdownify the titles? Where should we make such modifications?

CSS editing does not work

To remove the border underlining the main menu
border-bottom: 2px solid #ccc; on element a I unminified and edited themes/sam/static/css/style.css.
But on running hugo the generated css file did not respect my edits.
How can I change the css?

Errors on site without expected parameters set

Hello again:)

$subj, when trying to run this theme against my blog source I get following (and site won't render at all):

Building sites … ERROR 2018/03/20 19:04:07 Error while rendering "page" in "": template: theme/_default/single.html:1:3: executing "theme/_default/single.html" at <partial "head.html" ...>: error calling partial: template: theme/partials/head.html:17:70: executing "theme/partials/head.html" at <absURL>: wrong number of args for absURL: want 1 got 0
ERROR 2018/03/20 19:04:07 Error while rendering "page" in "post/": template: theme/_default/single.html:1:3: executing "theme/_default/single.html" at <partial "head.html" ...>: error calling partial: template: theme/partials/head.html:17:70: executing "theme/partials/head.html" at <absURL>: wrong number of args for absURL: want 1 got 0
ERROR 2018/03/20 19:04:08 Error while rendering "taxonomy" in "": template: theme/_default/list.html:1:3: executing "theme/_default/list.html" at <partial "head.html" ...>: error calling partial: template: theme/partials/head.html:17:70: executing "theme/partials/head.html" at <absURL>: wrong number of args for absURL: want 1 got 0
ERROR 2018/03/20 19:04:08 Error while rendering "home" in "": template: theme/index.html:1:3: executing "theme/index.html" at <partial "head.html" ...>: error calling partial: template: theme/partials/head.html:17:70: executing "theme/partials/head.html" at <absURL>: wrong number of args for absURL: want 1 got 0
ERROR 2018/03/20 19:04:08 Error while rendering "section" in "": template: theme/_default/list.html:1:3: executing "theme/_default/list.html" at <partial "head.html" ...>: error calling partial: template: theme/partials/head.html:17:70: executing "theme/partials/head.html" at <absURL>: wrong number of args for absURL: want 1 got 0
ERROR 2018/03/20 19:04:08 Error while rendering "taxonomyTerm" in "": template: theme/_default/list.html:1:3: executing "theme/_default/list.html" at <partial "head.html" ...>: error calling partial: template: theme/partials/head.html:17:70: executing "theme/partials/head.html" at <absURL>: wrong number of args for absURL: want 1 got 0

The reason is likely some absent .Site. parameter but you can't tell it from error message, I guess input parameters handling could be improved. cboettig/hugo-now-ui#9 might be used as reference point.

Default is not defined error

Whenever running the server I'm getting this error

ERROR: 2018/04/15 22:35:47 template.go:350: template: theme/_default/list.html:4: function "default" not defined
ERROR: 2018/04/15 22:35:47 template.go:350: template: theme/gallery/list.html:3: function "default" not defined
ERROR: 2018/04/15 22:35:47 template.go:350: template: theme/partials/head.html:12: function "default" not defined
ERROR: 2018/04/15 22:35:47 template.go:350: template: theme/posts/single.html:1: function "default" not defined
ERROR: 2018/04/15 22:35:47 template.go:119: html/template: "theme/partials/head.html" is an incomplete template in theme/partials/head.html
0 draft content
0 future content
0 pages created
1 non-page files copied
0 paginator pages created
0 categories created
0 tags created
in 9 ms

@hivickylai

Rendering on ios 9.3.5

Note the links broken over two lines in this screen capture: iPad model MC770LL/A
Chrome version 62.0.3202.60

Otherwise, Sam's a champ.

img_0055

License Clarification - AGPL or CC BY-SA 3.0

Thanks for sharing this theme, much appreciated. I'm just looking for a clarification on the license as it appears to differ between the Hugo Themes gallery and the LICENSE in Github.

The Hugo themes gallery is showing a license of Creative Commons Attribution 3.0 Unported and the LICENSE file is AGPL.

Not a lawyer, but with my understanding of the AGPL would mean that any hugo sites using this theme would also need to be licensed under the AGPL, is that your intent? Edit: I think this may be only if the theme is modified.

Thanks for any clarification on this.

Posts not paged

It just shows a few posts with no access to the rest, if there's more than 9.

Hugo Pipes for SASS

It would be wonderful if Sam's SASS was set up to build with Hugo Pipes, like in your Introduction theme. Makes working with Hugo so much more pleasurable!

Forwarding a post to link

Is there a way to forward a user to a link when pressing on a post?

For example, when a user clicks on a post it redirects him to a pdf file on the internet.

Problem with SASS on netlify

Hey @victoriadrake,

I was having a great time with sam but I got stuck on editting css/sass.

My changes do make effect locally, unfortunately as I deploy to netlify from gitHub I keep getting the original/default layout.

Would you share some light on this?

Thank you for all your patience and hard work.

Paginated gallery

I think a paginated gallery would be an awesome addition to this theme but I'm not sure whether it would make the theme too complicated. As far as I understand Hugo's pagination would need an entry, in the form of a Markdown file, for each image. Is that right and if so do you think adding a file for each image would make the process of adding an image to the gallery too complicated?

Funky rendering in code blocks

I have a couple of issues related to code blocks:

  • The spacing between lines in my code is way too large. Which Sass property should I be adjusting to fix this?
  • The syntax-highlighting theme I use (manni) has a light background. When I use this the actual words have a background that matches the rest of the page, but the code block has the background color that matches the syntax highlighting theme.
  • The code blocks don't scroll horizontally when they are too large, the whole page scrolls.

The background color issue is fixed in code blocks if I comment out this line:

#content:
    & code:
        // background-color: lighten($dark-grey, 10%)

but then any inline code doesn't get its background changed. That doesn't seem right because the code blocks should be under #content pre code right? I'm pretty new to all of this web stuff, so hopefully you can help me figure out what's going on!

.DS_Store showing up in gallery

Hi, thanks for the great theme. MacOS always generates a hidden .DS_Store file in directories, which shows up in the gallery under a blank space where an image should be.
I think this could be solved by adding some if statement in list.html to filter out this filetype but I cant figure it out.
Any help would be much appreciated. thx

On mobile (<735px), no margin on content pages

On all content pages, there's no side margin on the text in mobile browsers (or <735px).

image

Not sure if this is a result of the changes in v4.0, but for instance, Jenny Bryan's personal site (jennybryan.org) running on an older version of the theme (https://github.com/jennybc/jennybryan.org/tree/master/themes/hugo-theme-sam) doesn't display the same behaviour, so it seems to be a bug.

image

(It looks like she also added FontAwesome icon integration by adding a line to the header, but that seems unrelated).

Sorry I have almost no web dev experience, otherwise I'd take a stab myself! But thanks :)

wrong number of args for markdownify

I tried setting up a totally new hugo site and then did
git submodule add https://github.com/vickylai/hugo-theme-sam.git themes/sam
tweaked config.toml so that theme = "sam" and then ran hugo

And I get this:

Building sites … ERROR 2018/09/21 16:27:33 Error while rendering "taxonomyTerm" in "": template: _default/list.html:23:53: executing "footer" at <partial "footer.html...>: error calling partial: template: partials/footer.html:1:29: executing "partials/footer.html" at <markdownify>: wrong number of args for markdownify: want 1 got 0

so I jump into themes/sam and git checkout 232e4aa59580418595131f3dd29a5bea040137bc (right before markdownify got added) and then try hugo again, and this time all builds fine.

Have I got some weird mis-configuration locally?

Text alignment in blog post text

Hello,

Thanks for the awesome theme!

Is it possible to change the text alignment within a post's body?
Where is the appropriate place for such a change?

Social media icons?

Love the theme, simple and easy to use.

I was wondering how to add social media icons to a contacts page? html or md?

License Mismatch

The README.md says AGPL 3.0 but the actual LICENSE file and GitHub indicator show Apache 2.0. 🤷🏻‍♀️

Reader view is not available for posts

Hi,

I recently started using the theme and I am super happy with it! There's one small draw-back: when I go to a post I don't get a pretty "Show Reader View" in Safari or Firefox. Based on my research I would assume it would not be a thing in Edge or Instapaper either.

Would a PR changing the posts to support Reader View be accepted? Is anybody else working on this?

Resources I found helpful:

Does this theme need jQuery?

jQuery is loaded from a CDN in the header of the template but I fail to find a file where it is used. Did I just overlook an instance where it is used?
If it is not needed removing it could further reduce the page size ...

small versions of images for thumbnails

Is there an easy way to alter the theme to use smaller versions of the images for the gallery overview page and only link to the large versions from the thumbnail?
Thanks in advance for the help 🙂

Multiple galleries

Firstly, thank you for creating a great theme! I really like the design.

In my site, I would like to create multiple image galleries with different names. For example, a car gallery with photos of cars and a bicycle gallery with photos of bicycles. My current approach is to copy themes/sam/layouts/gallery/list.html to layouts/cars/list.html and then replace {{ $path := "gallery/" }} with {{ $path := "cars/" }}. The problem is that I will have more 50 galleries so creating a list.html
for every gallery is tedious. Is there some alternative syntax that is more general so I can just use a single list.html for all my galleries?

Disclaimer: I am new to Hugo.

Default Screen Image?

1st: love this theme.

I published my Hugo site with R blogdown. I know very little about front-end dev; I just know R. I'm in a real R bubble.

I noticed that when I try to cite my posts on LinkedIn (by copy-pasting the URL of the live site), LinkedIn's automatic upload thingy uses the default "Call Me Sam" home screen.

I manually changed every instance of tn.png to what I wanted it to be, but that didn't work.

How can I make the default image for my site be the, well, default image for my site?

Thanks!!

Galleries need images in parent folder?

If I place my image within /images Hugo doesn't process them and the gallery is blank. However if I place them within the same folder as _index.md it works fine.

Eg, this doesn't work:

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

This works

content/
 └── gallery/
     └── _index.md
     └── file_1.jpg
     └── file_2.jpg
     └── file_3.jpg

Can I make clickablePhotos from post.md file?

I have a post.md file which contains some images, how can I make the images clickable?
I added clickablePhotos: true but it doesn't work. Does it just work in a gallery type?

---
title: "Portafolio"
clickablePhotos: true
images:
    - /screen.png
---

Promatik image viewer

The DEMO project incorporates the Promatik image viewer for the gallery, but my implementation doesn't. I don't see a switch to throw in the config file.

How do I embed the promatik viewer on my site?

Thanks

bottom_menu.html error

This is really confusing logic at at bottom_menu.html

{{ if or ((.Page.Site.Params.mainMenu) (.show_back_menu_item)) }}

And for me it results with:

Error: Error building site: failed to render pages: render of "page" failed: execute of template failed: template: _default/single.html:34:15: executing "bottom-menu" at <partial "bottom_menu.html" (dict "Page" . "show_back_menu_item" false)>: error calling partial: "[redacted]/themes/sam/layouts/partials/bottom_menu.html:1:7": execute of template failed: template: partials/bottom_menu.html:1:7: executing "partials/bottom_menu.html" at <(.Page.Site.Params.mainMenu) or (.show_back_menu_item)>: can't give argument to non-function .Page.Site.Params.mainMenu

Perhaps this will do?

{{ if .Page.Site.Params.mainMenu }}

hugo 0.71.1

Cannot build with theme

I have run into issues whilst trying to build my blog which uses this theme. I believe it is related to #71.

If I attempt to build my theme:

hugo
Total in 29 ms
Error: Error building site: POSTCSS: failed to transform "css/main.css" (text/css): resource "sass/sass/style.sass_b1195a7e151e6f4379f823b1b2b4f87a" not found in file cache

If I clone this repo and attempt to build this theme I get the same:

hugo --config theme.toml
Total in 21 ms
Error: Error building site: POSTCSS: failed to transform "css/main.css" (text/css): resource "sass/sass/style.sass_b1195a7e151e6f4379f823b1b2b4f87a" not found in file cache

My current hugo version is:

hugo version
Hugo Static Site Generator v0.69.0/extended darwin/amd64 BuildDate: unknown

I recently updated hugo using:

brew update hugo

Thanks for any attention you spend on this 🤝

vertical scrollbar / CSS changes not applied

Hello,

I have been trying to get rid of the vertical scrollbar that shows up on the main page by removing the vertical padding on the body element. At first I tried copying the style.sass to my site's /assets/sass folder and made the modifications there and when I checked with hugo's built-in webserver it seemed to do exactly what I wanted.

However, running the site generator, I still end up with the scrollbar. I tried altering the style.sass directly in the theme and I am now using hugo extended 0.70.0, but the result is still the same with unwanted padding ending up in main.min..css. I don't quite understand yet where this is coming from (or what exactly goes into main.min..css and style.css).

So this boils down to 2 questions:

  • How can I make this change to the stylesheet stick?
  • Are you planning to do anything about that scrollbar yourself?

Code-Block Widening

First, Thank you so much for this theme! It's amazing!

Second, My code blocks seem to be too narrow.
screen shot 2018-11-11 at 4 37 50 pm

Is there anyway to adjust the width?
I will look through the sass code to find a solution.

Again, Thank you so much for the theme!

Index.html Title

In the head.html file I changed <title>{{.Site.Title}}</title> to <title>{{.Title}}</title>, and now my index.html shows the baseURL and not the title in config.toml.

I even downloaded your most up to date version, thinking it might be the older version I'm using and the issue is still there. Not really sure what to do from here. Any help is appreciated.

image quality lower down than original

The images in the gallery section is clickable but not the ones in post.
The published image in the post is not as sharp as original one, like fog covered, it's better to show the original one not thumbnail.

In the post, images will be more attractive to be wider than the contents, like Hamilton theme

External Links not working

I have installed the theme and added the config.toml to my root directory from the /exampleSite you provided.

However, all of my links are going to relative path. (i.e. 'http://localhost:1313/https/google.com')

Code is here:

config.toml at root directory

`baseurl = "https://taylorpechacek.com/" # Your domain name. Must end with "/"
languageCode = "en-us"
defaultContentLanguage = "en"
isMultilingual = false
title = "Hello world. Call me Taylor."
theme = "sam"
pygmentsStyle = "monokai" # https://help.farbox.com/pygments.html
pygmentsCodefences = true
googleAnalytics = "" # Tracking code, eg. "UA-111111111-1"

[params]
dateform = "Mon Jan 02, 2006"
dateformfull = "Mon Jan 2 2006 15:04:05 EST"
favicon = "sam.ico"
homepage = "main" # What to call the home page link
footerText = "Call me Sam, a theme for Hugo."

Metadata for Open Graph and Twitter
description = "A new Hugo site." # Max 160 characters show in search results
images = ["tn.png"] # Image that shows on Twitter cards and Open Graph links to the site
title = "Call me Sam"

[[params.mainMenu]]
link = "/posts"
text = "posts"

[[params.mainMenu]]
link = "/gallery"
text = "gallery"

[[params.mainMenu]]
link = "https//google.com"
text = "portfolio"

[[params.mainMenu]]
link = "/about"
text = "who is sam?"

[imaging]
quality = 75`

index.html within the theme

`

{{ partial "head.html" . }} <title>{{ .Title }}</title>
    {{ if .Site.Params.mainMenu }}
    {{ range .Site.Params.mainMenu }}
        <a href="{{.link}}" class="big-link">
            {{.text}}
        </a>
    {{ end }}

    {{ else }}
    {{ range .Site.Sections }}
        <a href="{{.RelPermalink}}" class="big-link">
            {{.Title}}
        </a>
    {{ end }}
    {{ end }}

</nav>
`

theme not loading

It seems that I encounter a problem.
Since I am a newbie and this is my first hugo installation, I really don't know what to do.

The page is loading without css.

ERROR: 2018/08/08 23:05:42 template.go:350: template: theme/_default/list.html:4: function "default" not defined
ERROR: 2018/08/08 23:05:42 template.go:350: template: theme/gallery/list.html:3: function "default" not defined
ERROR: 2018/08/08 23:05:42 template.go:350: template: theme/partials/head.html:12: function "default" not defined
ERROR: 2018/08/08 23:05:42 template.go:350: template: theme/posts/single.html:1: function "default" not defined
ERROR: 2018/08/08 23:05:42 template.go:119: html/template: "theme/partials/head.html" is an incomplete template in theme/partials/head.html
0 draft content
0 future content
0 pages created
1 non-page files copied
0 paginator pages created
0 tags created
0 categories created
in 6 ms

Any thoughts?

home page content

How can I show content in the home page?
Editing the home.pd file, does nothing for me.

links in footer cause unwanted line breaks

I want to place two links in the footer next to each other. When I overwrite footer.html by creating layouts/partials/footer.html and insert normal text (Lorem ipsum Lorem ipsum) it renders as expected:

plain_text

If I insert the same text but use it to link to two pages (<a>Lorem ipsum</a> <a>Lorem ipsum</a>) a line break appears:

links

What can I do to place the two links next to each other?

Thanks in advance for the help 🙂

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.