Giter Site home page Giter Site logo

Comments (12)

bloatware avatar bloatware commented on August 17, 2024

Nope, trim="/" would be a bad idea for including in default theme. It would fail in some (new) permlink schemes.

from textpattern-default-theme.

cara-tm avatar cara-tm commented on August 17, 2024

Oups. But without it I got some errors by SEO tools: non corresponding canonical URLs with addresses.

from textpattern-default-theme.

philwareham avatar philwareham commented on August 17, 2024

Which canonical exactly is causing your SEO errors?

from textpattern-default-theme.

cara-tm avatar cara-tm commented on August 17, 2024

All if I do not set the trim attribute.

from textpattern-default-theme.

philwareham avatar philwareham commented on August 17, 2024

I can't see what the problem is - I've check the canonical links on a live default theme and they are totally fine. If your issue is with ending / slash (not sure if that is your issue) that is not actually an issue and your SEO tools are wrong.

Quote from John Mueller at Google:

"the slash after a hostname or domain name is irrelevant, you can use it or not when referring to the URL, it ends up being the same thing."

source

Basically, as long as you are consistent with your URL patterns and canonicals (which we are) then there is no issue.

from textpattern-default-theme.

bloatware avatar bloatware commented on August 17, 2024

Isn't it somehow related to this?

from textpattern-default-theme.

philwareham avatar philwareham commented on August 17, 2024

Probably - but from memory and for legacy reasons didn't we choose to stick to current handling and make sure it was consistently generated by all tags?

from textpattern-default-theme.

philwareham avatar philwareham commented on August 17, 2024

Anyway, that isn't specific to the default theme. The default theme canonicals are generated consistently and correctly. If the issue you mention is worth discussing again, it needs to be in the core Textpattern repo not here. Thanks.

from textpattern-default-theme.

bloatware avatar bloatware commented on August 17, 2024

I guess @cara-tm meant that something like

<link rel="canonical" href="<txp:page_url context="id, s" />">

would give you 'canonical' article/section links whatever other parameters (q, pg, etc) are. But trim="/" shouldn't be necessary here.

from textpattern-default-theme.

philwareham avatar philwareham commented on August 17, 2024

So do I put the code you suggested in, @bloatware ? Or leave as it is now?

from textpattern-default-theme.

bloatware avatar bloatware commented on August 17, 2024

If everything is working I'd leave it as is :-)

from textpattern-default-theme.

philwareham avatar philwareham commented on August 17, 2024

OK, closing this one. Thanks all.

from textpattern-default-theme.

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.