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

SCP-1900: Build combined doc-index.json #2851

Merged
merged 2 commits into from
Mar 11, 2021
Merged

Conversation

silky
Copy link
Contributor

@silky silky commented Mar 11, 2021

Following this example: https://github.com/input-output-hk/ouroboros-network/blob/2068d091bc7dcd3f4538fb76f1b598f219d1e0c8/scripts/haddocs.sh#L87 we add a step after the haddock generation to write a combined doc-index.json so that searching works! Note that for searching to work locally, you need to open the HTML files through a webserver (if we wanted to serve the docs via a webserver I can look into that, perhaps as a separate item?).

Fixes SCP-1900

I'm just assuming this will work when the docs get pushed; I'm hoping I can check this via one of the CI actions?

Pre-submit checklist:

  • Branch
    • Commit sequence broadly makes sense
    • Key commits have useful messages
    • Relevant tickets are mentioned in commit messages
  • PR
    • Self-reviewed the diff
    • Useful pull request description
    • Reviewer requested

Pre-merge checklist:

  • Someone approved it
  • Commits have useful messages
  • Review clarifications made it into the code
  • History is moderately tidy; or going to squash-merge

Following this example:
https://github.com/input-output-hk/ouroboros-network/blob/2068d091bc7dcd3f4538fb76f1b598f219d1e0c8/scripts/haddocs.sh#L87
we add a step after the haddock generation to write a combined
doc-index.json so that searching works! Note that for searching to work
locally, you need to open the HTML files through a webserver.

Fixes SCP-1900.
@silky silky requested a review from j-mueller March 11, 2021 14:43
@j-mueller
Copy link
Contributor

Nice. Unfortunately the docs.site doesn't get deployed anywhere for PRs. If you've checked the generated doc-index.json and it looks sensible, then I'd be willing to just merge it and see if it works on https://playground.plutus.iohkdev.io/tutorial/haddock/index.html ...

@michaelpj
Copy link
Contributor

I look forward to the day we can finally use something like haskell/haddock#1277...

@silky
Copy link
Contributor Author

silky commented Mar 11, 2021

Indeed @michaelpj ; I was amused that when I was searching around for reasonable ways to solve this problem the code I found was from IO already :)

@j-mueller - sounds good :) Indeed I checked that it works (albeit takes a second to load the UI) and takes you to the right spot :) I'm happy to be hopeful it'll work!

image

@michaelpj
Copy link
Contributor

Can we add a comment with where you got it from, so if it stops working we can go steal the updated version instead of trying to work out what that jq invocation is doing? 😁

@silky
Copy link
Contributor Author

silky commented Mar 11, 2021

@michaelpj added

@michaelpj
Copy link
Contributor

👍

@michaelpj michaelpj merged commit 0c1d59c into master Mar 11, 2021
@silky silky deleted the scp-1900-haddock-index branch March 11, 2021 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants