emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: emacs-orgmode@gnu.org
Subject: Re: Is there a variable/way to change <div id="content"> to something else, e.g. <div class="container"> for use with Bootstrap CSS?
Date: Mon, 26 May 2014 10:10:52 +0800	[thread overview]
Message-ID: <87zji5thlf.fsf@ericabrahamsen.net> (raw)
In-Reply-To: 53825499.9030306@gmail.com

Omid <omidlink@gmail.com> writes:

> Hello,
>
> - I am trying to build a statically-generated website purely with Org
>   mode. I would like to use Bootstrap CSS to make the site mobile
>   friendly. Bootstrap uses <div class="container"> for the "main" part
>   of the <body> of HTML; Org mode export produces <div id="content">
>   for that part.
>
>   Is there a variable to set/way to make Org wrap this part in the
>   "container" class?
>
>   Looking at several "apropos" results (with all the search keywords I
>   could think of), I only see a setting for pre/postamble-class:
>
>   org-html--pre/postamble-class
>     Variable: CSS class used for pre/postamble

It would help to know your Org mode version, but I'm pretty sure
org-html-divs has been around for a bit. Check out its docstring, and
modify its second element, which is '(content "div" "content") by
default.

> - Assuming there is no Org-internal way to do this, is there a
>   function that is run after a project is published to that I can,
>   e.g., run a sed script on the HTML files generated? Again, the only
>   remotely relevant result I see in M-x apropos RET org post is
>
>   org-babel-post-tangle-hook
>   Variable: Hook run in code files tangled by `org-babel-tangle'.
>   Properties: standard-value custom-version custom-type
>               custom-requests variable-documentation
>
> - As a "meta question", how would one find the answer to these and
>   similar questions without leaving Emacs, since we know Emacs is
>   self-documenting and Org mode has a very comprehensive set of
>   functions and documentation. Looking in the usual places (C-u M-x
>   apropos, C-h v) did not lead me to an answer.

One good thing to know is that Org export variables related to a certain
backend all start with org-BACKEND-*. So you could do C-h v org-html-TAB
and see... a lot of variables. Still, that would (eventually) get you
there. I did apropos-variable for "org html container" and that got me a
similar list as C-h v, albeit slimmed down somewhat, and with
docstrings.

Hope that helps,
Eric

  reply	other threads:[~2014-05-26  2:07 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-16  1:19 Org mode export to HTML not working correctly with code blocks if block is after an item (-) and its delimiters are indented Omid
2013-10-16  2:41 ` Thorsten Jolitz
2013-10-16  2:53 ` Thorsten Jolitz
2013-10-16  3:12   ` Omid
2013-10-16 11:25 ` Nicolas Goaziou
2014-02-05 20:40 ` Behavior of Org mode Babel code snippets with respect to M-q (fill-paragraph) and C-/ (undo) Omid
2014-02-05 21:34   ` Nick Dokos
2014-02-05 23:02     ` Omid
2014-02-13 23:38       ` Samuel Wales
2014-02-14  0:21         ` Samuel Wales
2014-03-21  7:56           ` Bastien
2014-05-25 20:37   ` Is there a variable/way to change <div id="content"> to something else, e.g. <div class="container"> for use with Bootstrap CSS? Omid
2014-05-26  2:10     ` Eric Abrahamsen [this message]
2014-05-26  4:08       ` Omid
2014-05-26  4:26         ` Omid
2014-05-26  5:11           ` Eric Abrahamsen
2014-05-26  6:28             ` Omid

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zji5thlf.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.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).