Comments (9)
I'll look into it, but so far I couldn't reproduce the issue.
from hextra.
ran into this as well while adding this shortcode:
https://gohugo.io/templates/shortcode-templates/
when removing the shortcode it still seems to work but otherwise, my build fails
from hextra.
ran into this as well while adding this shortcode:
https://gohugo.io/templates/shortcode-templates/
when removing the shortcode it still seems to work but otherwise, my build fails
Can you help share the shortcode and the content you were adding that triggered the issue?
from hextra.
sure.
{{ $img := .Page.Resources.GetMatch (printf "*%s*" (.Get 0)) }}
{{ $command := .Get 1 }}
{{ $options := .Get 2 }}
{{ if eq $command "Fit"}}
{{ $img = $img.Fit $options }}
{{ else if eq $command "Resize"}}
{{ $img = $img.Resize $options }}
{{ else if eq $command "Fill"}}
{{ $img = $img.Fill $options }}
{{ else if eq $command "Crop"}}
{{ $img = $img.Crop $options }}
{{ else }}
{{ errorf "Invalid image processing command: Must be one of Crop, Fit, Fill or Resize."}}
{{ end }}
<figure style="padding: 0.25rem; margin: 2rem 0; background-color: #cccc">
<img style="max-width: 100%; width: auto; height: auto;" src="{{ $img.RelPermalink }}" width="{{ $img.Width }}" height="{{ $img.Height }}">
<figcaption>
<small>
{{ with .Inner }}
{{ . }}
{{ else }}
.{{ $command }} "{{ $options }}"
{{ end }}
</small>
</figcaption>
</figure>
{{< imgproc sunset Resize "300x" />}}
from hextra.
@pascalwhoop I could not re-produce the issue with the snippet you provided.
$ hugo version
hugo v0.117.0-b2f0696cad918fb61420a6aff173eb36662b406e+extended linux/amd64 BuildDate=2023-08-07T12:49:48Z VendorInfo=brew
I was running the hextra-starter-template using the above Hugo version inside a Gitpod box Ubuntu 22.04.3 LTS
.
from hextra.
@pascalwhoop could you please share a repository that reproduces the issue you're encountering? This will help me in diagnosing and resolving the problem more effectively.
from hextra.
@imfing I pushed something here.
Thx for looking at it. Likely just a hugo error that non-hugo pros just don't recognise. But weird to debug nonetheless
https://github.com/pascalwhoop/curiloo.com/tree/bug/markdownify
from hextra.
Found the error. I had a custom fimg
shortcode that makes images more efficient. But the markdownify
extension breaks the lookup of the page bundles. Putting a if $img
around the code of the shortcode helped. The images still show but the search doesn't break. I guess logging a warning would still be nice for UX but this fixes the markdownify
call in your fragments
page
from hextra.
But the markdownify extension breaks the lookup of the page bundles. Putting a if $img around the code of the shortcode helped.
glad you figured this out! I'll close this issue
I guess logging a warning would still be nice for UX but this fixes the markdownify call in your fragments page
I agree, but logging for Hugo built-in function like markdownify
can be a bit tricky
from hextra.
Related Issues (20)
- 请问首页的页面标题如何居中显示
- Summary section of Details CSS issue
- Exclude subfolders from content folder in small navbar HOT 1
- Allow disable generating full mobile navigation tree
- Nested list: <ul> margin-top with bold first element HOT 1
- I want side bar order change + question HOT 1
- Mermaid diagram not working for index page HOT 11
- Code block file names clash with invalid language specifiers HOT 1
- Automatic redirect from page 404. HOT 1
- ---
- Steps are displayed in the "on this page" menu, even though they are not titles or navigation items HOT 1
- _index.md with no title inherits name from folder name
- Allow changing background color HOT 10
- Feature Request: Folder name with no _index should not direct to empty page. Show subpages instead HOT 11
- Make custom Tailwind CSS work
- Feature request: vertical line for toc like the one in nav HOT 1
- KaTeX fonts are incorrectly transformed to lower-case for Hugo v0.123 HOT 8
- 配置相关问题咨询 HOT 2
- Indented callouts rendered incorrectly HOT 4
- can not see the copy button when hover HOT 3
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 hextra.