Skip to content
This repository has been archived by the owner on Feb 13, 2021. It is now read-only.

Rename how_to to How To #634

Closed
deltakosh opened this issue Oct 25, 2017 · 19 comments
Closed

Rename how_to to How To #634

deltakosh opened this issue Oct 25, 2017 · 19 comments
Assignees

Comments

@deltakosh
Copy link
Contributor

No description provided.

@RaananW
Copy link
Member

RaananW commented Oct 25, 2017

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

@QuentinRillet
Copy link
Contributor

Hi @deltakosh ,

Where is it ?

@RaananW
Copy link
Member

RaananW commented Oct 26, 2017

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.

@deltakosh
Copy link
Contributor Author

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

@BabylonJSGuide
Copy link
Collaborator

BabylonJSGuide commented Oct 26, 2017

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>';

@deltakosh
Copy link
Contributor Author

Ping @Temechon and @QuentinRillet

@BabylonJSGuide
Copy link
Collaborator

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 :) )

@deltakosh
Copy link
Contributor Author

Which commit was it?

@BabylonJSGuide
Copy link
Collaborator

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.

@deltakosh
Copy link
Contributor Author

This is perfect :)

@RaananW
Copy link
Member

RaananW commented Oct 31, 2017

Should I reindex the how-tos?

@deltakosh
Copy link
Contributor Author

Nope that's the magic of it

@RaananW
Copy link
Member

RaananW commented Oct 31, 2017

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

@deltakosh
Copy link
Contributor Author

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

@deltakosh deltakosh reopened this Oct 31, 2017
@RaananW
Copy link
Member

RaananW commented Oct 31, 2017

And then I'll have to reindex ;)

@deltakosh
Copy link
Contributor Author

Sure you like it

@deltakosh
Copy link
Contributor Author

Can we reindex? ping @QuentinRillet

@Temechon
Copy link
Contributor

Temechon commented Nov 8, 2017

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 :)

@deltakosh
Copy link
Contributor Author

Good :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants