From martin at no.ucant.org Tue Jun 4 14:03:46 2013 From: martin at no.ucant.org (Martin Keegan) Date: Tue, 4 Jun 2013 14:03:46 +0100 (BST) Subject: [ocaml-infra] staging site for ocaml.org In-Reply-To: Message-ID: On Fri, 31 May 2013, Ashish Agarwal wrote: > We don't have a dev preview site. How about pushing to the gh-pages branch > of your fork on github? Doesn't that just push the source template / content data, rather than the compiled HTML you get after running "make"? Mk -- Martin Keegan, @mk270, +44 7779 296469, http://mk.ucant.org/ From martin at no.ucant.org Tue Jun 4 14:18:10 2013 From: martin at no.ucant.org (Martin Keegan) Date: Tue, 4 Jun 2013 14:18:10 +0100 (BST) Subject: [ocaml-infra] staging site for ocaml.org In-Reply-To: <20130530.223251.1974635567565425810.Christophe.Troestler@umons.ac.be> Message-ID: On Thu, 30 May 2013, Christophe TROESTLER wrote: > Even though we are thinking to move to, say, Markdown, that won't > change much w.r.t. that "problem". The website is mostly static but > some things have to be automated. You can use your github account to > display the generated pages. Ah didn't see this message, and didn't realise the generated pages made it to github. How does that work? Incidentally, I am going to be back in the UK, a few hundred yards from the Computer Lab on Friday; if someone based there could spare me a few minutes of time to discuss how "drive by" contributions could be made easier, it'd be much appreciated. Anyway, I think a move to Markdown would be very good from the perspective of widening the base of contributors of content. I've just migrated fifteen years of HTML cruft in my personal website to Markdown, with remarkably little hassle; what this revealed was that a couple of items couldn't be conveniently supported by Markdown - I expect ocaml.org has its own, such as the 99 exercises code. Mk -- Martin Keegan, @mk270, +44 7779 296469, http://mk.ucant.org/ From anil at recoil.org Tue Jun 4 14:20:57 2013 From: anil at recoil.org (Anil Madhavapeddy) Date: Tue, 4 Jun 2013 14:20:57 +0100 Subject: [ocaml-infra] staging site for ocaml.org In-Reply-To: References: Message-ID: <21EEADF3-4598-4AD5-860E-C3E60FD6FE22@recoil.org> On 4 Jun 2013, at 14:18, Martin Keegan wrote: > On Thu, 30 May 2013, Christophe TROESTLER wrote: > >> Even though we are thinking to move to, say, Markdown, that won't >> change much w.r.t. that "problem". The website is mostly static but >> some things have to be automated. You can use your github account to >> display the generated pages. > > Ah didn't see this message, and didn't realise the generated pages made it > to github. How does that work? > > Incidentally, I am going to be back in the UK, a few hundred yards from > the Computer Lab on Friday; if someone based there could spare me a few > minutes of time to discuss how "drive by" contributions could be made > easier, it'd be much appreciated. Definitely; I'll take this off-list. > Anyway, I think a move to Markdown would be very good from the perspective > of widening the base of contributors of content. I've just migrated > fifteen years of HTML cruft in my personal website to Markdown, with > remarkably little hassle; what this revealed was that a couple of items > couldn't be conveniently supported by Markdown - I expect ocaml.org has > its own, such as the 99 exercises code. Agreed. We've had pretty good success with writing most of Real World OCaml in Markdown, with some OCaml scripts to massage the resulting DocBook and other output formats. -anil From agarwal1975 at gmail.com Tue Jun 4 14:22:56 2013 From: agarwal1975 at gmail.com (Ashish Agarwal) Date: Tue, 4 Jun 2013 15:22:56 +0200 Subject: [ocaml-infra] staging site for ocaml.org In-Reply-To: References: Message-ID: On Tue, Jun 4, 2013 at 3:03 PM, Martin Keegan wrote: Doesn't that just push the source template / content data, rather than the > compiled HTML you get after running "make"? > The trick is to make gh-pages an orphan branch: https://help.github.com/articles/creating-project-pages-manually You then push the compiled site to this branch. See the 'publish' target in the Makefile. You'll want to do almost the same thing, with a few changes: * Skip the first 2 steps. These make sure I'm publishing the latest commit on the 'publish' branch in the master repo. Since you'll be experimenting, you'll want to compile whatever local commit you're on. * In the clone step, change the URL to your own fork. Maybe we should add a 'publish-dev' target that does this, but we'll have to decide how to set the URL to your personal fork. -------------- next part -------------- An HTML attachment was scrubbed... URL: From agarwal1975 at gmail.com Tue Jun 4 14:27:42 2013 From: agarwal1975 at gmail.com (Ashish Agarwal) Date: Tue, 4 Jun 2013 15:27:42 +0200 Subject: [ocaml-infra] staging site for ocaml.org In-Reply-To: References: <20130530.223251.1974635567565425810.Christophe.Troestler@umons.ac.be> Message-ID: On Tue, Jun 4, 2013 at 3:18 PM, Martin Keegan wrote: a couple of items couldn't be conveniently supported by Markdown Can you describe these. I expect ocaml.org has its own, such as the 99 exercises code. > That's exactly the page I'd like to see tested under Markdown because it is the most likely to be problematic. On the other hand, you can simply include html when needed, so there's always a fallback. -------------- next part -------------- An HTML attachment was scrubbed... URL: From martin at no.ucant.org Tue Jun 4 14:50:55 2013 From: martin at no.ucant.org (Martin Keegan) Date: Tue, 4 Jun 2013 14:50:55 +0100 (BST) Subject: [ocaml-infra] staging site for ocaml.org In-Reply-To: Message-ID: On Tue, 4 Jun 2013, Ashish Agarwal wrote: > The trick is to make gh-pages an orphan branch: > https://help.github.com/articles/creating-project-pages-manually > > You then push the compiled site to this branch. See the 'publish' target in > the Makefile. You'll want to do almost the same thing, with a few changes: Ok, but this entails having the Ocaml toolchain installed on your internet-facing server. Mine (which runs Debian squeeze) didn't have this. It took literally 25 minutes to get all the necessary stuff (a recent Ocaml compiler, opam, oasis, etc) installed before I could run "make" in the ocaml.org directory. That's probably enough effort to deter at least some potential contributors. Mk -- Martin Keegan, @mk270, +44 7779 296469, http://mk.ucant.org/ From agarwal1975 at gmail.com Tue Jun 4 14:55:05 2013 From: agarwal1975 at gmail.com (Ashish Agarwal) Date: Tue, 4 Jun 2013 15:55:05 +0200 Subject: [ocaml-infra] staging site for ocaml.org In-Reply-To: References: Message-ID: On Tue, Jun 4, 2013 at 3:50 PM, Martin Keegan wrote: Ok, but this entails having the Ocaml toolchain installed on your > internet-facing server. I'm not following. You need OCaml to compile the site, which is simply your dev machine. You don't need any server. -------------- next part -------------- An HTML attachment was scrubbed... URL: From martin at no.ucant.org Tue Jun 4 15:06:53 2013 From: martin at no.ucant.org (Martin Keegan) Date: Tue, 4 Jun 2013 15:06:53 +0100 (BST) Subject: [ocaml-infra] staging site for ocaml.org In-Reply-To: Message-ID: On Tue, 4 Jun 2013, Ashish Agarwal wrote: > Ok, but this entails having the Ocaml toolchain installed on your > > internet-facing server. > > > I'm not following. You need OCaml to compile the site, which is simply your > dev machine. You don't need any server. I do if I want to get other people's feedback on the compiled site, before sending a pull request. As you note, I could instead use an orphan branch and use github as a server, at the cost of doing the compilation manually on my dev machine, which is fine by me, but feels like it's the wrong way round. Mk -- Martin Keegan, @mk270, +44 7779 296469, http://mk.ucant.org/ From agarwal1975 at gmail.com Tue Jun 4 15:14:13 2013 From: agarwal1975 at gmail.com (Ashish Agarwal) Date: Tue, 4 Jun 2013 16:14:13 +0200 Subject: [ocaml-infra] staging site for ocaml.org In-Reply-To: References: Message-ID: On Tue, Jun 4, 2013 at 4:06 PM, Martin Keegan wrote: but feels like it's the wrong way round. What would the ideal solution be? I don't see how it can be less work than what I've proposed. Are you saying you want avoid compiling the site entirely? -------------- next part -------------- An HTML attachment was scrubbed... URL: From anil at recoil.org Tue Jun 4 15:16:42 2013 From: anil at recoil.org (Anil Madhavapeddy) Date: Tue, 4 Jun 2013 15:16:42 +0100 Subject: [ocaml-infra] staging site for ocaml.org In-Reply-To: References: Message-ID: <00062595-40B8-41FA-9A76-F45A4D8D8EA9@recoil.org> On 4 Jun 2013, at 15:14, Ashish Agarwal wrote: > On Tue, Jun 4, 2013 at 4:06 PM, Martin Keegan wrote: > > but feels like it's the wrong way round. > > What would the ideal solution be? I don't see how it can be less work than what I've proposed. Are you saying you want avoid compiling the site entirely? If compiling a dev version of the site is really so onerous, we could make it one of the staging tasks in the OCamlot bot to compile and push to a staging site. It doesn't seem too hard to just run a one-off OPAM installation though. -anil -------------- next part -------------- An HTML attachment was scrubbed... URL: From martin at no.ucant.org Tue Jun 4 15:24:37 2013 From: martin at no.ucant.org (Martin Keegan) Date: Tue, 4 Jun 2013 15:24:37 +0100 (BST) Subject: [ocaml-infra] staging site for ocaml.org In-Reply-To: <00062595-40B8-41FA-9A76-F45A4D8D8EA9@recoil.org> Message-ID: On Tue, 4 Jun 2013, Anil Madhavapeddy wrote: > If compiling a dev version of the site is really so onerous, we could > make it one of the staging tasks in the OCamlot bot to compile and push > to a staging site. It's not onerous for me - but it is certainly more onerous than a site which is pure markdown and which just needs to be pushed, as the markdown compile is done on the post-receive hook server-side. > It doesn't seem too hard to just run a one-off OPAM installation though. Not hard at all, given that it's just cut-n-paste into the shell, but it took 25 minutes to download and compile all the bits. This is probably too minor a point for us all to be discussing in such detail! :) Mk -- Martin Keegan, @mk270, +44 7779 296469, http://mk.ucant.org/ From anil at recoil.org Tue Jun 4 15:28:50 2013 From: anil at recoil.org (Anil Madhavapeddy) Date: Tue, 4 Jun 2013 15:28:50 +0100 Subject: [ocaml-infra] staging site for ocaml.org In-Reply-To: References: Message-ID: <6C06A025-21D3-45C6-A97E-3E2B0F308FC0@recoil.org> On 4 Jun 2013, at 15:24, Martin Keegan wrote: > On Tue, 4 Jun 2013, Anil Madhavapeddy wrote: > >> If compiling a dev version of the site is really so onerous, we could >> make it one of the staging tasks in the OCamlot bot to compile and push >> to a staging site. > > It's not onerous for me - but it is certainly more onerous than a site > which is pure markdown and which just needs to be pushed, as the markdown > compile is done on the post-receive hook server-side. Jekyll's easy because Github has an installation already -- but not so easy if you have custom plugins, alas! > >> It doesn't seem too hard to just run a one-off OPAM installation though. > > Not hard at all, given that it's just cut-n-paste into the shell, but it > took 25 minutes to download and compile all the bits. Yep -- this should all get easier as a matter of course as binary packages show up for the various new tools such as OPAM. There are even some plans afoot to support binary snapshots of OPAM builds, to make deployments in cloud services easier. For now though, content is king :) -a From agarwal1975 at gmail.com Tue Jun 4 15:35:27 2013 From: agarwal1975 at gmail.com (Ashish Agarwal) Date: Tue, 4 Jun 2013 16:35:27 +0200 Subject: [ocaml-infra] staging site for ocaml.org In-Reply-To: References: <00062595-40B8-41FA-9A76-F45A4D8D8EA9@recoil.org> Message-ID: I see, so you do want to avoid compilation entirely. That would be nice, but that'll be harder to provide and I'm not sure it's worth it. Most people willing to commit a change to ocaml.org probably have OCaml installed. They might not have a few dependencies like Weberizer and ocamlrss, but installing those just takes a few seconds. I can see this still deterring people who want to make small contributions, e.g. fixing a spelling error. However, then you probably don't care to share a compiled dev version of the site. That'll only be useful if you're making larger design changes. On Tue, Jun 4, 2013 at 4:24 PM, Martin Keegan wrote: > On Tue, 4 Jun 2013, Anil Madhavapeddy wrote: > > > If compiling a dev version of the site is really so onerous, we could > > make it one of the staging tasks in the OCamlot bot to compile and push > > to a staging site. > > It's not onerous for me - but it is certainly more onerous than a site > which is pure markdown and which just needs to be pushed, as the markdown > compile is done on the post-receive hook server-side. > > > It doesn't seem too hard to just run a one-off OPAM installation though. > > Not hard at all, given that it's just cut-n-paste into the shell, but it > took 25 minutes to download and compile all the bits. > > This is probably too minor a point for us all to be discussing in such > detail! :) > > Mk > > -- > Martin Keegan, @mk270, +44 7779 296469, http://mk.ucant.org/ > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From amc79 at cam.ac.uk Tue Jun 4 15:50:13 2013 From: amc79 at cam.ac.uk (Amir Chaudhry) Date: Tue, 4 Jun 2013 15:50:13 +0100 Subject: [ocaml-infra] staging site for ocaml.org In-Reply-To: References: Message-ID: On 4 Jun 2013, at 15:24, Martin Keegan wrote: > On Tue, 4 Jun 2013, Anil Madhavapeddy wrote: > >> If compiling a dev version of the site is really so onerous, we could >> make it one of the staging tasks in the OCamlot bot to compile and push >> to a staging site. > > It's not onerous for me - but it is certainly more onerous than a site > which is pure markdown and which just needs to be pushed, as the markdown > compile is done on the post-receive hook server-side. Seems like you're thinking of something more like Jekyll? That works well for GitHub pages but custom scripts are turned off, presumably for security (you can't execute your custom code on their machines). That's fine for simple blog sites but not for anything complex (though people have put together other tools for that [1]). Any staging server would have the same concern so this isn't really Markdown specific. Even in the case of a Jekyll site, if you wanted other people to look at your changes first, you'd still have to have either (1) push it to another github repo where their jekyll installation would run or (2) run jekyll locally and put the www files on a server somewhere. In other words, the steps are largely the same. For ocaml.org, I agree that there is a lot to download and run before you can get to the point of running `make` but we may be able to make that more streamlined over time. >> It doesn't seem too hard to just run a one-off OPAM installation though. > > Not hard at all, given that it's just cut-n-paste into the shell, but it > took 25 minutes to download and compile all the bits. > > This is probably too minor a point for us all to be discussing in such > detail! :) Not at all! I found this exchange pretty useful in terms of understanding what someone was trying to achieve. Thanks for the comments :) [1] http://octopress.org > Mk > > -- > Martin Keegan, @mk270, +44 7779 296469, http://mk.ucant.org/ > > _______________________________________________ > Infrastructure mailing list > Infrastructure at lists.ocaml.org > http://lists.ocaml.org/listinfo/infrastructure