Re: [PATCH] Enhance org-html--build-meta-info

2020-12-15 Thread Timothy E Chapman
Hi Tom,

> Why not just use #+html_head:
> possibly with a macro to fill in variable values? That is fully
> extensible and doesn't overload keywords. For title, date, author,
> etc. those can have clearly defined mappings to the html, but
> everything else seems to be handled more sanely with #+html_head:. Am
> I missing something?

I doubt the use case that prompted me to make this an option is the
only one that would benefit, but it should give you an example of the
potential utility of this.

There's some metadata I /always/ want added to my exported documents.
Some of it is static (e.g. ("name" "theme-color" "#77aa99")), but I
also have opengraph metadata which is based on the title/author/etc.
See 
https://tecosaur.github.io/emacs-config/config.html#extra-header-content,code--2

I can't imagine any non-irritating way to have this occur without
making use of this exposed functionality, and I doubt I'm the only one
who has something they'd like to do which makes use of this.

Thanks to the code cleanup / refactoring in the first commit, this
option is pretty trivial to expose, so I thought why not!

Does this help clarify the purpose to you?

Timothy.

p.s.I'd rather not have to copy-paste (evern by template expansion)
several lines like this into every file I export :cry:

#+HTML_HEAD: {{{meta_maybe_description}}}
#+MACRO: meta_maybe_description (eval (let ((description (delq nil
(org-element-map (org-element-parse-buffer) 'keyword (lambda (kw)
(when (string= "SUBTITLE" (org-element-property :key kw))
(org-element-property :value kw))) (if description (format "" (replace-regexp-in-string "\""
"" (org-html-encode-plain-text description ""))

When I could just have this in my config:

(when (org-string-nw-p (plist-get info :description))
   (list "name" "description"
 (plist-get info :description))

Timothy E Chapman
tecos...@gmail.com
tecosaur.com


On Wed, 16 Dec 2020 at 12:13, Tom Gillespie  wrote:
>
> A question from the slightly uninformed. Why not just use #+html_head:
> possibly with a macro to fill in variable values? That is fully
> extensible and doesn't overload keywords. For title, date, author,
> etc. those can have clearly defined mappings to the html, but
> everything else seems to be handled more sanely with #+html_head:. Am
> I missing something? Best,
> Tom



Re: The Website Revamp: The final stretch

2020-09-23 Thread Timothy E Chapman
Hi Bastien,

Just remembered I haven't addressed everything you mentioned here.

Bastien  wrote:

> Also, let's remove the mini-unicorn in the top bar, it is redundant
> and reminds me of the opening of IT Crowd.

Ah yes, I see the resemblance :P I'm not sure this is a good idea though, as
while this can be seen as redundant on the homepage, the navbar is used on
every page. Considering that this is a site to help people learn about Org,
I think that the visual consistency of having it on every page, and
how that helps reinforce the association between Org and that logo is worth it.
Having it regularly appear should help it stick.

> - I believe there are too many pages: I'd love the website to be just
>   one HTML page.  Rich contents should go to Worg and yes, we need to
>   upgrade Worg's design too. Let's try moving such contents to Worg as
>   soon as we can -- but this is not a blocker for the switch.

I think a single page might be a bit further than ideal, as I see it a
'core' of static pages
for orgmode.org would be
 - index/homepage
 - features
 - quickstart
 - install

How does that sound to you? Of course, all of this migration to Worg
can happen after an iniIal switch.

> - For the manual, I'd prefer to use the same design that the one used
>   on the gnu.org website:

This is quite easy (and not actually part of this branch), I think we
just need to pass
--css-ref "https://www.gnu.org/software/emacs/manual.css;
to the makeinfo/texi2any/texi2html command in
https://code.orgmode.org/bzg/org-mode/src/master/doc/Makefile

All the best,

Timothy.