Coder Social home page Coder Social logo

Comments (11)

remeh avatar remeh commented on June 2, 2024 2

Hm right I did focus on Gravatar support, sorry I was a bit off-topic with your issue.
We could imagine having another configuration entry such as "Avatar" in the config.toml refering to an image and using this instead of the "Gravatar" one. @nishanths would you accept such a change ? If yes I'll do it.

from cocoa-hugo-theme.

remeh avatar remeh commented on June 2, 2024

Hello. If you still want this feature: implemented here #25

But you would need to change ?s=50 to something bigger if you want a large gravatar such as the one in your screenshot.

from cocoa-hugo-theme.

nishanths avatar nishanths commented on June 2, 2024

Closed via #25

from cocoa-hugo-theme.

tristan-k avatar tristan-k commented on June 2, 2024

How do I use this with a local image?

from cocoa-hugo-theme.

nishanths avatar nishanths commented on June 2, 2024

@remeh yes :)

from cocoa-hugo-theme.

remeh avatar remeh commented on June 2, 2024

@tristan-k Available #26

If you want a larger size than the default one, for example 150px, you should use the CSS override option using ExtraCssFiles and put:

.avatar {
  max-width: 150px;
}

in your custom css file.

from cocoa-hugo-theme.

tristan-k avatar tristan-k commented on June 2, 2024

Doesnt work for me. The avatar will not be shown. I double checked the path to img/avatar.png.

baseurl = "https://url.tld" 
builddrafts = false
canonifyurls = true
contentdir = "content"
languageCode = "en-US"
layoutdir = "layouts"
publishdir = "public"
author = "Arthur Dent"
title = "Arthur Dent"
# pygmentsuseclasses = ture
# disqusShortname = "cocoaexamplesite" # Comment out to disable Disqus.
pluralizelisttitles = false

[permalinks]
fixed = ":title/"
blog = "blog/:slug/"

[params]
Author = "Arthur Dent"
# Gravatar = "" # do not use in the same time as Avatar
Avatar = "img/avatar.png" # path to image in static dir e.g img/avatar.png (do not use in the same time as Gravatar)
CacheBuster = true
DateForm = "Jan 2, 2006"
DateFormFull = "Mon Jan 2 2006 15:04:05 MST"
Description = "Don't panic"
Email = "[email protected]"
FaviconFile = "img/leaf.ico"
# GATracker = "XYZ"
# GitHub = "//github.com/you"
HighlightJS = true
Initials = "ad" # Displayed on single post page; DEPRECATED in v0.3.0.
Lang = "en"
# LinkedIn = "//linkedin.com/in/you"
# Twitter = "//twitter.com/you"

ExtraCssFiles = [ "/css/override.css" ] # In your `static/css`, add/remove files as necessary.

from cocoa-hugo-theme.

remeh avatar remeh commented on June 2, 2024

OK. Do you confirm that you've put it in static/img/avatar.png ?

from cocoa-hugo-theme.

tristan-k avatar tristan-k commented on June 2, 2024

Yes.

from cocoa-hugo-theme.

remeh avatar remeh commented on June 2, 2024

That is weird. Here it works well with a project completely started from scratch

screenshot_2016-11-09_21-20-27

from cocoa-hugo-theme.

nishanths avatar nishanths commented on June 2, 2024

@tristan-k is there a 404 in the browser console when fetching the image?

from cocoa-hugo-theme.

Related Issues (20)

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.