Code Monkey home page Code Monkey logo

hugo-modules's People

Contributors

utkarshverma avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

academic-folio

hugo-modules's Issues

Partialcached in _svg.html causes resources to only use first occurence

Hello I was using your module but had some issues when using a resource (resource.Get..) as a an argument for .icon. When looping over pages and using the page bundle resources icon the icon would repeatedly show the first input.
I cloned your code and messed around until I noticed that just replacing partialCached with partial seemed to fix the issue.

img: Use of RelPermalink URLs breaks 404 page on Cloudflare Pages

UPDATE -- You can ignore this

I didn't realize it, but setting the Hugo parameter relativeURLs to false fixes this behavior ...


This is an edge case, and I can fix it by creating my own partial from yours, but:

  • Cloudflare Pages doesn't rewrite the 404 page URL when it hits a not found case.
  • I am using img partial with my page header logo image
  • If the 404 happens to be not a top level directory -- for example mysite.com/xx/yy -- the RelPermalinks fail because they are based on the location of 404.html rather than the url that's causing the 404

Suggested solution: another parameter that causes img to use Permalink rather than RelPermalink, which I'd use in my page header and if I used any images in 404.html

https://craftycto.com is the site. PaperModX theme.

Style svg icons via classes

Would it be possible to pass extra data into the partial? e.g tailwind utility classes.

{{ partial "svg" "fas fa-star" "w-12 h-12 fill-blue-500" }}

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.