Coder Social home page Coder Social logo

Comments (8)

gunnarmorling avatar gunnarmorling commented on June 11, 2024

That's a very good idea. I'd name it "stable" only instead of "latest".

We also should prevent any doc versions besides "stable" from being indexed: https://support.google.com/webmasters/answer/93710?hl=en

from mapstruct.org.

filiphr avatar filiphr commented on June 11, 2024

"stable" is also fine. Just to have something which is not linked to a specific version πŸ˜„.

I was also looking into the noindex meta tags. For this we will have to add <meta name="robots" content="noindex" /> to the reference documentation during the generation. Should we do the same for the api documents as well?

I think that we will either need to add/remove the meta tags manually or make it configurable in our build, so they are either added or not added to the pages

from mapstruct.org.

agudian avatar agudian commented on June 11, 2024

Another alternative would be to use a robots.txt - we wouldn't have to alter the html files (there are a lot of them in the javadoc subdir), but that wouldn't make google forget that it had the older versions indexed already. Not sure if that would be a problem, though.

from mapstruct.org.

gunnarmorling avatar gunnarmorling commented on June 11, 2024

I don't think we can have a robots.txt on GH Pages. AFAICS the way forward is to add the meta tag mentioned by filip to the non-stable reference guide and API docs. Ideally it's automated in some way.

from mapstruct.org.

agudian avatar agudian commented on June 11, 2024

Really? Don't the crawlers visit through www.mapstruct.org and not via http://mapstruct.github.io/ or something?

But yes, we could add a script to add those headers to the older files as well...

from mapstruct.org.

filiphr avatar filiphr commented on June 11, 2024

I think that I found some way that we can add/remove the needed tags. I propose the following solution:

  • We generate the api documentation and the reference documentation we are going to add <meta name="robots" content="noindex" /> which will tell the crawlers not to index those sides.
  • We will have a stable folder where the stable version will be located, before we do the publish in our publish.sh we add this line find public/documentation/stable -type f -name "*.html" | xargs sed -i '/<meta name="robots" content="noindex".*\/>/d' before we do the commit

We will of course have to regenerate the documentation for 1.0.0.Final and 1.1.0.Final so we can add the noindex meta tag.

WDYT? Should I make a PR proposition?

from mapstruct.org.

gunnarmorling avatar gunnarmorling commented on June 11, 2024

from mapstruct.org.

gunnarmorling avatar gunnarmorling commented on June 11, 2024

Closing; thanks, @filiphr!

from mapstruct.org.

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.