blackburn
blackburn copied to clipboard
Two questions: layout, and post directories
I like Blackburn very much - thank you for creating it! However, i am learning Hugo as I go, which makes things tricky sometimes. So I have two questions:
- If I edit a css file so as to have different fonts, thickness and background color on the right hand side menu strip - can I do that in my own file, or do I need to edit one of Blackburn's css files? I'm still very unsure of how Hugo manages multiple css files. For example, if two files are in conflict, which takes precedence?
- I am creating a new blog with Hugo, but I'd like (eventually) to import my old blog, but under a different heading. You can see my attempt at https://numbersandshapes.net/blog where the menu item "Numbers and Shapes" is meant to open up a new blog page. For some reason it puts all the posts together. I did this by copying the "single.html" file into a new file "/layouts/nshapes.html" which I referred to in my
config.toml
. All I really need to see is an example of how this should be done: with appropriate html files and directory structure.
Anyway, thanks very much!
I'm not sure what you're trying to achieve in point no. 2 but I can explain point no. 1.
If you look at layouts/partials/head.html, you can see this section below where the theme is loading stylesheet according to what is defined in the config file.
{{ range .Site.Params.custom_css }}
{{ if findRE "https?://" . }}
<link rel="stylesheet" href="{{ . }}">
{{ else }}
<link rel="stylesheet" href="{{ $.Site.BaseURL }}{{ . }}">
{{ end }}
{{ end }}
To specify .Site.Params.custom_css
in your hugo configuration file, you can do this.
[params]
custom_css = "value"
*This is toml format (yaml and json is also available)
However, the theme is trying to range
over the value so custom_css
here should be an array.
Suppose that you want to include static/style.css
onto your site, you want to add this to your configuration file.
[params]
custom_css = ["style.css"]
The above will add this line within your <head>
tag.
<link rel="stylesheet" href="http://localhost:1313/style.css">
As custom css is being loaded after blackburn.css is loaded, the custom css you add here will take precedence.
You can see my attempt at https://numbersandshapes.net/blog where the menu item "Numbers and Shapes" is meant to open up a new blog page.
By checking https://numbersandshapes.net I couldn't find a page by that name. If you want to have a separate page then create it as if you're going to have an about page. That is, not under the post dir.
See https://stackoverflow.com/questions/28569458/ for example.
I noticed on your side-menu.css that you upped the value to width: 200px
of the margin-left
parameter. Unless the browser window is maximized, whatever content you have on the page, be it in the form of a post or a page by itself, is ragged up against that menu.