alanorth / hugo-theme-bootstrap4-blog Goto Github PK
View Code? Open in Web Editor NEWA blogging-centric Bootstrap v4 theme for the Hugo static site generator.
License: Other
A blogging-centric Bootstrap v4 theme for the Hugo static site generator.
License: Other
Hugo 0.18 was just released and makes some improvements and standardizations to pages. For example, from the release notes:
Every Page now has a Kind property. Since everything is a Page now, the Kind is used to differentiate different kinds of pages. Possible values are page, home, section, taxonomy, and taxonomyTerm.
We need to just check that we're doing things the best way, and generally update conventions we're using to the latest ones.
Clicking on the "return" footnote reference for a footnote does not redirect to the part of the post where the footnote is referenced but instead back to the index page.
I was using a custom <!--more-->
tag when the behavior was observed.
sorry this may be a question not a bug, I tried setting copyright to
copyright = "Copyright © 2008-{{< year >}} Caleb Cushing. This work is licensed under a [Creative Commons Attribution-NonCommercial 4.0 International License](https://creativecommons.org/licenses/by-nc/4.0/)"
but that didn't render https://bitbucket.org/xenoterracide/blog/src/da2beecd30782e7da8970ac5999efc5e1169d0e0/layouts/shortcodes/year.html?at=master&fileviewer=file-view-default
this a template bug? am I doing something wrong?
Hello,
I just tried switching my theme from a Lanyon theme to this one.
I installed the theme and set the theme name in my config.yaml.
Howevere when I then build the site I get:
ERROR: 2017/01/05 18:42:46 general.go:236: theme/partials/sidebar.html is an incomplete or empty template
Do I need to manually install some partial?
Great theme - but I have one problem.
It seems to me that if you have more blog posts than num_recent_posts there is no way to access older posts other than by categories. Most themes provide a sidebar listing of years so you can drill down.
Am I missing something / are you planning anything like this. Thanks again for the template..
I've got a site set up behind a reverse proxy that forwards it requests to both deedlefake.com
and www.deedlefake.com
, as is the convention. In the Hugo config, I've configured https://deedlefake.com
as the base URL. For some reason, although the rest of the font seems to load fine, the icons for categories and tags don't load if viewing the site through www.deedlefake.com.
This may be a configuration issue on my end, but, since I haven't been able to figure out a way to fix it, I'm filing this in case it isn't.
I suppose the other option would just be to have the www
subdomain redirect, rather than attempting to show both, but I'd like to be able to if I can.
We use Hugo's builtin metadata template to insert tags that help sites like Twitter and Facebook understand content better, but some of the metadata needs to be rooted in a proper Schema.org scope to be valid—you can see this by testing this theme with the Google Structured Data or W3C validator tools.
Google's Structured Data tool detects zero metadata!
W3C's validator doesn't like the metadata we're using because it isn't scoped.
As I understand it there in Hugo localization date, but there is a workaround.
https://discuss.gohugo.io/t/generating-localized-dates-in-template/2393/4
Just do not understand how to apply it in the template.
Navbar links appear to be alphabetical, no matter the order in config. Is there any way to control that?
The error I'm receiving is:
ERROR: 2017/01/08 10:33:57 general.go:236: theme/partials/sidebar.html is an incomplete or empty template
The source to the site is: https://github.com/cardoe/cardoe.github.io/tree/content
I wish I knew how to troubleshoot it further but the error message is pretty lacking.
Release notes: http://blog.getbootstrap.com/2017/10/19/bootstrap-4-beta-2/
If I remove from from baseof.html the following part of the CSS link, then the page will render properly.
integrity="{{ .Site.Data.sri.style}}"
However with the integrity variable the page won't render with style.
I wonder if anyone had an idea about making integrity work please?
I am getting the following error.
Reading your instructions, bootstrap was included? Did I do something wrong?
Error: Unable to find theme Directory: E:\hugo\output\themes\hugo-theme-bootstrap4-blog
(index):1 Failed to find a valid digest in the 'integrity' attribute for resource 'http://127.0.0.1:1313/css/style.css' with computed SHA-256 integrity 'iWT4FzIzYOMkVgL1RalyTDsQUI3SpoUB85EViSrNwco='. The resource has been blocked.
hmm... maybe a windows build issue? I've only noticed this on localhost, not when it builds in docker and serves from s3...
Hi Alan,
I want to "misuse" the "about" sidebar section to display a link to my RSS feed.
I remember that you stripped down font-awesome to the needed symbols.
Can you pleas eadd the rss icons again? That would be fa-rss and fa-rss-square.
Many thanks!
This post has a number of blockquotes, none of which have different formatting and so you can't tell what's being quoted. screenshot contains quoted and unquoted text.
After:
disqusShortName
in my sites config.yaml
filecomments: true
in my yaml front matterDisqus was still not visible against my post.
I looked at the single.html
template which looks like this:
{{ if and (.Site.DisqusShortname) (ne .Params.comments false) }}
{{ partial "disqus.html" . }}
{{ end }}
I changed that to this and it now works:
<!--Disqus-->
{{if .Params.comments}}
<div class="container content">
{{ template "_internal/disqus.html" . }}
</div>
{{end}}
Wondering why that was necessary!
I just added a code block to a post like so:
{{< highlight csharp "linenos=true,style=monokai" >}}
var assy = Assembly.LoadFile("C:\\SomePath\Plugin.Authentication.dll");
mvcBuilder.AddApplicationPart(assy);
var assy = Assembly.LoadFile("C:\\SomePath\Plugin.Markdown.dll");
mvcBuilder.AddApplicationPart(assy);
{{< / highlight >}}
I notice that when I shrink the page size, the code block overlaps with the sidebar:
Has anyone come accross this / can anyone suggest any workaround for this?
I have
[blackfriday]
hrefTargetBlank = true
in my settings to get external links in a new window. The links in the sidebar section don't use this setting.
Regards, Frank
Hugo's built-in opengraph.html
template leaves a few things to be desired. Two major sites using OpenGraph metadata are Twitter and Facebook. First of all it seems that the date tags need to be standardized.
Hi,
Are all pages in /content put into the main menu?
I have not set the menu front matter, but it is putting it in the main menu anyway.
Thanks for awesome theme. I have 2 questions (sorry if they look obvious, I'm newbie)
highlight_css
for hugo-material-docs theme.Hugo 0.20 allows custom output formats such as JSON which can be fed to client-side search engines like Lunr.js to implement a search facility. See the hugo-theme-docdock theme for an example.
Not really an issue but more a question.
Would it be hard to make this theme AMP compliant?
I just glanced over the ampproject website and it doesn't look so hard to do.
Images could be a problem and also the generated content itself but else?
What do you think?
Regards, Frank Tegtmeyer
It's nice to have the option to let visitors read content right from the homepage without having to click through a summary. This proposal introduces the optional "truncate" site parameter.
If the truncate parameter is not present or is set to true, posts in the list template are rendered as they have always been, with the "summary" content view.
If the truncate paramter is explicitly set to false, posts in the list template are rendered via a newly introduced "content" content view that displays the full post .Content and does not append a "read more" link.
would be interesting to add a
<link rel="license" href="{{ .Site.License }}"/>
to the template
that said, I don't understand why mine isn't rendering :/
I just noticed that my blog frank.tegtmeyer.net doesn't contain code for the cookie consent anymore.
Also settings like google-site-verification are lost.
The other blog (photoblog.tegtmeyer.net is still fine but is 37 commits behind your latest commit because I didn't update it yet.
Some tests showed that the .Site.Params map doesn't contain all the values from thew config file - only "author", "description" and "social" (an empty map).
The Params section is completely lost leading to skipping all things dependent on .Site.Param values.
So there is something weird going on.
Regards, Frank
How do I edit content on the homepage?
Hi Alan,
Most conspicuously, I have an application of you to start Hugo with such a nice theme.
In my native language, font size is relatively bigger than that of English. I would like to shrink all of the font size by touching CSS file or so, if possible.
Can you provide from where I should start?
Please regard me with warm heart that I am a beginner in making a static blog.
Regards,
Kee-Hoon
The theme is very good.
When the "menu navbar" is made up of more than three links and view the mobile, it is a two or three lines, it does not look good. It is possible to make "menu navbar" icon, options config.toml?
Is there a way to configure this theme to not add .html to the end of all the post links for example
http://localhost:1313/blog/test.html
a prettier URL would be:
http://localhost:1313/blog/test
or
http://localhost:1313/blog/test/
not the greatest looking thing, but looks fine in post
I'm thinking that there may be a couple of options here.
I recall seeing something about default truncating of characters on a the front page, so that might be part of the problem. I don't really need all of the code to display... but it'd be nice for it to be <pre><code>...
if it does.
Eventually I will have more posts that can fit on any one homepage or tag list. Need to implement pagination!
See: https://gohugo.io/extras/pagination#build-the-navigation
Add a 404 page to this template.
When you click an author's name in a post summary or full page article you should go to a page of that author's posts.
It would be pretty compatible with blog conventions to have your Twitter, Google+, Facebook, etc links on the sidebar. It should be optional and ideally use the existing config options where possible (like params.social.twitter
, which is already used by Twitter cards).
This could perhaps be enumerated like a menu, or like the social sharing links, and we could show Font Awesome icons for each link.
It would be nice to have the sidebar be optional, so users could opt for a single-column site. Right now we can simple not print the sidebar — for example, if a certain config option is present — but the main content doesn't fill the remaining space.
I'm not a Bootstrap expert so I'd need help with this.
Right now I add tags/categories to frontmatter but I don't use them. I'm not sure if I want to support both tags AND categories (I'm more partial to tags).
If I'm not mistaken, it looks like there's no responsive nav on mobile devices? Should be fairly straight forward to implement with navbar given it uses Bootstrap I would think? Thanks.
Hi,
I have two pages which are "public" in a sense but are excluded by robots.txt.
I would like to be able to turn the sharing icons off for these too - the same way as
the comments can be turned off (sharing = false).
Regards, Frank
With the current commit (81a7431) I get the following error:
ERROR 2017/03/20 18:14:44 Error while rendering "page post/2017/03/photoshoot-inga.md": template: /Users/fte/Sites/photoblog.tegtmeyer.net/themes/hugo-theme-bootstrap4-blog/layouts/_default/baseof.html:14:13: executing "schema-dot-org" at <imageConfig (printf ...>: error calling imageConfig: open /Users/fte/Sites/photoblog.tegtmeyer.net/static/https:/frank.tegtmeyer.tk/img/2017/03/Frank_Tegtmeyer__Portrait_2017_9Xan-730.jpg: no such file or directory
My images are remote (I use Cloudflare for them).
Regards, Frank
Right now, with zero other configuration, you can put a favicon.ico
in your site's static
directory and basically any browser will find it. There are better, more modern ways to do favicons now, though, for example:
Generating the code/images for this is easy enough (see realfavicongenerator.net) but it would be nice to have a configuration flag for controlling the addition of this code.
To play devil's advocate, though, it might be better to just advocate adding this site-specific code to head-custom.html
(see #17). Keeping the theme and its configuration simple is a plus.
It would be useful to disable Disqus comments on certain sections, like disabling comment on "pages" so people cannot comment on an "About Me" page.
I would like the ability to have more control over the contents of the navbar. The default behaviour is to link all pages that are not posts, but I have too many static pages, and only want a small subset of them in my navbar.
The default behaviour should be backward compatible, but with a params option that can be uncommented/enabled to display a custom hugo menu instead. This will allow me to add menu = "navbar"
to only the specific pages that I want in the navbar.
I would be happy to create a pull request if you think this is a sensible change.
Rassie
Lots of little things break/change with Bootstrap v4 Alpha 6. Tracking some issues:
.nav-inline
is now gone so our share icons are messed upReference the Alpha 6 announcement and the Alpha 6 ship list for some tips on stuff that changed.
Hi Alan;
in the ReadME of this theme you point to : https://github.com/gohugoio/hugo/blob/master/docs/content/content/multilingual.md which is a dead link
I did'nt the multilingual.md page.
May I suggest to point this link at : https://github.com/gohugoio/hugo/tree/master/examples/multilingual
Hi Alan,
on GTmetrix.com I saw that loading the webfont (font-awesome) delays displaying the page significantly (shown there in the waterfall view). It was loaded after the css file was interpreted and took some time of course.
I tried to include the following in the head section of my page:
Of course this leaves out the other font encodings but I think including them all is overkill.
The result showed no change for the Firefox rendering engine but the Chrome engine (desktop and mobile) started to download the font in parallel to the images. So the load time was reduced. For slow connections the result may be different.
It also introduced a warning about "doubled" content: the woff file once without parameter and once with the version number appended as parameter.
What do you think about font-preloading? Do you have experiences regarding this?
Regards, Frank
It would be amazing if the theme supported right-to-left (RTL) languages like Arabic. I think I could use something like bi-app-sass or css-flip but have zero experience with RTL CSS.
A quick, dirty hack with some gibberish + Google Translated Arabic text looks slightly promising (some block elements are flipped to the other side):
Sorry for the horrible Arabic. :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.