GithubHelp home page GithubHelp logo

When uglyurls = true about inkblotty HOT 5 CLOSED

nish avatar nish commented on July 30, 2024
When uglyurls = true

from inkblotty.

Comments (5)

nish avatar nish commented on July 30, 2024 1

Thank you, I did not test multibyte characters.

I will test it and let you know how it goes. I use your theme to build my custom code on top of it so whenever I find issues, I will open an issue so it can be fixed.

Thanks

from inkblotty.

tosi29 avatar tosi29 commented on July 30, 2024 1

I close this issue.
If you find any problem or side effects, please open this or new issue.

Thank you for your contribution.

from inkblotty.

tosi29 avatar tosi29 commented on July 30, 2024

Thank you for your report.
I tried to fix this issue, and probably sidebar works fine now.
You can get fixed version from master branch.

However, I cannot find good solution for post tags/categories in a short time.

  1. Do you know any reference themes which work well with "uglyurls = true" ?
    It may be very helpful to fix it.
  2. If you know good solution for this issue, please let me know.

Thanks,
tosi

from inkblotty.

nish avatar nish commented on July 30, 2024

This is how I have fixed it, Do let me know whether the code is clean because I am not really a coder :)

Please ignore the span class since it is linked to my custom.css file.

            {{ $taxo := "categories" }}
            <span class="post-categories">
                {{ range .Param $taxo }}
                    {{ $name := . }}
                    {{ with $.Site.GetPage (printf "/%s/%s" $taxo ($name | urlize)) }}
                        <a href="{{ .Permalink }}">{{ $name }}</a>
                    {{ end }}
                {{ end }}
            </span>

            {{ $taxo := "tags" }}
            <span class="post-tags">
                {{ range .Param $taxo }}
                    {{ $name := . }}
                    {{ with $.Site.GetPage (printf "/%s/%s" $taxo ($name | urlize)) }}
                        <a href="{{ .Permalink }}">{{ $name }}</a>
                    {{ end }}
                {{ end }}
            </span>

from inkblotty.

tosi29 avatar tosi29 commented on July 30, 2024

Thank you for information.
I'm not a specialist of Hugo, so your patch is very helpful to fix.

Unfortunately, it looks not working with multibyte characters, but I got a hint from your code.
I push fixed version to master branch, so please try it if you want.

Thanks,
tosi

from inkblotty.

Related Issues (10)

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.