Comments (5)
Hi @panr Image now centered but the title does not appear because <img
> tag does not have the title attribute.
your shortcode input
{{< image src="/img/spot.gif" position="center" title="This is title" >}}
html output
<img src="/img/spot.gif" class="center">
actually it should be this way --> https://www.w3schools.com/tags/tag_figcaption.asp
from hugo-theme-hello-friend.
@hazar-e
Ok, now you have figure
shortcode with props:
- src (required)
- alt (image alt)
- position (left is default; figure position
left | center | right
) - style (image additional styling)
- caption (figure caption)
- captionPosition (center is default; but you can set it to
left | center | right
) - captionStyle (caption additional styling)
from hugo-theme-hello-friend.
Hi @hazar-e ππ» Iβve just added a shortcode {{ < image > }}
to help you with this issue. Shortcode has one required prop src
just like default html element and few optional: alt
(String), position
(left | center | right) and style
(for any additinal CSS inline styling props).
If you donβt know what shortcodes are, please read Hugo docs
https://gohugo.io/content-management/shortcodes/
from hugo-theme-hello-friend.
Oh, now I see. I made image
shortcode, not figure
. I'll fix it today ;-)
from hugo-theme-hello-friend.
@panr thank you for your interest. Good work.
from hugo-theme-hello-friend.
Related Issues (20)
- Change code snippet's theme when switch main theme
- Image Processing crashes on building a website
- [Question] Combining JS files in footer.html HOT 1
- Media queries are not working in iOS
- `Error building site: TOCSS: failed to transform "css/style.scss" (text/x-scss)` HOT 6
- Embedding TryHackMe badge HOT 1
- Can't Image in markdown syntax
- _index.md non centered text. HOT 1
- Add archive for tweets contenttype
- Question: Add Cover image to archive
- Add PowerShell Syntax Highlighting
- Animated back to top button with CSS HOT 1
- Add share buttons:
- Accessibility: Background and foreground colors do not have a sufficient contrast ratio.
- Accessibility: Links do not have a discernible name
- PWA: Progressive Web App Support
- Sticky navbar HOT 1
- Github Page support
- can't build my site due to a new error HOT 5
- [Help Wanted] How can I adjust the archive page so that it does not contain microblog entries? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hugo-theme-hello-friend.