Giter Site home page Giter Site logo

forestryio / hugo-theme-novela Goto Github PK

View Code? Open in Web Editor NEW
360.0 10.0 192.0 3.13 MB

Novela, the simplest way to start publishing with Hugo and Forestry.

Home Page: https://hugo-novela-forestry.netlify.app/

License: MIT License

CSS 2.92% JavaScript 8.27% HTML 38.94% SCSS 49.86%
hugo-theme blog-theme

hugo-theme-novela's Introduction

Hugo Novela

A port of Narative's Gatsby theme Novela

This theme requires Hugo extended > 0.65.0

The easiest way to get started is to import this theme in Forestry CMS in a single click

Import this project into Forestry

Install from the command line

If you don't want to use the starter, you can start from scratch and just install this theme from the command line.

Create a new Hugo site and initialize your project as a Hugo module:

hugo new site my-awesome-blog
cd my-awesome-blog
hugo mod init

Edit your config.toml to add the theme settings:

# Novela settings
theme = "github.com/forestryio/hugo-theme-novela"

paginate = 6

[social]
twitter= "https://twitter.com/forestryio"
github= "https://github.com/forestryio/novela-hugo-starter"
linkedin= "https://www.linkedin.com/company/forestry.io"
instagram = "#"
dribbble = "#"
youtube = "#"

[taxonomies]
author = "authors"

Create your first draft post and preview it locally:

hugo new post/my-first-post.md
hugo server -D

You're good to go!

Customization

Logo

Override /themes/novela/layouts/partials/icons/ui/logo.html with your own file at /layouts/partials/icons/ui/logo.html; include your logo in SVG format for desktop and mobile formats.

Novela supports light and dark mode. To have your logo respond in kind, add class="change-fill" to the svg path(s).

Socials

In order for the Socials to be surfaced in Forestry, you should copy the theme's config/_default/social.yaml to your project.

Authors

You should register authors as a taxonomy in your project's `config.yaml``

taxonomies:
  author: authors

Creating authors

Authors must be added in content/authors. Create a folder per author and add an _index.md file in it.

Here's an example of the front matter fields supported by default:

# /content/authors/firstname-lastname/_index.md
---
title: Dennis Brotzky
bio: |
  Written by You. This is where your author bio lives. Share your work, your
  joys and of course, your Twitter handle.
avatar: /images/dennis-brotzky.jpg
featured: true
social:
  - title: unsplash
    url: https://unsplash.com
  - title: github
    url: https://github.com
  - title: github
    url: https://github.com
  - title: github
    url: https://github.com
  - title: github
    url: https://github.com
---

Assigning authors to posts.

Ad the name of the author to the "authors" field:

authors:
  - Dennis Brotzky
  - Thiago Costa

Newsletter CTA

This theme includes a shortcode for a newsletter callout form that you can add to any page. It uses formspree.io as proxy to send the actual email. Each month, visitors can send you up to one thousand emails without incurring extra charges. Visit the Formspree site to get get going add your Formspree email to your shortcode like this:

{{< subscribe email="[email protected]" >}}

hugo-theme-novela's People

Contributors

amoenus avatar brotzky avatar delef avatar dirtyf avatar lcobucci avatar mountainbug95 avatar muhfajar avatar ngracilla avatar regisphilibert avatar yunussandikci 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  avatar  avatar  avatar

hugo-theme-novela's Issues

where do i find icons?

I recently added a menu, but the design was ruined as the icon looked out of place, where did you find those icons, i need one for menu. Tried fontawesome but it didn't look flush.

Question: What is the hero section/partial?

Hello!
I am trying to port the theme for personal site, and I am a complete novice when it comes to UI/UX can somebody tell me what is the purpose of hero.html is it meant to represent the authors, or is there a different reasoning behind the 'hero' nomenclature? I have seen it a bunch of time, but there are other files too like authors, bio, etc, hence the confusion.

Sorry if the question is too vague. I am trying to trim out any excess bit of code that a personal blog, like mine, would not require and learn a little bit of web dev on the way. Any documentation you folks can link me to would be really awesome as well.

P.S: Thank you for an amazing theme

authors articleList

Hey! First, love your theme. It's awesome. Thanks for making it.

I'm having trouble getting the author to populate on the main page and also on the author's bio page, the articleList associated with that author doesn't populate. I could be doing something wrong but just wanted to make sure. Currently using Hugo v0.74.3/extended. Using your theme here, if that's helpful.

Warnings on Local Startup

Command: hugo server -D -E -F --port 8080 --bind 0.0.0.0 --renderToDisk -d public

Output:

