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

Dev docs build #67

Closed
richardjgowers opened this issue Jun 7, 2020 · 23 comments
Closed

Dev docs build #67

richardjgowers opened this issue Jun 7, 2020 · 23 comments

Comments

@richardjgowers
Copy link
Member

I was going to poke one of the Gsoc students to write docs on their feature, but the feature won’t ship for a while. Am I right that the user guide is published instantly? And how much of a hassle would it be to have a dev/master split like we have on the main repo, with dev pushing to a different location? I think @orbeckst had thoughts along these lines too...

@lilyminium probably know something here

@lilyminium
Copy link
Member

lilyminium commented Jun 7, 2020

Yeah, @orbeckst and I talked about this briefly in another issue. When I was doing GSoD I kept (and still have) a little in-development version on my own fork but we should have an official "dev" version of our own.

@orbeckst suggested names like UserGuideDev, DevUserGuide, LatestUserGuide; it might be neater if you just have a subdomain for dev.mdanalysis.org/docs and dev.mdanalysis/userguide.

@lilyminium
Copy link
Member

lilyminium commented Jun 7, 2020

He also brought up RTD versioning which I was going to look into but have not yet -- this would be really useful for people who need a particular version of MDA.

Edit: and having that for docs too would be ideal, actually

@richardjgowers
Copy link
Member Author

Hm, we're using a travis deploy action, but then we can only associate one site with one repo, so not sure if we can have 2 different builds from one repo.

@lilyminium
Copy link
Member

lilyminium commented Jun 7, 2020

I checked out RTD versioning. Not sure how releases work just yet -- although latest is pegged to master, I think if develop is default, latest can point to develop -- but you can build different docs for different branches. I've got one up for an "rtd" branch here at https://mdanalysisuserguide.readthedocs.io/en/rtd/

Also unsure how it works with directories just yet, but you could point to a subdomain and have userguide.mdanalysis.org/en/latest and userguide.mdanalysis.org/en/develop

Edit: if we're going with the RTD I'll merge #68

@richardjgowers
Copy link
Member Author

So looks like using RTD allows us to build multiple branches at the "cost" of having a small advert in the sidebar? Seems like a good idea

@richardjgowers
Copy link
Member Author

Or wait, we can have the dev docs built on RTD with the current setup (gh-pages) for stable docs?

@orbeckst
Copy link
Member

orbeckst commented Jun 7, 2020 via email

@lilyminium
Copy link
Member

It looks like he just builds docs and puts them in a $version subdirectory that gets copied to AWS, which is probably what RTD does under the hood as well.

I don't really have a problem with advertising RTD if it helps us out, though -- why would you prefer AWS? It's not free, which is a 55c/version/year argument in favour of RTD :-)

@orbeckst
Copy link
Member

orbeckst commented Jun 8, 2020 via email

@lilyminium
Copy link
Member

Both AWS and RTD can point to other domains. I don't know how your site manages subdirectories but if you're open to subdomains, that's just a CNAME record away: http://mdauserguide.minium.com.au/en/rtd/

@lilyminium
Copy link
Member

lilyminium commented Jun 8, 2020

To clarify, that's still being hosted on RTD though, not GitHub. I don't think RTD can set the main domain to a directory like mdanalysis.org/UserGuide/. But it is kind of nice having $thing.mdanalysis.org/$version

And RTD issues free SSL certificates for HTTPS but that takes an hour.

edit: https://mdauserguide.minium.com.au/en/rtd/

@lilyminium
Copy link
Member

Sorry for the spam -- just copying docs into the version subfolder on gh-pages should be easily integratable into Travis, though, with keep_history: true. Then the URL just becomes mdanalysis.org/UserGuide/$subfolder . You could either add a new index.html with all the versions or redirect from mdanalysis.org/UserGuide to mdanalysis.org/UserGuide/latest.

@orbeckst
Copy link
Member

orbeckst commented Jun 9, 2020

If we can keep things without ads then I'd be happiest (also, not having to figure out how to fix RTD when it breaks is a bonus). Can we do mdanalysis.org/UserGuide/$version in this way?

For userguide.mdanalysis.org/$version: If we need to do RTD: I think we can easily create new CNAMEs – what else is necessary?

(Our SSL certificates are free from CloudFlare IIRC... need to check.)

