Skip to content

Commit

Permalink
feat: add r/docs/img_embed (#3241)
Browse files Browse the repository at this point in the history
Embedding an image.

---------

Signed-off-by: moul <[email protected]>
  • Loading branch information
moul authored Dec 7, 2024
1 parent ac899c8 commit 0a2c447
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/gno.land/r/docs/docs.gno
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ Explore various examples to learn more about Gno functionality and usage.
- [Adder](/r/docs/adder) - An interactive example to update a number with transactions.
- [Source](/r/docs/source) - View realm source code.
- [AVL Pager](/r/docs/avl_pager) - Paginate through AVL tree items.
- [Img Embed](/r/docs/img_embed) - Demonstrates how to embed an image.
- ...
<!-- meta issue with suggestions: https://github.com/gnolang/gno/issues/3292 -->
## Other resources
Expand Down
1 change: 1 addition & 0 deletions examples/gno.land/r/docs/img_embed/gno.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module gno.land/r/docs/img_embed
10 changes: 10 additions & 0 deletions examples/gno.land/r/docs/img_embed/img_embed.gno
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package image_embed

// Render displays a title and an embedded image from Imgur
func Render(path string) string {
return `# Image Embed Example
Here’s an example of embedding an image in a Gno realm:
![Example Image](https://i.imgur.com/So4rBPB.jpeg)`
}

0 comments on commit 0a2c447

Please sign in to comment.