WARN 2019/12/19 11:39:53 found no layout file for "HTML" for "page": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2019/12/19 11:39:53 found no layout file for "HTML" for "taxonomyTerm": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2019/12/19 11:39:53 found no layout file for "HTML" for "taxonomy": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2019/12/19 11:39:53 found no layout file for "HTML" for "page": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2019/12/19 11:39:53 found no layout file for "HTML" for "page": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2019/12/19 11:39:53 found no layout file for "HTML" for "page": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2019/12/19 11:39:53 found no layout file for "HTML" for "page": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2019/12/19 11:39:53 found no layout file for "HTML" for "page": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2019/12/19 11:39:53 found no layout file for "HTML" for "page": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2019/12/19 11:39:53 found no layout file for "HTML" for "page": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2019/12/19 11:39:53 found no layout file for "HTML" for "page": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2019/12/19 11:39:53 found no layout file for "HTML" for "taxonomy": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2019/12/19 11:39:53 found no layout file for "HTML" for "page": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2019/12/19 11:39:53 found no layout file for "HTML" for "page": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2019/12/19 11:39:53 found no layout file for "HTML" for "page": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2019/12/19 11:39:53 found no layout file for "HTML" for "page": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2019/12/19 11:39:53 found no layout file for "HTML" for "page": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2019/12/19 11:39:53 found no layout file for "HTML" for "page": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2019/12/19 11:39:53 found no layout file for "HTML" for "page": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2019/12/19 11:39:53 found no layout file for "HTML" for "taxonomy": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2019/12/19 11:39:53 found no layout file for "HTML" for "page": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2019/12/19 11:39:53 found no layout file for "HTML" for "taxonomy": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2019/12/19 11:39:53 found no layout file for "HTML" for "page": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2019/12/19 11:39:53 found no layout file for "HTML" for "page": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2019/12/19 11:39:53 found no layout file for "HTML" for "section": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.

Can't display single post in hero

I'm trying to have a single post displayed on this half of the hero:

image

I've figured out how to divide the hero into two halves with flexbox , but I can't seem to be able to get the code for displaying the single, latest post right. Here is what I have:

{{ $articles := slice }}
{{ with first 1 (where site.RegularPages "Type" "post")}}
  {{ $articles = . }}
{{ end }}
{{ return $articles }}

But this just removes the hero entirely and puts Pages (1) in its place.

image

How do I just display a single post on that half of the hero?

Hitting errors when running hugo server

Shot of term:

WARN 2020/02/09 22:06:21 found no layout file for "HTML" for kind "page": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2020/02/09 22:06:21 found no layout file for "HTML" for kind "page": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2020/02/09 22:06:21 found no layout file for "HTML" for kind "section": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2020/02/09 22:06:21 found no layout file for "HTML" for kind "home": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2020/02/09 22:06:21 found no layout file for "HTML" for kind "page": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2020/02/09 22:06:21 found no layout file for "HTML" for kind "section": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2020/02/09 22:06:21 found no layout file for "HTML" for kind "taxonomyTerm": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2020/02/09 22:06:21 found no layout file for "HTML" for kind "taxonomyTerm": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2020/02/09 22:06:21 found no layout file for "HTML" for kind "page": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2020/02/09 22:06:21 found no layout file for "HTML" for kind "section": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.

File directory:
Screen Shot 2020-02-09 at 8 43 19 AM

When I run hugo server I get these errors.

Compile and change scss files

Hi, I am trying to compile new CSS file but nothing changes. I am making some changes to the /assets/scss/article.scss but no changes are visible.
Is there any specific way to make css changes? We can add it to the README maybe. Thanks!

Incorrect og:type for blogposts

For blog post there is

<meta property="og:type" content="website">

which should be

<meta property="og:type" content="article">

images are not responsive

If I insert images larger than the page width, rather than resizing responsive to the resolution, it loads the image with its original resolution.

Use Hugo .ReadingTime

It would be more editor- and Forestry-friendly if we automated ReadingTime rather than making editors estimate it here:

reading-time

I'd be happy to implement this if it makes sense.

Post layout issues on mobile devices

Lately I've noticed that when browsing posts on small-screen mobile devices (e.g. iPhone SE Gen1), the post page layout doesn't seem quite right.

Here are some comparisons to the Gatsby version:

Title's layout is weird:

compare_title

Contents are a little bit narrow:

compare_content

And some titles with long words would cause pages slide horizontally:

IMG_1103

And thanks for making this theme!

Links are not clickable when they are within the side progress bar

Just wanted to start off by saying thanks for sharing this great theme.

Really awesome!

I think there is a slight issue with the side progress bar. If you have a post with links/anchor tags they don't seem to be clickable?

