]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blob - doc/themes/discussion.mdwn
explain why multiple page.tmpl is a showstopper for upstream even if not for local...
[git.ikiwiki.info.git] / doc / themes / discussion.mdwn
1 I would like to contribute a theme I created and posted on github:
3 [[https://github.com/AntPortal/ikiwiked]]
5 For an example of the theme in action, see: [[https://antportal.com/wiki/]]
7 > Shouldn't we just make people post their themes in the [[themes]] page? Or maybe we should make a [[theme market]]? --[[anarcat]]
9 > I did just that. -- [[anarcat]]
11 What is the process for merging a theme in Ikiwiki? It seems to me the
12 [[Bootstrap theme|http://www2.tblein.eu/posts/How_to_have_a_nice_design_for_ikiwiki/]]
13 could improve the options a lot... See the [[theme market]] for the
14 links to the actual theme. -- [[anarcat]]
16 > Step 1 is to not need two versions of page.tmpl to be maintained.
17 > This is, unfortunately, the reason why I have not pulled in the bootstrap
18 > theme yet. I recently made `<TMPL_IF THEME_$NAME>` be available,
19 > so the page.tmpl could use that to do different things if the boostrap
20 > theme was enabled. --[[Joey]]
22 >> Would you reconsider? I've made [[this bootstrap theme|/forum/bootstrap_theme]] that works within the theme plugin without changing the `templatedir` configuration option. It seems that the `page.tmpl` I have in the subfolder `templates` takes precedence. Not sure what you meant by "two versions of page.tmpl", though. -- [[desci]]
24 >>> The reason we don't want individual themes shipped with ikiwiki
25 >>> to have to include their own `page.tmpl` is that when we add new
26 >>> features (such as new plugins) to the ikiwiki core, if those features
27 >>> require a `page.tmpl` change, we don't want to have to add them to
28 >>> multiple variations of `page.tmpl`. This would either lead to
29 >>> increased maintenance work (repeating ourselves), or theme-dependent
30 >>> feature availability like what happens in Wordpress (for instance
31 >>> imagine if `osm` only worked with Bootstrap and `sidebar` only worked
32 >>> with Actiontabs - you wouldn't be able to have both).
33 >>>
34 >>> If you maintain your own local theme, you're welcome to maintain a
35 >>> version of `page.tmpl` containing only the features you personally
36 >>> need, but the `page.tmpl` in ikiwiki should be comprehensive. --[[smcv]]
38 ---
40 I have a question.
42 Where should I put a custom theme other than `/usr/share/ikiwiki/themes/`?
44 I put `.pm` plugins on `~/.ikiwiki/Ikiwiki/Plugin` and it works well.
46 How would I go about not tampering with the root filesystem to install a theme?
48 Also, I have another question:
50 I have a complex theme I'm working on, and it doesn't even have a `style.css`, because it is about editing `.tmpl` files and relying on the bootstrap files, so I want to know if the theme plugin will understand this structure:
52 ```
53 /usr/share/ikiwiki/themes/
54 └── my-theme/
55     ├── basewiki/
56     │   ├── bootstrap/
57     │   │   ├── css/
58     │   │   │   └── bootstrap.min.css
59     │   │   ├── js/
60     │   │   │   ├── bootstrap.js
61     │   │   │   └── bootstrap.min.js
62     │   │   └── fonts/
63     │   │       ├── glyphicons-halflings-regular.eot
64     │   │       ├── glyphicons-halflings-regular.svg
65     │   │       ├── glyphicons-halflings-regular.ttf
66     │   │       ├── glyphicons-halflings-regular.woff
67     │   │       └── glyphicons-halflings-regular.woff2
68     │   └── index.mdwn
69     └── templates/
70         ├── page.tmpl
71         └── whatever.tmpl
72 ```
74 **Edit:** no, it doesn't. When i change theme in the config to `my-theme`, the engine only uses the `templates` subfolder under `theme/my-theme`, and not `basewiki`. So the workaround is doing like [IkiStrap](https://github.com/gsliepen/ikistrap) proposed, suggesting the user to alter the `underlaydir` and `templatedir` configs instead of choosing a theme via the old fashioned `theme` config.
76 This feels more like an overhaul than a theme for me, could we clarify what is a theme, a template, an overhaul, a change to the look and feel, a change to the frontend, a change to the design, etc.?
78 -- [[desci]]