Coder Social home page Coder Social logo

Comments (6)

AmazingRise avatar AmazingRise commented on June 8, 2024 1

Hi, STYJ.
I added a insertFigure command, see wiki for details.
And I push the code to master branch.

Please try it.
If no further problems are found, please close this issue.

Thanks for your support.

from hugo-theme-diary.

AmazingRise avatar AmazingRise commented on June 8, 2024 1

And I have to say, this is only a wrapper of Hugo's image processor.
The reason for that may be Hugo's image processor convert the gif into a static image when cropping it.

If you want to insert gif files, in the way other figures did, you can ditrctly write HTML code,<figure>...</figure> in your content, without using Hugo's cropping command.
(You can refer to /themes/diary/layout/shortcodes/insertFigure.html)

(Don't forget to switch on safe HTML option in config.toml)

from hugo-theme-diary.

AmazingRise avatar AmazingRise commented on June 8, 2024

Good idea, I'll try to implement.
Thanks for your feedback.

from hugo-theme-diary.

0xlgtm avatar 0xlgtm commented on June 8, 2024

Thank you, let me know if you need any help and I will try my best to help you! :)

from hugo-theme-diary.

0xlgtm avatar 0xlgtm commented on June 8, 2024

Hi Rise, thank you for the quick work! I have tested it and it is really good! Wiki explanation is good too!

However, I had 1 problem - when I tried to use a .gif file for img insertFigure, the gif shows up but it doesn't play. Is it possible to also play gifs?

from hugo-theme-diary.

0xlgtm avatar 0xlgtm commented on June 8, 2024

Understood! Thanks for explaining :)

from hugo-theme-diary.

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.