aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorfr33domlover <fr33domlover@web>2014-07-11 06:00:36 -0400
committeradmin <admin@branchable.com>2014-07-11 06:00:36 -0400
commit8da7db51882c6400997978678df75a8407f181c8 (patch)
tree30582355db4f19f3400ff5f69aaa5a157f562cdc /doc
parent0a3ed31223b3a786384a6fab0bb5f653c53e8bc7 (diff)
downloadikiwiki-8da7db51882c6400997978678df75a8407f181c8.tar
ikiwiki-8da7db51882c6400997978678df75a8407f181c8.tar.gz
Suggest initial Right-To-Left page support implementation
Diffstat (limited to 'doc')
-rw-r--r--doc/todo/allow_to_specify_text_direction_for_RTL_support.mdwn46
1 files changed, 46 insertions, 0 deletions
diff --git a/doc/todo/allow_to_specify_text_direction_for_RTL_support.mdwn b/doc/todo/allow_to_specify_text_direction_for_RTL_support.mdwn
new file mode 100644
index 000000000..711c896bf
--- /dev/null
+++ b/doc/todo/allow_to_specify_text_direction_for_RTL_support.mdwn
@@ -0,0 +1,46 @@
+Currently ikiwiki does not support left-to-right languages like Hebrew and Arabic,
+in the sense that page text is always aligned to the left. Unless you do some CSS
+hacking which doesn't scale well when you have many RTL pages.
+
+In the future it would be nice to make the while wiki UI go right-to-left if the user
+chooses, but right now what's really important to me as an RTL language user
+is that the body text can go right-to-left.
+
+This can be done with CSS easily:
+
+[[!format css """
+body {
+ text-align: right;
+}
+"""]]
+
+Currently there are two ways to make specific pages be RTL:
+
+1. Include a local.css file with the above code as an attachment of each RTL page
+2. Specify CSS with the [[ikiwiki/directive/meta]] directive
+
+The problem is that option 2 requires [[plugins/htmlscrubber]] to be off.
+
+My suggestion: Add a parameter to the meta directive, which allows adding
+an *rtl.css* file in addition to the exisiting ones. This file can be both at the top-level
+and per-page overriden, just like local.css. The page.tmpl file can then use the
+meta field to conditionally use the rtl.css, both the wiki-global one and the
+per-page one (just like it does with local.css, IIRC).
+
+And it won't require htmlscrubber off, just like local.css doesn't.
+
+In the future rtl.css can be extended to also RTLize the whole UI, e.g. including the
+location of the "buttons" at the top, the page name, code blocks and so on.
+
+What do you think? I can try this and send a patch. It just requires an additional
+meta field and a CSS file.
+
+For example, to make a page RTL include something like this inside it:
+
+ \[[!meta dir="rtl"]]
+
+Please tell me what you think.
+
+--[[fr33domlover]]
+
+[[!tag wishlist]]