@orbeckst
Copy link
Member

FYI: https://github.com/MDAnalysis/MDAnalysis.github.io/wiki/DNS – When the DNS was using GoDaddy (registrar) nameservers, we had a whole bunch of A name records that "subdomain-forwarded" to specific sites/directories. The subdomain-forward was GoDaddy service that used A records to their servers. When we moved to Cloudflare (mainly for the free SSL cert), the specific "forwarding" only remained it place for unencrypted http and not https. Cloudflare provides rules ("Pagerules") that can be used for forwarding such as the (still working) https://docs.mdanalysis.org ; however, on the free plan we only have 3 free pagerules and we are currently using 2 (for docs and help) and we used 1 for the workshop. See details on the wiki page.

I am sure that this could all be improved.

It's not a problem to set up new CNAMEs.

@lilyminium
Copy link
Member

Thanks for the link @orbeckst! So if I'm reading this correctly, you already have subdomains set up that redirect to the subdirectories? I'm a bit confused because nothing is resolving/redirecting for me other than docs.mdanalysis.org, even over HTTP; and the user guide serves directly to mdanalysis.org/UserGuide (by, I'm guessing, taking advantage of the organisation site repository -> subdirectory naming arrangement?)

I wonder if you could change the URL of the user guide to userguide.mdanalysis.org and have it available both there and mdanalysis.org/UserGuide ? That would be the best of both worlds.

Either way

Can we do mdanalysis.org/UserGuide/$version

yes we can, I have a corresponding PR in the main repo, so it's much of a muchness which URL to access the docs at.

@orbeckst
Copy link
Member

So if I'm reading this correctly, you already have subdomains set up that redirect to the subdirectories?

Only https://docs.mdanalysis.org (and https://workshop.mdanalysis.org but that was really meant to be temporary) redirects properly. None of the others do it correctly (only http does it for some, https does not work). I am inclined to scrap all of them and replace them with a CNAME-based scheme instead of something that relies on magic rules at the DNS provider. (Adding 5 additional page-rules would cost $5/month at Cloudflare and although not enormous in cost, any continuous costs are an annoyance.)

@orbeckst
Copy link
Member

For a start, I removed all non- or only half-working subdomain redirects.

I also invited @lilyminium and @richardjgowers as admins for the cloudflare DNS account so that you can have a look for yourself.

@lilyminium
Copy link
Member

lilyminium commented Jun 18, 2020

@orbeckst I'm going add a CloudFlare pagerule to redirect docs.mdanalysis.org/additional/paths/here to docs.mdanalysis.org/2.0.0-dev0/additional/paths/here for now. All the links that Google puts on the front page (from the old url) do not redirect and that is quite annoying.

Screenshot 2020-06-19 at 9 42 41 AM

Please let me know if I should undo it!

@orbeckst
Copy link
Member

orbeckst commented Jun 18, 2020 via email

lilyminium added a commit that referenced this issue Jun 28, 2020
- A PR merged into "master" or "develop" will generate docs (as a step towards #67)
- The script moves the HTML files into version subdirectories
- Sitemap index and versions.json file generated / updated
- added redirect stubs to the root directory to point to the latest release
- most importantly doesn't wipe the CNAME every time a PR is merged
lilyminium added a commit that referenced this issue Jul 8, 2020
- A PR merged into "master" or "develop" will generate docs (as a step towards #67)
- The script moves the HTML files into version subdirectories
- Sitemap index and versions.json file generated / updated
- added redirect stubs to the root directory to point to the latest release
- most importantly doesn't wipe the CNAME every time a PR is merged
@orbeckst
Copy link
Member

@lilyminium it would be nice if the User Guide also had a 2.0.0-dev version link in the version selector.

I have no idea where its develop version lives (if it exists at all) because the obvious https://userguide.mdanalysis.org/dev/ redirects to https://userguide.mdanalysis.org/1.0.0/index.html.

@lilyminium
Copy link
Member

It did not previously exist but does now. Give this a try?

The develop version of the UG installs the develop version of MDAnalysis, so notation of new features should be made to develop; the master version of the UG installs the latest release (not 1.0.1-dev).

@orbeckst
Copy link
Member

Great, thank you!

@orbeckst
Copy link
Member

I would consider this issue closed.

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

No branches or pull requests

3 participants