user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [PATCH 3/3] wwwtext: config comment improvements
  2020-09-09 21:23  7% [PATCH 0/3] wwwtext: minor config example tweaks Eric Wong
@ 2020-09-09 21:23  7% ` Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2020-09-09 21:23 UTC (permalink / raw)
  To: meta

Use the full URL of the inbox being mirrored to reduce ambiguity
(instead of just the inbox name).

Using asymmetric quotes (e.g `foo') improves readability for me
in that it's more obvious when a quote begins and ends.  It also
lights up fewer pixels and reduces visual noise compared to
double-quotes.

We'll also reflow the `mainrepo' vs `inboxdir' comment slightly
to emphasize the word `instead'.
---
 lib/PublicInbox/WwwText.pm | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/lib/PublicInbox/WwwText.pm b/lib/PublicInbox/WwwText.pm
index 99aec370..04c9b1c4 100644
--- a/lib/PublicInbox/WwwText.pm
+++ b/lib/PublicInbox/WwwText.pm
@@ -139,14 +139,16 @@ sub inbox_config ($$$) {
 	push @$hdr, 'Content-Disposition', 'inline; filename=inbox.config';
 	my $name = dq_escape($ibx->{name});
 	my $inboxdir = '/path/to/top-level-inbox';
+	my $base_url = $ibx->base_url($ctx->{env});
 	$$txt .= <<EOS;
-; example public-inbox config snippet for "$name"
-; see public-inbox-config(5) manpage for more details:
+; Example public-inbox config snippet for a mirror of
+; $base_url
+; See public-inbox-config(5) manpage for more details:
 ; https://public-inbox.org/public-inbox-config.html
 [publicinbox "$name"]
 	inboxdir = $inboxdir
-	; note: public-inbox before v1.2.0 used "mainrepo"
-	; instead of "inboxdir", both remain supported after 1.2
+	; note: public-inbox before v1.2.0 used `mainrepo' instead of
+	; `inboxdir', both remain supported after 1.2
 	mainrepo = $inboxdir
 	url = https://example.com/$name/
 	url = http://example.onion/$name/
@@ -156,7 +158,6 @@ EOS
 		$$txt .= "\t$k = $_\n" for @$v;
 	}
 	if (my $altid = $ibx->{altid}) {
-		my $base_url = $ibx->base_url($ctx->{env});
 		my $altid_map = $ibx->altid_map;
 		$$txt .= <<EOF;
 	; altid DBs may be used to provide numeric article ID lookup from

^ permalink raw reply related	[relevance 7%]

* [PATCH 0/3] wwwtext: minor config example tweaks
@ 2020-09-09 21:23  7% Eric Wong
  2020-09-09 21:23  7% ` [PATCH 3/3] wwwtext: config comment improvements Eric Wong
  0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2020-09-09 21:23 UTC (permalink / raw)
  To: meta

Just a couple of things which hopefully makes things easier
for newbies...

Eric Wong (3):
  wwwtext: describe the use of `coderepo' entries
  wwwtext: don't blindly quote "git clone" destination
  wwwtext: config comment improvements

 lib/PublicInbox/WwwText.pm | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)


^ permalink raw reply	[relevance 7%]

Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2020-09-09 21:23  7% [PATCH 0/3] wwwtext: minor config example tweaks Eric Wong
2020-09-09 21:23  7% ` [PATCH 3/3] wwwtext: config comment improvements Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).