Giter VIP home page Giter VIP logo

Comments (4)

deovaliandro avatar deovaliandro commented on May 20, 2024

Save all images in static folder under the root folder. So the folder is like this:

├── archetypes
├── config.yaml
├── content
├── layouts
├── README.md
├── static
│   ├── custom_routing.png
│   ├── mikrotik_vpn.png
│   ├── rabbitmq_auto_ack.png
│   ├── rabbitmq_no_auto_ack.png
│   └── vpn_ios.jpeg
└── themes

from hugo-tania.

WingLim avatar WingLim commented on May 20, 2024

With 08a430a, hugo will auto search image in post folder or static folder.

from hugo-tania.

wheleph avatar wheleph commented on May 20, 2024

Thank you! With the fix, I'm able to keep images in my posts directories. Just like I did before.

from hugo-tania.

hurutoriya avatar hurutoriya commented on May 20, 2024

@WingLim Hello, nice to meet you.
I love your hugo theme, it is a pretty simple and beautiful design 😄

Regarding this updates

With 08a430a, hugo will auto search image in post folder or static folder.

It supported images in post folder but still put the error when I update the hugo-tania theme.

diff --git a/themes/hugo-tania b/themes/hugo-tania
index 0a54b432..99acf147 160000
--- a/themes/hugo-tania
+++ b/themes/hugo-tania
@@ -1 +1 @@
-Subproject commit 0a54b432f9e7318e202760dcd400ab9cefc17882
+Subproject commit 99acf147092a853126c178ffdfaa481ae738d180
Start building sites … 
hugo v0.89.0+extended darwin/amd64 BuildDate=unknown
Error: Error building site: "/Users/hurutoriya/code/hurutoriya.github.io/themes/hugo-tania/layouts/_default/_markup/render-image.html:13:15": execute of template failed: template: _default/_markup/render-image.html:13:15: executing "_default/_markup/render-image.html" at <imageConfig (printf "static/%s" (.Destination | safeURL))>: error calling imageConfig: open /Users/hurutoriya/code/hurutoriya.github.io/static/posts/2017-11-13/images/1.gif: no such file or directory

error messages say broken the post directory images rendering images.
https://github.com/WingLim/hugo-tania/blob/main/layouts/_default/_markup/render-image.html#L13

Actual file structure is here.

I guess _markup/render-image.html build as under /static path even under posts directory but it seems failed?
Sorry I don't have a knowledge about hugo theme but I would like to share it 🙇 .

https://github.com/hurutoriya/hurutoriya.github.io/tree/source/content/posts/2017-11-13

from hugo-tania.

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.