pursuit icon indicating copy to clipboard operation
pursuit copied to clipboard

Make it offline capable

Open adius opened this issue 7 years ago • 10 comments

I would like to be able to read the pursuit documentation when I'm offline (e.g. train). So it would be cool to be able to easily host it on a laptop. There are, however, some issues at the moment, that need to be fixed to make it work (and easier to set up):

  • [ ] Remove hard-coded references to https://pursuit.purescript.org
  • [ ] Simplify adding the backup repository
  • [ ] Remove usage of CDNs
  • [ ] Pre-built binaries to make the installation easier and faster

For checking my work in progress it would also be cool to:

  • [ ] Simplify adding private local projects

adius avatar Jan 27 '18 21:01 adius

I think what you're getting at is something worthwhile and which I'd be interested in, but this really needs a more detailed proposal with context, what you're trying to do, why each of these things is necessary, etc.

hdgarrood avatar Jan 27 '18 21:01 hdgarrood

@hdgarrood I extended the description. Anything missing?

adius avatar Jan 27 '18 22:01 adius

Where are we using CDNs? Also we do have prebuilt binaries; check the "releases" tab.

Are you aware of pulp docs -- --format html? If that doesn't cover what you need, can you explain why not?

hdgarrood avatar Jan 27 '18 22:01 hdgarrood

Where are we using CDNs

  • https://github.com/purescript/pursuit/blob/92463dd9b1b3230614ca0b5d01279980dc86d384/templates/default-layout-wrapper.hamlet#L20
  • https://github.com/purescript/pursuit/blob/8eacec20d113ee5631431bc2604bd6a10f478f2d/templates/analytics.julius#L7

Also we do have prebuilt binaries; check the "releases" tab.

Good point!

pulp docs -- --format html

Would b a little cumbersome to run it for each package on pursuit, right? Furthermore I also would like to use the search engine of Pursuit offline.

adius avatar Jan 27 '18 23:01 adius

Also: The pre-built binaries only work on Linux. And even then I get following error (run in docker): ./pursuit: error while loading shared libraries: libgmp.so.10: cannot open shared object file: No such file or directory

adius avatar Jan 27 '18 23:01 adius

If you run pulp docs -- --format html in your project directory you’ll get pursuit style html docs for everything in your project, including dependencies.

hdgarrood avatar Jan 28 '18 00:01 hdgarrood

That wouldn’t address the searching issue though, that’s a good point.

hdgarrood avatar Jan 28 '18 00:01 hdgarrood

The google analytics snippet hasn't actually ever been used AFAIK so I'm happy to just remove that (along with the config option which toggles it off or on). I don't think I'd want to have it on in production anyway. I'd also be happy to receive a PR which removes the use of google's fonts API in favour of hosting the fonts locally, provided that we comply with the license terms properly (Roboto and Roboto Mono are Apache-2.0 so this shouldn't be too hard).

hdgarrood avatar Jan 28 '18 14:01 hdgarrood

Is there a proper way now to run pursuit offline? I tried cloning the project, installing haskell and following the readme but I'm getting some errors. I'm not yet familiar with haskell though so I couldn't resolve them.

sevillaarvin avatar Apr 22 '21 12:04 sevillaarvin

FYI, spago provides the docs subcommand to render a project-local Pursuit. See the Generate documentation for my project section.

equt avatar Jul 07 '21 06:07 equt