vaga/hugo-theme-m10c

Does m10c work with RStudio

ogansser opened this issue · 8 comments

Hi,
i try to run m10c with RStudio. It works but I cannot replace the avatar with my picture. Instead, there is the author name with a link to the committed server.

Here is the config.toml:

baseURL = "https://www.gansser.info"
title = "my Site"
theme = "hugo-theme-m10c"
paginate = 10

[params]
author = "Oliver Gansser"
description = "Marketing - Research - Communication - Sales - Consumer-Typology"
[[params.social]]
name = "github"
url = "https://github.com/gohugoio"
[[params.social]]
name = "twitter"
url = "https://twitter.com/gohugoio"

Hi, have another question:
Is it possible to place somewhere a kind of imprint?

Olli

xeraa commented

You can replace the image by putting your own one into static/avatar.jpg (the folder static is on the same level as themes) — this will overwrite the one from the theme.

To add a footer you'd IMO need to customize the template. Copy themes/hugo-theme-m10c/layouts/_default/baseof.html to layouts/_default/baseof.html and make your changes to that file. Maybe right before or after </main>, but that might also require some SCSS tweaking.

replace the jpg with my own did not work. Maybe it has to do with my compiling with RStudio? Footer, I will try. Thanx

xeraa commented

Your editor won't make any difference. If you just run hugo it will generate a public/ folder with the output for you. There the avatar.jpg in the base folder (so public/avatar.jpg) should be the one from the static/ folder.

This is the code in the index.html:

The jpg is in the public folder, but in the HTML code the reference is not src="avatar.jpg", it is "src=//avatar.jpeg".

<header class="app-header"> <a href="/"><img class="app-header-avatar" src="//avatar.jpg" alt="Dr. Oliver Gansser" /></a>

xeraa commented

Yes, this is almost working.

The line that is causing the issue is https://github.com/vaga/hugo-theme-m10c/blob/master/layouts/_default/baseof.html#L20

Did you set the right baseURL in the configuration file? See https://github.com/vaga/hugo-theme-m10c/blob/master/exampleSite/config.toml#L1 for an example

vaga commented

How do you generate your website ?

At the moment, your baseURL seems to be empty.

(I'm fixing double / in avatar src attribute.)
(Edit: it's fixed a553e18)

great, it works. thanx!