Code Monkey home page Code Monkey logo

Comments (7)

HorribleGeek avatar HorribleGeek commented on August 15, 2024

@karampok
Are you talking about Share buttons?

from minimo.

MunifTanjim avatar MunifTanjim commented on August 15, 2024

You can use something like this anywhere in the template: https://www.facebook.com/sharer/sharer.php?u={{ .Permalink }}

from minimo.

karampok avatar karampok commented on August 15, 2024

@HorribleGeek yes I am talking about share buttons
@MunifTanjim I will try to see how it looks

thx

from minimo.

HorribleGeek avatar HorribleGeek commented on August 15, 2024

@karampok use svg and link it to permalink.. Like @MunifTanjim showed above.

It will look cool!

from minimo.

karampok avatar karampok commented on August 15, 2024

I have to admit I am not familiar with the field.
Could you provide me a snippet of how the svg entry will look like, and which file should I place it?

Thanks!

from minimo.

HorribleGeek avatar HorribleGeek commented on August 15, 2024

@karampok i would have showed a live example but i switched my theme.

Anyways here is a quick code that i wrote

<!DOCTYPE html>
<html>
<body><svg class='icon' viewbox='0 0 24 24' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' aria-hidden='true'>


<a href="https://gw.coregossip.com"><path d="M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z"/></a></svg>
</body>
</html>

The path d defines the image, for this example it is facebooks svg and it links to my site. You can use what @MunifTanjim showed above.

Just replace the link. For time being you create a file named xyz.html in your local system, paste this code and test it out!

You will find svg code for most of social images in minimo theme itself.

Minimo SVG Icons

For a quick note: svg stands for scalable vector graphics, that means.it doesnt matter if you look at the image on a 4k screen or a mobile device, the quality will be se and size minimal.

Give me your repo link and i will implemet this feature with a pull request.

Things to do-
Get the svg code for social share you want to implement.

Find the link... For specific shares, facebooks example is shown above by @MunifTanjim

Implement in your html for site.

Test it!

Tip: dont forget to add and

from minimo.

MunifTanjim avatar MunifTanjim commented on August 15, 2024

Further discussion can be held on Hugo Discussion Forum

from minimo.

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.