Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix search bar on documentation website #3423

Closed
Aaronontheweb opened this issue Apr 26, 2018 · 10 comments
Closed

Fix search bar on documentation website #3423

Aaronontheweb opened this issue Apr 26, 2018 · 10 comments

Comments

@Aaronontheweb
Copy link
Member

We've known that the search functionality on the site has been busted for a while, but I received an email from an end-user that explains how to fix it (they also use DocFx):

<?xml version="1.0"?>

<configuration>

    <system.webServer>

        <staticContent>

            <mimeMap fileExtension=".json" mimeType="application/json" />

                </staticContent>

    </system.webServer>

</configuration>

Since we're using Azure Websites to host the docs, which IIRC is running on IIS, we should be able to slap that configuration at the root of the website and fix it that way.

@Aaronontheweb
Copy link
Member Author

@Aaronontheweb
Copy link
Member Author

Trying this out on another project where we use a similar DocFx setup to Akka.NET

@Aaronontheweb
Copy link
Member Author

Also going to need to enable a specific DocFx step in order to get this working: dotnet/docfx#2679 (comment)

@Aaronontheweb
Copy link
Member Author

(that step produces the index.json)

@mmisztal1980
Copy link
Contributor

@Aaronontheweb I can have a look at this. Where are the search bar & the index.json located in code?

@mmisztal1980
Copy link
Contributor

I've forked & cloned the docs site repo. However I've run into this:

grunt
Loading "sync.js" tasks...ERROR
>> TypeError: Cannot read property 'length' of undefined
Loading "livereload.js" tasks...ERROR
>> TypeError: Cannot read property 'prototype' of undefined
Warning: Task "sync" not found. Use --force to continue.

Can anyone advise how to get past that? Unfortunately grunt is not my speciality (I'm more of a gulp/webpack person).

@mmisztal1980
Copy link
Contributor

Also, I seem to be unable to locate the docfx.json to add the ExtractSearchIndex postprocessor...

@sean-gilliam
Copy link
Member

The old documentation repo located at (https://github.com/akkadotnet/getakka.net) has been abandoned and is only there for legacy / information purposes.
It was a pain to work with, used a for pay 3rd party theme, and was in desperate need of a facelift.

So we ported everything over to using DocFx and is now located in our main repo (https://github.com/akkadotnet/akka.net/tree/dev/docs).
That's where you'll find the docfx.json file.

@akkadotnet/core We should probably put a huge disclaimer on the old repo and point them to the docfx stuff.

@mmisztal1980
Copy link
Contributor

@sean-gilliam can you tell me how do I run the site locally to test the fix? Is this a static site served from IIS?

@Aaronontheweb
Copy link
Member Author

If you clone the main repo, just need to run serve-docs.cmd and that will build the website. Make sure you run build.cmd buildrelease first so the binaries are up to date.

mmisztal1980 added a commit to mmisztal1980/akka.net that referenced this issue Sep 14, 2018
Aaronontheweb pushed a commit that referenced this issue Sep 18, 2018
@Aaronontheweb Aaronontheweb added this to the 1.3.10 milestone Sep 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants