Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [RFC] Reinstating old-school GLEPs masterplan
Date: Tue, 12 Sep 2017 14:12:44
Message-Id: 1505225554.2123.20.camel@gentoo.org
In Reply to: Re: [gentoo-dev] [RFC] Reinstating old-school GLEPs masterplan by Daniel Campbell
1 W dniu wto, 12.09.2017 o godzinie 00∶07 -0700, użytkownik Daniel
2 Campbell napisał:
3 > On 09/11/2017 01:56 PM, Michał Górny wrote:
4 > > W dniu pon, 11.09.2017 o godzinie 13∶29 -0400, użytkownik Michael
5 > > Orlitzky napisał:
6 > > > On 09/11/2017 01:08 PM, Michał Górny wrote:
7 > > > > Hi,
8 > > > >
9 > > > > TL;DR: I'd like to reinstate the old-school GLEPs in .rst files rather
10 > > > > than Wiki, put in a nice git repo.
11 > > > >
12 > > >
13 > > > I generally agree with you that wiki markup is terrible and that a text
14 > > > editor and a git repo is The Right Way to do things (with Jekyll or
15 > > > whatever to push it to the web). But in my experience, crappy and easy
16 > > > is a better way to get people to contribute. When I've taken wiki
17 > > > documents and moved them into git repos, more often than not I become
18 > > > the sole contributor, and otherwise-technical people just start emailing
19 > > > me their contributions (which decrease greatly in frequency).
20 > >
21 > > Rich already answered this in detail, so I'll skip it.
22 > >
23 > > > Will it be possible to build the GLEP rst files locally, and view the
24 > > > output exactly as it would appear on the website? I ask because, so long
25 > > > as you don't want to be able to preview the result, you can already
26 > > > write MediaWiki markup into a text file locally. The offline "live
27 > > > preview" ability is the killer feature of RST as I see it.
28 > >
29 > > Of course yes. However, the exactness of result depends on how much
30 > > effort you put into it.
31 > >
32 > > The 'easy way' is rst2html.py (dev-python/docutils). It will give you
33 > > a rough rendering with a standard style, i.e. kinda ugly but enough to
34 > > see if everything works as expected. You'll also see the preamble as big
35 > > mumbo-jumbo on top.
36 > >
37 > > Then, there's glep.py (dev-python/docutils-glep) which adds preamble
38 > > parsing, table of contents and some styling. AFAICS it needs a bit
39 > > handiwork (copying a stylesheet to a relative directory) but it gives
40 > > nice old-school rendering.
41 > >
42 > > Then, you can just take www.gentoo.org and run it locally. It takes
43 > > a little more effort but jekyll is really trivial to set up and run
44 > > locally. Then you see it exactly how it's gonna look on g.o.
45 > >
46 > > As a side note, we may also rename GLEPs to .rst. Then, GitHub will also
47 > > provide out-of-the-box rendering of them.
48 > >
49 >
50 > To preface, I really like the idea to do this in Git. Much as I
51 > appreciate what the wiki team has done, collaboration isn't quite as
52 > smooth on it and as another person mentioned, it's hard to get reviews,
53 > so you get to choose to leave something in your userspace (I liked your
54 > Drafts namespace idea, fwiw) or edit a page anyway and hope for the best.
55 >
56 > That said... Is it wise to rely on Ruby (via Jekyll) for critical
57 > reference documents, given how often minor version bumps in Ruby disrupt
58 > its ecosystem?
59
60 The point of using ReST (i.e. an established markup) and git
61 (established VCS) is to avoid depending on any particular software to
62 get things working, and to make it easy to replace the guts
63 as necessary.
64
65 Jekyll is what infra uses at the moment, so I see no reason to reinvent
66 the wheel just to prove the point.
67
68 > Do we really need the entire www.gentoo.org repository in
69 > order to view and hack on GLEPs?
70
71 No, you don't.
72
73 > I see little reason for GLEPs to not be
74 > in their own repository, depending on something more stable than Jekyll
75 > and Ruby.
76
77 They are, and they don't depend on Ruby at all. In fact, you can view
78 them using a line printer if you like.
79
80 > Given that the doc tools themselves are written in Python, it
81 > makes more sense (imo) to leverage Gentoo's existing technical
82 > investment in Python and use something like app-text/pelican, which is
83 > equally, if not more capable than Jekyll and will not require pulling in
84 > Ruby just to hack on and preview some text. Every Gentoo system comes
85 > with Python unless you go off the beaten path and know what you're
86 > doing, so that's a bonus, too.
87
88 See the first part of my reply to R0b0t1.
89
90 > Of course, this changes if we need some extremely advanced behavior. I'm
91 > not sure how easy it is to build a Pelican plugin, but there's an entire
92 > repo full of them. [1] Pelican also uses a Makefile you can hack on
93 > (even multiple publishing targets), and supports GNU gettext for
94 > translations.
95 >
96 > Or is Jekyll chosen purely because the current website is built with it?
97 > In that case, it at least makes sense despite the heavyweight dependencies.
98
99 That's exactly the point. I'm sorry, I thought it was obvious from what
100 I have written.
101
102 > If anyone's interested in seeing a mockup of a few GLEPs in Pelican, I
103 > can get that started.
104
105 You sure can. However, I have serious doubts about the value of
106 establishing yet another framework for a single thing that nobody will
107 afterwards use or maintain. See SMW.
108
109 >
110 > Whether or not the structure works on GitHub is orthogonal to the
111 > decision. Still, put me down in favor of switching to Git. Thanks for
112 > putting together the proposal.
113 >
114 > [1]: https://github.com/getpelican/pelican-plugins
115
116 --
117 Best regards,
118 Michał Górny