See screenshots:

not clickable

If it's outside, it seems to be okay:

clickable

Unfortunately, my css is bit weak in this area, not sure if it's a z-index or something?

Thanks

How to install Novela?

Hi, I need an help to install this theme. I have created a new site with Hugo, but I can't install Novela from command line.
Can you help me?

How to add authors?

I have tried several ways to add authors to my page. it's not working. Please can you show me how,
Also, please, how do i show the about page links,
thanks.

Not compatible with quick start guide and Hugo v0.75.1

Observed Outcome

Following the quick start guide results in empty content when navigating to the entry point of the site.
image

I have included a test post:
image

This is my config.toml:

baseURL = "https://blog.poxon.dev/"
languageCode = "en-au"
title = "David Poxon's Blog"
theme = "novela"

Expected Outcome

There would be at least one post

Syntax highlighting

I've tried a bunch of stuff that I read in different forums but none seem to work for me. I've included this in my config.yaml file

PygmentsCodeFencesGuessSyntax: true
PygmentsCodeFences: true
pygmentsUseClasses: true

This is what the code in the blog looks like when I try to either use backticks with language or make use of hugu's highlight block.

Screen Shot 2020-09-27 at 9 35 15 PM

Add authors from forestry

Is there a way to add an author in forestry so that it respects the folder structure /content/authors/author-name/_index.md ?
If not, what is the purpose to have its front matter configured?

Feature request: Plans for adding a menu?

Any plans for adding menu functionality to this theme?
It would be awesome if this theme had an option to add menu items in line with dark mode and copy buttons.

Thank you for bringing this fantastic theme to Hugo.

Adding custom links in header

I see that the project already has a /about link, which is not linked anywhere directly in the page (or maybe I did not find it?)
Is there an official way to have custom links in the header?

Awesome theme by the way, thank you πŸ˜„

Deployment failed - Netlify

Hi, I tried to deploy on Netlify, but I got this log:

12:38:41 AM: Executing user command: hugo --gc --minify
12:38:41 AM: Error: "/opt/build/repo/themes/novela/layouts/partials/func/GetArticleAuthors.html:39:1": parse failed: template: partials/func/GetArticleAuthors.html:39: function "return" not defined
12:38:45 AM: failed during stage 'building site': Build script returned non-zero exit code: 255
12:38:46 AM: Finished processing build request in 19.440587786s

Progress Bar Still Blocking Some Links, Subscribe Button Messed Up and Overriding Query

