Sébastien Gendre <s...@k-7.ch> writes:

> Attached to this e-mail you could find a small patch for the HTML export
> backend.
>
> This patch add an in-file option for enabling headlines self link.

Thanks for the patch!

> Until now, to add a self link on each headline in the HTML export, user
> needed to set the variable `org-html-self-link-headlines' to a non-nil
> value.
> ...
>     #+options: html-self-link-headlines:nil

This makes sense.
In fact, it may be a good idea to go through all the built-in backends
and provide OPTIONS/KEYWORD values for more export options.

> --- a/doc/org-manual.org
> +++ b/doc/org-manual.org
> @@ -13617,9 +13617,17 @@ Headlines are exported to =<h1>=, =<h2>=, etc.  Each 
> headline gets the
>  see [[*Internal Links]].
>  
>  #+vindex: org-html-self-link-headlines
> -When ~org-html-self-link-headlines~ is set to a non-~nil~ value, the
> -text of the headlines is also wrapped in =<a>= tags.  These tags have
> -a =href= attribute making the headlines link to themselves.
> +Headlines can contain a link to themselves. To enable it, you have 2 ways:
> +
> +- Set the variable ~org-html-self-link-headlines~ to a non-~nil~ value
> +- In an org-mode file, use an =OPTIONS= line to set

=#+OPTIONS= keyword would be more in line with our terminology.
An example would be even better.

Also, please use double space between sentences.

> +  =html-self-link-headlines= to a non-~nil~ value

Please use ~html-self-link-headlines~ for code markup. See 
doc/Documentation_Standards.org

> +*** ox-html: Headline self links can be enabled from an Org-mode file
> +
> +Previously HTML export could add, to each headline, a link to itself.
> +To enable it, you had to use the variable
> +~org-html-self-link-headlines~.
> +
> +Now, it's also possible to enable it per Org-mode file.  By adding
> +~html-self-link-headlines:t~ to =#+OPTION=.

#+OPTIONS
I'd also add example instead of describing in plain text.
Something like

Now, it's also possible to enable it per Org-mode file:
: #+OPTIONS: html-self-link-headlines:t

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

Reply via email to