emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Some links in online manual do not work


From: Max Nikulin
Subject: Re: Some links in online manual do not work
Date: Wed, 12 Oct 2022 12:14:23 +0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2

On 12/10/2022 11:11, Bastien Guerry wrote:
Max Nikulin writes:

If redirection directives were included as separate files then it
would be possible to just check them by a command like

     awk '{ if ($NF >= 3) print $3; }' /tmp/manual.txt  |
         xargs --replace -- \
         curl --head --write-out '%{http_code} %{url_effective}\n' \
             --silent --show-error --output /dev/null \
             'https://orgmode.org/manual/{}'

https://git.sr.ht/~bzg/worg/tree/master/item/nginx.conf contains the
list of redirections -- the checks could be done from here, right?

It is not hard to copy text from nginx.conf to separate text files. Implementing nginx parser to filter only manual or just guide rules is more tricky. My opinion, the following structure is even more convenient to maintain:

nginx.conf:
# ...
    rewrite ^/list(.*) https://list.orgmode.org$1 permanent;

    location /manual {
        include manual-rewrite.inc;
    }
    location /guide {
        include guide-rewrite.inc;
    }
}
# ...

manual-rewrite.inc:

rewrite /Add_002don-packages\.html Add_002don-Packages.html permanent;
rewrite /Adding-export-back_002dends\.html Adding-Export-Back_002dends.html permanent;
rewrite /Adding-hyperlink-Types\.html Adding-Hyperlink-Types.html permanent;
# ...

I suggested it assuming tracking of changes in the manual. If you are against it then this list is almost static and regular check is less important. However it might catch removing of a section that is a redirection target.

Original proposal to add redirections contained an s-expression with
mappings. I would consider tracking it in the main Org repository. I
believe, list of info nodes in the released manual should be added to
it as known names.

I'm not sure I understand.  Nothing should be added to the main Org
repository to fix a problem with the orgmode.org website, even if it
is a problem with the HTML manual as produced from org-mode.git.

I do not insist. The idea was to put a file that is tightly bound to contents and edit history of manual close to the source of the docs since a script that can detect necessary changes requires list of HTML files generated from org-manual.org.

But more complex rewrite rules (from old manual nodes to new ones) is
IMHO calling for trouble. What if we split the "Properties and Column"
manual page into "Properties" and "Columns"?  Where to redirect?

From my point of view, any variant is better than 404. Alternatively redirection target may be an anchor to any of the new items in the table of contents.

Thank you for restoring rewrite rules. After earlier Tim's messages I was quite pessimistic believing that such attempt of improvement was buried.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]