Found a "solution" for the first one ( #26 ) through Netlify's snippet injection (before or ).

The only issues i have now is the progress bar is still blocking some links ( #15 ), the subscribe button for the newsletter is messed up in mobile ( #7 ) #7 (comment) and if i do override the theme's footer and add a few things to the one you already have will i need to copy your socials as well or will it look for it in mine(and not find it) and use yours?

Also if i were to add a menu, how would i go about it? Preferably an icon menu, for example a profile(for the about page) svg next to the link and dark/light mode switch. I know you said you are following the original theme but am not asking for a change am merely asking for advice and a bit of code if possible on how to implement this on my site.

Kindly Help Me

Screen Shot 2020-04-03 at 13 16 54

Kindly Help. Manifest, Meta, Service Worker Register, Add to Homescreen Linking

Hi how are you? I am trying to link my custom manifest, add a few more metas, add push notifications, make the newsletter display on every page automatically and add some scripts like my service worker, and add to home screen script but i am using the version with out layouts. How do i go about it.
Kindly help me.

Create a category list page.

Hi,
Thanks for creating a great theme!
I want to display the category list page, but it doesn't work.
For example,
novela.com/categories/orange/
novela.com/categories/red/

I want to display articles with each category when I access the permalink as above.

Do you plan to introduce category features in the future?
This is a great theme and I don't want to change it if possible.

Cannot override CSS gradient

I'm making a website with Hugo and one of the sections requires a flex-box, this is a simple example of what I'm doing:


<div class="flex-container">   
  <div class="photography">
     <h1>Photography</h1>
  </div>
  <div class="art">
  <h1>3D Art</h1>
</div>
</div>

And the CSS is:

flex-container{
display: flex;
flex-flow: row wrap;
padding-left: 100px;
padding-right: 100px;

}

.photography { 
 background: none !important;
  background: no-repeat url("https://thedivtagguy.com/wp-content/uploads/2020/11/InstagramSize.jpg") !important; 
  min-height: 200px;
  flex-basis: 50%;

}

.photography h1 {
  color:white;

}

.art { 
 
  background:blue;
  min-height: 200px;
  flex-basis: 50%;
}

However, there's this really weird linear gradient which is being applied somewhere in the theme's CSS. I can't seem to be able to override it in any way I know how, is there a way to fix this?

I've uploaded a repo of the entire code here, if that helps.

enter image description here

R markdown code snippets not rendering correctly

I'm using the theme (lovely work by the way!) to render my markdown documents from R Studio. However, the code chunks aren't rendering like code snippets usually would:

image

This looks really messy. These are written in .Rmd files, but if I use markdown, the code snippets render correctly:

image

I would like the code chunks from the Rmd file to render the same way. How can I fix this?

Running into deployment error

Hi, thank you so much for porting this theme.
However i cant deploy it and i dont know how to fix the issue.
Here's the error netlify is throwing to me.

Error: Error building site: failed to render pages: render of "taxonomy" failed: execute of template failed: template: authors/list.html:4:11: executing "main" at <partial "author/hero.html" .>: error calling partial: execute of template failed: template: partials/author/hero.html:11:15: executing "partials/author/hero.html" at <partial "author/social_links.html" .>: error calling partial: "/opt/build/repo/layouts/partials/author/social_links.html:5:36": execute of template failed: template: partials/author/social_links.html:5:36: executing "partials/author/social_links.html" at <partial $path $&gt;: error calling partial: partial "icons/social/website" not found

The repo is a fork of this one and the only changes i have made are copying the files in exampleSite to root, adding a text svg and a menu.

Kindly help me.

Suggestions of small fixes in CSS Style

Fix: Boxes overlapping

In file layouts/partials/article/hero.html:

<div class="article-hero-image" id="ArticleImage__Hero">
  <img src="{{ . }}">
</div>

According to css file, image will shrink to width: 100% while ratio is keeped.
The ratio of hero images, that come with the theme, is arround 2:1. If user pick an image of ratio, say 1.5:1 or even lower, Image box may overlap with Article Content.

It's ok to fix this by overwritting original 'css' files with user specified ones.
But maybe you guys can fix this in the upstream, so this theme can gain more popularities.

Nice theme, great work btw.

Avatar featured author not rendering

Using Novela for https://dedataverbinders.nl with Hugo extended 0.80, the avatar from the featured authors are sometimes not rendering properly on the homepage nor on the author page.

Have tried changing the underlying .jpg files, trying different sizes but to no avail. Also, I can't figure out why some do work and others don't. Any idea what's going on?

BTW, I have set feature=false for the authors that are not rendering. If you click on the first post, and then click the drop-down authors menu, you'll see three aviators not being rendered properly.

Source code: https://github.com/dataverbinders/website
Static site: https://github.com/dataverbinders/dataverbinders.github.io

Guidelines for changing logo

Is it possible to include specific guidelines for the creation and implementation of the .svg logo?
I'm having a hard time changing it properly: adding "class="change-fill"" doesn't seem working for me.

Thanks in advance to everyone!

logo-not-changing

Help Wanted: Advice on How To Utilize The Right Area

Hi, how are you?
I am currently using this theme, it's awesome, how ever i can't seem to find a way to add table of contents to the right side of the website.
I have tried left align and aside but it fails.
Can you help me, just point me to the right direction.

Multilingual

How to add multiple language support with this theme ?

broken link due to typo

I know this is neither the ideal place nor the ideal way to report a broken link to this repo, but I could not find a better one.
In the first line below https://themes.gohugo.io/hugo-theme-novela/#install-from-the-command-line it says If you don’t want to use the starter and starter links to htps://github.com/forestryio/novela-hugo-starter which should obviously be https://github.com/forestryio/novela-hugo-starter
I am not sure if it is in your power to fix it, but I hope so.

Large hero image hides text content

Steps to reproduce:
In forestry.io add a new post with hero image with dimensions 944 Γ— 630 pixels (intrinsic: 6016 Γ— 4016 pixels)
Add text with about 300 words

Expected result:
Hero image and text content correctly spaces
expected

Actual result:
Hero image overlaps the text content
actual

posts are not shown on the home page

Rookie question here.

I've added the submodule. The theme is applied but the posts are not coming up on the home page. For example, content/posts/my-first-post.md is not there.

I was using ananke theme before, the posts are there. I'm sure something is missing but couldn't figure out, thanks for your help!

Using: Hugo v0.70.0

Tags Taxonomy Support

Hey there,
just discovered Hugo today and i pretty much like this theme. But I miss support for tag taxonomy, so that I can access a /tags/xxx site and only retrieve the articles that have this tag.
Because I have so far no knowledge, is this easy to add or does this require some deeper Hugo knowledge? At least for me it not seems so straight to copy the authors logic and transform it to tags...

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.