Giter Site home page Giter Site logo

Comments (19)

RaananW avatar RaananW commented on June 26, 2024

note that this might require reindexing the how-to tutorials, please let me know when it is done.

from olddocumentationsite.

QuentinRillet avatar QuentinRillet commented on June 26, 2024

Hi @deltakosh ,

Where is it ?

from olddocumentationsite.

RaananW avatar RaananW commented on June 26, 2024

The search results have how_to in their title (for example - http://doc.babylonjs.com/search?q=highlight ) That's the first place I could find it in.

from olddocumentationsite.

deltakosh avatar deltakosh commented on June 26, 2024

Exactly. It is in every page from the how to (in the header)

from olddocumentationsite.

BabylonJSGuide avatar BabylonJSGuide commented on June 26, 2024

Having tried to use a space instead of _ in How_To and having got into all sorts of issues with internet URLS I ended up with doing a replace in the static.pug and statics.pug files for

h1=staticContent.category.replace("_", " ") and

h1=dataObj.category.replace("_"," ") respectively.

This seems to me to be the easiest way to do it in the search results as well and so suggest the following changes in search.js on lines 73 and 83. I will not do a push for this in case this is not the way you want to go. Not sure if there are other places the how to hyphen appears but assume a similar solution would work.

            html += '<div class="basicFilter disabled"  data-version="' + cat + '"><span>' + cat.replace(/_/, " ") + '</span><span>(' + numOfFiles + ')</span></div>';


            html += '<a href="' + f.src + '">' + f.version.replace(/_/, " ") + ' : ' + f.name + '</a>';

from olddocumentationsite.

deltakosh avatar deltakosh commented on June 26, 2024

Ping @Temechon and @QuentinRillet

from olddocumentationsite.

BabylonJSGuide avatar BabylonJSGuide commented on June 26, 2024

Woops a few days ago I tested out my idea for replacing _ in How_To with a local build and it worked. In my last commit these changes in search.js were still in place so got committed and pushed. Honestly I am not trying to take over the documentation (or perhaps it is just my first step to world domination :) )

from olddocumentationsite.

deltakosh avatar deltakosh commented on June 26, 2024

Which commit was it?

from olddocumentationsite.

BabylonJSGuide avatar BabylonJSGuide commented on June 26, 2024

ced79cc but please note that though the change was not supposed to have been left in it does appear to solve the hyphen problem. Leave it to you as to what you want to do.

from olddocumentationsite.

deltakosh avatar deltakosh commented on June 26, 2024

This is perfect :)

from olddocumentationsite.

RaananW avatar RaananW commented on June 26, 2024

Should I reindex the how-tos?

from olddocumentationsite.

deltakosh avatar deltakosh commented on June 26, 2024

Nope that's the magic of it

from olddocumentationsite.

RaananW avatar RaananW commented on June 26, 2024

They are still shown as How_To in the search index - http://doc.babylonjs.com/search?q=highlight (even after reindexing)

from olddocumentationsite.

deltakosh avatar deltakosh commented on June 26, 2024

Ah ! Right. We need to do the little replace trick here as well:)
Ping @QuentinRillet

from olddocumentationsite.

RaananW avatar RaananW commented on June 26, 2024

And then I'll have to reindex ;)

from olddocumentationsite.

deltakosh avatar deltakosh commented on June 26, 2024

Sure you like it

from olddocumentationsite.

deltakosh avatar deltakosh commented on June 26, 2024

Can we reindex? ping @QuentinRillet

from olddocumentationsite.

Temechon avatar Temechon commented on June 26, 2024

I don't see any underscores in the search result... It seems it has already been done: BabylonJS/Documentation@ced79cc#diff-7150cea0f9818367b6d63c04bcfead00
And I don't think we need to reindex as everything is in the js. But if you really want to reindex, you can do it :)

from olddocumentationsite.

deltakosh avatar deltakosh commented on June 26, 2024

Good :)

from olddocumentationsite.

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.