Code Monkey home page Code Monkey logo

Comments (2)

rhukster avatar rhukster commented on June 10, 2024

Search engines and browsers treat URLs with or without a trailing slash the same. If you asked someone to type a URL they woud never add a trailing slash to the URL, so in general it's simpler and easier to have a URL without the trailing slash.

I think the rule of thumb whether you use a trailing slash or not is to be consistent. If you don't use a trailing slash, then consistently don't use it. I don't think forcing a trailing slash is a good idea because for most people they don't use it. Best to go with the common use case, and not have it.

from grav.

kittyfishfrommars avatar kittyfishfrommars commented on June 10, 2024

@rhukster: You are right about consistency.

Please take note that the current implementation of {{ home_url }} in Grav 1.7.45 is inconsistent:

  • Home does not add a trailing slash to the URL
  • Subpages do add a trailing slash

wget --no-parent requires trailing slashes.

from grav.

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.