Recent changes to this wiki:
search-bg.gif: transparent bg, mid-grey colour
This works in both light and dark modes.
This works in both light and dark modes.
diff --git a/doc/wikiicons/search-bg.gif b/doc/wikiicons/search-bg.gif index 02f9da4a7..a4fc51b8a 100644 Binary files a/doc/wikiicons/search-bg.gif and b/doc/wikiicons/search-bg.gif differ
attempt to rework openid logo
diff --git a/doc/wikiicons/openidlogin-bg.png b/doc/wikiicons/openidlogin-bg.png new file mode 100644 index 000000000..8c4c6da37 Binary files /dev/null and b/doc/wikiicons/openidlogin-bg.png differ diff --git a/themes/lightdark/style.css b/themes/lightdark/style.css index 9994cfdc4..fdbe42ca4 100644 --- a/themes/lightdark/style.css +++ b/themes/lightdark/style.css @@ -46,6 +46,10 @@ pre.hl { color: inherit; background-color: inherit; } .hl.sym { color: inherit; } .hl.kwc { color: inherit; } +input#openid_identifier { + background: url(wikiicons/openidlogin-bg.png) no-repeat; +} + input#openid_identifier, input#searchbox { diff --git a/underlays/login-selector/ikiwiki/login-selector/login-selector.js b/underlays/login-selector/ikiwiki/login-selector/login-selector.js index a8017e712..15f3aac3a 100644 --- a/underlays/login-selector/ikiwiki/login-selector/login-selector.js +++ b/underlays/login-selector/ikiwiki/login-selector/login-selector.js @@ -16,7 +16,7 @@ var selections_email_large = { var selections_openid_large = { openid: { name: 'OpenID', - icon: 'wikiicons/openidlogin-bg.gif', + icon: 'wikiicons/openidlogin-bg.png', label: 'Enter your OpenID:', url: null }
fix wikilink
diff --git a/doc/forum/How_to_fix_this_build_error__63__/comment_1_439cd07e27c37b1169c563a9b5dcde2a._comment b/doc/forum/How_to_fix_this_build_error__63__/comment_1_439cd07e27c37b1169c563a9b5dcde2a._comment index 34f81429f..ef4bd1b1d 100644 --- a/doc/forum/How_to_fix_this_build_error__63__/comment_1_439cd07e27c37b1169c563a9b5dcde2a._comment +++ b/doc/forum/How_to_fix_this_build_error__63__/comment_1_439cd07e27c37b1169c563a9b5dcde2a._comment @@ -6,6 +6,6 @@ content=""" We need someone with more macOS expertise to work on this. But someone else reported the same thing at -[[forum/postcommit errors during site rebuilding]]; please see the +[[forum/postcommit errors during site rebuilding_]]; please see the comments there. *— [[Jon]], 2025-05-06* """]]
Added a comment
diff --git a/doc/forum/How_to_fix_this_build_error__63__/comment_1_439cd07e27c37b1169c563a9b5dcde2a._comment b/doc/forum/How_to_fix_this_build_error__63__/comment_1_439cd07e27c37b1169c563a9b5dcde2a._comment new file mode 100644 index 000000000..34f81429f --- /dev/null +++ b/doc/forum/How_to_fix_this_build_error__63__/comment_1_439cd07e27c37b1169c563a9b5dcde2a._comment @@ -0,0 +1,11 @@ +[[!comment format=mdwn + username="jmtd" + avatar="http://cdn.libravatar.org/avatar/cae0ebd82377a48ef9f1f14ff23b3e0f" + subject="comment 1" + date="2025-05-06T08:56:09Z" + content=""" +We need someone with more macOS expertise to work on this. But someone +else reported the same thing at +[[forum/postcommit errors during site rebuilding]]; please see the +comments there. *— [[Jon]], 2025-05-06* +"""]]
diff --git a/doc/forum/How_to_fix_this_build_error__63__.mdwn b/doc/forum/How_to_fix_this_build_error__63__.mdwn index ed31747eb..bee9a1dd4 100644 --- a/doc/forum/How_to_fix_this_build_error__63__.mdwn +++ b/doc/forum/How_to_fix_this_build_error__63__.mdwn @@ -1,8 +1,7 @@ When building my site, there is an error: ``` -[INFO]ikiwiki rebuild: using Ikiwiki setup file /Users/computist/my.setup ... -[INFO]rebuilding Ikiwiki instance... +$ rebuilding Ikiwiki instance... generating wrappers.. /Users/computist/mysite/.git/hooks/post-commit.c:116:7: warning: 'daemon' is deprecated: first deprecated in macOS 10.5 - Use posix_spawn APIs instead. [-Wdeprecated-declarations] 116 | if (daemon(1, 0) == 0) {
diff --git a/doc/forum/How_to_fix_this_build_error__63__.mdwn b/doc/forum/How_to_fix_this_build_error__63__.mdwn new file mode 100644 index 000000000..ed31747eb --- /dev/null +++ b/doc/forum/How_to_fix_this_build_error__63__.mdwn @@ -0,0 +1,17 @@ +When building my site, there is an error: + +``` +[INFO]ikiwiki rebuild: using Ikiwiki setup file /Users/computist/my.setup ... +[INFO]rebuilding Ikiwiki instance... +generating wrappers.. +/Users/computist/mysite/.git/hooks/post-commit.c:116:7: warning: 'daemon' is deprecated: first deprecated in macOS 10.5 - Use posix_spawn APIs instead. [-Wdeprecated-declarations] + 116 | if (daemon(1, 0) == 0) { + | ^ +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdlib.h:319:6: note: 'daemon' has been explicitly marked deprecated here + 319 | int daemon(int, int) __DARWIN_1050(daemon) __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_0, __MAC_10_5, __IPHONE_2_0, __IPHONE_2_0, "Use posix_spawn APIs instead.") __WATCHOS_PROHIBITED __TVOS_PROHIBITED; + | ^ +1 warning generated. +rebuilding wiki.. +``` + +Any idea how to fix it?
news: new version 3.20250501
diff --git a/doc/news/version_3.20250501.mdwn b/doc/news/version_3.20250501.mdwn new file mode 100644 index 000000000..f4bd4291e --- /dev/null +++ b/doc/news/version_3.20250501.mdwn @@ -0,0 +1,12 @@ +ikiwiki 3.20250501 released with [[!toggle text="these changes"]] +[[!toggleable text=""" +* [ Antoine Beaupré ] + * adjust logo from black to mid-point grey so it contrasts + equally well on a black background to a white one. + +* [ Jonathan Dowland ] + * po4a: attempt to detect versions ≥ 0.70 and continue to + support earlier versions (for now), such that modern ikiwiki + can be built and operate on Debian stable (bookworm). + * actiontabs: add support for dark mode +"""]]
done
diff --git a/doc/todo/dark_mode_support_in_actiontabs_theme.mdwn b/doc/todo/dark_mode_support_in_actiontabs_theme.mdwn index 3c364e1e8..171304caa 100644 --- a/doc/todo/dark_mode_support_in_actiontabs_theme.mdwn +++ b/doc/todo/dark_mode_support_in_actiontabs_theme.mdwn @@ -7,3 +7,5 @@ to support dark mode, as it seems [[quite popular|forum/theme_poll]]. I've taken a slightly different approach to the anti-theme: I've gone with specific colours rather than rely on the CSS system colours. *— [[Jon]], 2025-04-29* + +[[done]].
actiontabs: dark mode support (patch, demo)
diff --git a/doc/todo/dark_mode_support_in_actiontabs_theme.mdwn b/doc/todo/dark_mode_support_in_actiontabs_theme.mdwn new file mode 100644 index 000000000..3c364e1e8 --- /dev/null +++ b/doc/todo/dark_mode_support_in_actiontabs_theme.mdwn @@ -0,0 +1,9 @@ +[[!template id=gitbranch branch=jon/actiontabs-dark author="[[Jon]]"]] + +Related to [[support for light and dark mode]], it would be good for the actiontabs [[theme|themes]] +to support dark mode, as it seems [[quite popular|forum/theme_poll]]. + +[demo](https://jmtd.net/tmp/lightdark-test-dst/index.en.html). +I've taken a slightly different approach to the anti-theme: I've gone with specific colours rather +than rely on the CSS system colours. + *— [[Jon]], 2025-04-29*
done
diff --git a/doc/todo/add_a_search_plugin_that_uses_duckduckgo.mdwn b/doc/todo/add_a_search_plugin_that_uses_duckduckgo.mdwn index 8ce3ec13d..64580e37a 100644 --- a/doc/todo/add_a_search_plugin_that_uses_duckduckgo.mdwn +++ b/doc/todo/add_a_search_plugin_that_uses_duckduckgo.mdwn @@ -5,3 +5,5 @@ privacy concerns about Google, it would be nice to have a drop-in replacement. Such as on that used "duckduckgo" instead. (See also: [[todo/Change the ikiwiki.info search box to not using Google]]) + +[[done]]: [[plugins/duckduckgo/]].
done
diff --git a/doc/todo/fix_ikiwiki_logo_in_dark_mode.mdwn b/doc/todo/fix_ikiwiki_logo_in_dark_mode.mdwn index 0728f0140..ab8ac7cdf 100644 --- a/doc/todo/fix_ikiwiki_logo_in_dark_mode.mdwn +++ b/doc/todo/fix_ikiwiki_logo_in_dark_mode.mdwn @@ -4,3 +4,5 @@ fixing for dark mode: [[!img logo/ikiwiki.png]] *— [[Jon]], 2025-02-22* + +[[done]].
done
diff --git a/doc/bugs/po_test_failing_on_debian_stable.mdwn b/doc/bugs/po_test_failing_on_debian_stable.mdwn index 5c8ed03ff..aa932db72 100644 --- a/doc/bugs/po_test_failing_on_debian_stable.mdwn +++ b/doc/bugs/po_test_failing_on_debian_stable.mdwn @@ -21,3 +21,11 @@ It builds ok on debian unstable. --[[Joey]] > [I've written a patch to resolve this](https://salsa.debian.org/jmtd/ikiwiki/-/commit/0b933ced31ca07ddf9dfc56b3f41dd473255f869). > I've asked [[users/intrigeri]] if they can review it. *— [[Jon]], 2025-04-20* + +>> [[done]]. Thanks [[users/intrigeri]] for the review. I experimented +>> with Debian's Salsa CI a little, and `make test` passes for current +>> git master on both [bookworm](https://salsa.debian.org/ikiwiki-team/ikiwiki/-/jobs/7502981) +>> and +>> [sid](https://salsa.debian.org/ikiwiki-team/ikiwiki/-/jobs/7502850) +>> runners. I plan to cut a new release before the Debian hard freeze. +>> *— [[Jon]], 2025-04-28*
possible patch
diff --git a/doc/bugs/po_test_failing_on_debian_stable.mdwn b/doc/bugs/po_test_failing_on_debian_stable.mdwn index 5118c46df..5c8ed03ff 100644 --- a/doc/bugs/po_test_failing_on_debian_stable.mdwn +++ b/doc/bugs/po_test_failing_on_debian_stable.mdwn @@ -18,3 +18,6 @@ It builds ok on debian unstable. --[[Joey]] > confirmed, specifically broken with po4a=0.69-1, works with po4a=0.73-2. > I'll see if I can adjust the test so it works in both cases. *— [[Jon]], 2025-04-18* + +> [I've written a patch to resolve this](https://salsa.debian.org/jmtd/ikiwiki/-/commit/0b933ced31ca07ddf9dfc56b3f41dd473255f869). +> I've asked [[users/intrigeri]] if they can review it. *— [[Jon]], 2025-04-20*
confirmed
diff --git a/doc/bugs/po_test_failing_on_debian_stable.mdwn b/doc/bugs/po_test_failing_on_debian_stable.mdwn index 389868b3a..5118c46df 100644 --- a/doc/bugs/po_test_failing_on_debian_stable.mdwn +++ b/doc/bugs/po_test_failing_on_debian_stable.mdwn @@ -15,3 +15,6 @@ Building current master on debian stable: The failing code comes from "t/po.t: add test for UTF-8 vs. po4a 0.58+" It builds ok on debian unstable. --[[Joey]] + +> confirmed, specifically broken with po4a=0.69-1, works with po4a=0.73-2. +> I'll see if I can adjust the test so it works in both cases. *— [[Jon]], 2025-04-18*
logo updated
diff --git a/doc/todo/support_for_light_and_dark_mode.mdwn b/doc/todo/support_for_light_and_dark_mode.mdwn index c7806d71f..f5ab3eb3d 100644 --- a/doc/todo/support_for_light_and_dark_mode.mdwn +++ b/doc/todo/support_for_light_and_dark_mode.mdwn @@ -169,3 +169,6 @@ is probably the best way to implement this. >>>>>>> easiest to update ikiwiki.info from Debian packages, I'll aim to cut a >>>>>>> new release in the near future. >>>>>>> *— [[Jon]], 2025-04-09* + +>>>>>>>> I've updated the logo in `master`. I'll try to resolve the PO test +>>>>>>>> issue before cutting another release. *— [[Jon]], 2025-04-18*
regenerate ikiwiki_large.png from ikiwiki.svg
diff --git a/doc/logo/ikiwiki_large.png b/doc/logo/ikiwiki_large.png index cd6aa70f3..6db9c946b 100644 Binary files a/doc/logo/ikiwiki_large.png and b/doc/logo/ikiwiki_large.png differ
regenerate ikiwiki.png from ikiwiki.svg
diff --git a/doc/logo/ikiwiki.png b/doc/logo/ikiwiki.png index e5f07f187..0acf6ddcc 100644 Binary files a/doc/logo/ikiwiki.png and b/doc/logo/ikiwiki.png differ
Added a comment
diff --git a/doc/forum/how_to_put_a_permalink_on_each_post/comment_7_d5f47629fa8f62b71cbd04835febc389._comment b/doc/forum/how_to_put_a_permalink_on_each_post/comment_7_d5f47629fa8f62b71cbd04835febc389._comment new file mode 100644 index 000000000..8a2fc6374 --- /dev/null +++ b/doc/forum/how_to_put_a_permalink_on_each_post/comment_7_d5f47629fa8f62b71cbd04835febc389._comment @@ -0,0 +1,9 @@ +[[!comment format=mdwn + username="jmtd" + avatar="http://cdn.libravatar.org/avatar/cae0ebd82377a48ef9f1f14ff23b3e0f" + subject="comment 7" + date="2025-04-10T09:18:22Z" + content=""" +If we can pass it through in the same way as PAGE I am happy to try that approach. + +"""]]
Added a comment: useful for other stuff
diff --git a/doc/forum/how_to_put_a_permalink_on_each_post/comment_6_512c78ebcb59dc097aa643fae1777a4d._comment b/doc/forum/how_to_put_a_permalink_on_each_post/comment_6_512c78ebcb59dc097aa643fae1777a4d._comment new file mode 100644 index 000000000..a10f5f4d9 --- /dev/null +++ b/doc/forum/how_to_put_a_permalink_on_each_post/comment_6_512c78ebcb59dc097aa643fae1777a4d._comment @@ -0,0 +1,20 @@ +[[!comment format=mdwn + username="anarcat" + avatar="http://cdn.libravatar.org/avatar/825d3c30cb96a053b5335e51b8d0bd49" + subject="useful for other stuff" + date="2025-04-09T20:57:54Z" + content=""" +that, in particular, will be useful to implement stuff like opengraph, where i need to do this right now: + +``` + <meta property=\"og:logo\" content=\"https://anarc.at/apple-touch-icon.png\" /> +``` + +that would be better as: + +``` + <meta property=\"og:logo\" content=\"<TMPL_VAR URL>/apple-touch-icon.png\" /> +``` + +we could also call it CONFIG_URL to disambiguate... +"""]]
Added a comment: not sure about the name
diff --git a/doc/forum/how_to_put_a_permalink_on_each_post/comment_5_1b42f86001874abdd8472e678edf98e9._comment b/doc/forum/how_to_put_a_permalink_on_each_post/comment_5_1b42f86001874abdd8472e678edf98e9._comment new file mode 100644 index 000000000..0b3ab4c32 --- /dev/null +++ b/doc/forum/how_to_put_a_permalink_on_each_post/comment_5_1b42f86001874abdd8472e678edf98e9._comment @@ -0,0 +1,36 @@ +[[!comment format=mdwn + username="anarcat" + avatar="http://cdn.libravatar.org/avatar/825d3c30cb96a053b5335e51b8d0bd49" + subject="not sure about the name" + date="2025-04-09T20:55:38Z" + content=""" +it looks like the `PERMALINK` variable is set elsewhere, see [[bugs/inline_breaks_PERMALINK_variable]] for example. + +grepping around, it looks like it is set in the plugins aggregate, comments, inline, meta, recentchanges, and search, all in different contexts, but it seems precarious to set it globally, i'd say. + +with [[todo/include_page_variable_in_base_templates]], we have PAGE already... don't we just need the url config to be passed down to the template here? + +maybe something like [this patch](https://gitlab.com/anarcat/ikiwiki/-/commit/c2e63cbd195db95115fe4e1e1ef591bfdf290135): + +```patch +publish the URL variable for the absolute URL of the site + +Combined with PAGE, it provides us with a way to access the permalink +of a page within templates. + +1 file changed, 1 insertion(+) +IkiWiki/Render.pm | 1 + + +modified IkiWiki/Render.pm +@@ -134,6 +134,7 @@ sub genpage ($$) { + mtime => displaytime($pagemtime{$page}), + ctime => displaytime($pagectime{$page}, undef, 1), + baseurl => baseurl($page), ++ url => $config{url}, + html5 => $config{html5}, + responsive_layout => $config{responsive_layout}, + ); +``` + +no? +"""]]
Updated logo proposal
diff --git a/doc/todo/support_for_light_and_dark_mode.mdwn b/doc/todo/support_for_light_and_dark_mode.mdwn index 8389f3e39..c7806d71f 100644 --- a/doc/todo/support_for_light_and_dark_mode.mdwn +++ b/doc/todo/support_for_light_and_dark_mode.mdwn @@ -162,3 +162,10 @@ is probably the best way to implement this. >>>>>> adding just a small white border would suffice), and smcv and schmonz >>>>>> both have the admin bit to do it. Or feel free to reach out to me by email. >>>>>> --[[Joey]] + +>>>>>>> [[anarcat]] [modified the logo to use a mid-grey](https://gitlab.com/anarcat/ikiwiki/-/blob/ec6182dfeea08dda2e8c341fe091d0ee6e22b59a/doc/logo/ikiwiki.svg) which contrasts nicely +>>>>>>> with black and white backgrounds: [[!img 2logos.png]]. If you are happy +>>>>>>> with that (I think it looks good) I can merge that to master and if its +>>>>>>> easiest to update ikiwiki.info from Debian packages, I'll aim to cut a +>>>>>>> new release in the near future. +>>>>>>> *— [[Jon]], 2025-04-09* diff --git a/doc/todo/support_for_light_and_dark_mode/2logos.png b/doc/todo/support_for_light_and_dark_mode/2logos.png new file mode 100644 index 000000000..6bd43430b Binary files /dev/null and b/doc/todo/support_for_light_and_dark_mode/2logos.png differ
more messing around mastodon
diff --git a/doc/todo/mastodon_comments.mdwn b/doc/todo/mastodon_comments.mdwn index cd9aaa145..e73ea979d 100644 --- a/doc/todo/mastodon_comments.mdwn +++ b/doc/todo/mastodon_comments.mdwn @@ -13,3 +13,35 @@ Or maybe i just need to make a new template and insert it in my blog posts... po >> I'm not even sure this is a good idea. The first test I did was a "test comment" which led to half a dozen "test reply" and then I realized i couldn't redact individual posts from there. Ugh. I don't even know if, when I mute a user, it actually gets hidden from everyone else too... >> >> So I'll test this for a while, I guess. + +# Update: the feed2exec diversion + +There's another thing that's needed to make this work, which I didn't mention above, which is to automatically *post* new entries to Mastodon when they show up, because otherwise the above needs you to manually post the thing to Mastodon. It's kind of a mess. At first, I implemented this as a [feed2exec](https://gitlab.com/anarcat/feed2exec) plugin called [ikiwikitoot.py](https://gitlab.com/anarcat/feed2exec/-/blob/main/feed2exec/plugins/ikiwikitoot.py) but that didn't work reliably: there was this horrible bootstrapping issue that you had to first post the article, then run the RSS feed, and that modifies the article again. + +This didn't work reliably for me, so I added more duct-tape so you can now run the command directly without going through the RSS feed. I ended up with the following post-receive hook in my `source.git`: + +``` +w-anarcat@marcos:~/source.git$ cat hooks/post-receive +#!/bin/sh + +/home/anarcat/src/feed2exec/feed2exec/plugins/ikiwikitoot.py --post-receive --base-url https://anarc.at/ +``` + +And the code still lives in feed2exec... It makes use of my second Python parser for ikiwiki directives (ugh) which really makes me feel like this should be implemented natively as a real ikiwiki plugin instead. + +I'm not sure how this would work: we'd need to somehow keep state of which page is associated with which mastodon post. In theory, this could be kept in .ikiwiki, but i find that iffy: i really like the idea of having the mastodon post directly in the git source, but i'm not aware of any ikiwiki plugin actually modifying the source, that seems to be traditionnally a "no no". + +I would also really like ikiwiki to render comments as static HTML. This would add a couple benefits over the current approach: + + 1. no javascript necessary + 2. reduce load on the mastodon server (the current approach hits the server for every *visitor* that hits the "load comments" button, which is not kind to the mastodon server) + 3. reduce reliance on the upstream mastodon server to be up (right now, if mastodon goes away, comments disappear) + 4. allow for moderation on the ikiwiki side (right now, we're completely subject to the mastodon server moderation, if we don't like a comment, we can't remove it without removing it from the mastodon server) + +But that's even more work. I definitely like the idea of adding `!comment` directives to existing posts though, this feels nice, and it's easy to remove them to do moderation. + +The trick is "when do you post updates": short of having a daemon (or CGI?) that receives activitypub pushes, we'd need *something* that pulls new updates on a regular basis anyways, so it's not clear how easy it would be to actually implement. + +Still, moving that code from feed2exec/python to ikiwiki/perl (or ikiwiki/python, there's precedents here), would be an important step, IMHO. + +Thoughts? -- [[anarcat]] 2025-03-03
comments
diff --git a/doc/todo/support_for_light_and_dark_mode.mdwn b/doc/todo/support_for_light_and_dark_mode.mdwn index 5e4b408c3..8389f3e39 100644 --- a/doc/todo/support_for_light_and_dark_mode.mdwn +++ b/doc/todo/support_for_light_and_dark_mode.mdwn @@ -106,6 +106,8 @@ is probably the best way to implement this. >> [[support dark mode in antitheme]]: making the other existing themes >> support light-and-dark mode. That could be valuable, at least in the >> short term. +>> +>>> actiontabs strikes me as a good one to support it. --[[Joey]] >> >> I concur that adjusting the antitheme to support light/dark mode could >> be regarded as a breaking change for existing users. I think we should @@ -150,3 +152,13 @@ is probably the best way to implement this. >>>>> switch <https://ikiwiki.info> over to it. One thing that will need >>>>> adjusting for that, though, is the ikiwiki logo: [[ikiwiki_logo|logo/ikiwiki.png]] >>>>> — [[Jon]], *2024-10-09* + +>>>>>> I am game for switching ikiwiki.info over to it. Indeed I plan to +>>>>>> switch a lot of little websites like that over to it. +>>>>>> +>>>>>> My time and attention for this is sadly limited. Thanks for doing this work. +>>>>>> I have upgraded ikiwiki on branchable, so it should be possible to +>>>>>> change the ikiwiki.info setup once you sort out the icon (maybe +>>>>>> adding just a small white border would suffice), and smcv and schmonz +>>>>>> both have the admin bit to do it. Or feel free to reach out to me by email. +>>>>>> --[[Joey]]
po test bug report
diff --git a/doc/bugs/po_test_failing_on_debian_stable.mdwn b/doc/bugs/po_test_failing_on_debian_stable.mdwn new file mode 100644 index 000000000..389868b3a --- /dev/null +++ b/doc/bugs/po_test_failing_on_debian_stable.mdwn @@ -0,0 +1,17 @@ +Building current master on debian stable: + + Failed test at t/po.t line 538. + # '<p>Tails takes <BD> hour to install</p> + # ' + # doesn't match '(?^usx: + # .* + # L'installation\sde\sTails\sdure\s<BD>\sheure + # .* + # )' + # Looks like you failed 1 test of 126. + t/po.t ......................... + Dubious, test returned 1 (wstat 256, 0x100) + +The failing code comes from "t/po.t: add test for UTF-8 vs. po4a 0.58+" + +It builds ok on debian unstable. --[[Joey]]
done
diff --git a/doc/todo/admonitions.mdwn b/doc/todo/admonitions.mdwn index 16f0b00ee..9350e154e 100644 --- a/doc/todo/admonitions.mdwn +++ b/doc/todo/admonitions.mdwn @@ -168,3 +168,5 @@ the actiontab theme enabled: >> It turned out to be a simple fix, a missing semicolon. [patch here](https://github.com/jmtd/ikiwiki/commit/3e31200ed258ba1f7ab1652d6bc2d035a9e5c990). The rest of that branch is just your admonitions branch rebased onto `3.20200202.3`. *—[[Jon]], 2021-02-18* >>> Interesting. That was of course, a missing semicolon, not sure how I missed that. I cherry-picked your patch, but I wonder why I wasn't seeing the problem on my end... Maybe I had other padding that was covering for this... Thanks, in any case! :) -- [[anarcat]] + +[[done]]. *— [[Jon]], 2025-02-22*
rm 'review requested': all done
diff --git a/doc/users/jon.mdwn b/doc/users/jon.mdwn index 0e825b28d..f3e587710 100644 --- a/doc/users/jon.mdwn +++ b/doc/users/jon.mdwn @@ -22,11 +22,3 @@ piece of software for this task. * slides at <http://www.staff.ncl.ac.uk/jon.dowland/unix/docs/>. -## Review requested - -I prefer to have another pair of eyeballs ACK my own patches where -possible. These are ready for a look: - - * [[bugs/backlinks onhover thing can go weird]] - * [[todo/don't generate an empty parentlink span]] - * [[todo/add a search plugin that uses duckduckgo]]
logo needs fixing
diff --git a/doc/todo/fix_ikiwiki_logo_in_dark_mode.mdwn b/doc/todo/fix_ikiwiki_logo_in_dark_mode.mdwn new file mode 100644 index 000000000..0728f0140 --- /dev/null +++ b/doc/todo/fix_ikiwiki_logo_in_dark_mode.mdwn @@ -0,0 +1,6 @@ +[[As mentioned here|support for light and dark mode]], the logo needs +fixing for dark mode: + +[[!img logo/ikiwiki.png]] + +*— [[Jon]], 2025-02-22*
add news item for ikiwiki 3.20250221
diff --git a/doc/news/version_3.20250221.mdwn b/doc/news/version_3.20250221.mdwn new file mode 100644 index 000000000..cd6cd7b6d --- /dev/null +++ b/doc/news/version_3.20250221.mdwn @@ -0,0 +1,25 @@ +ikiwiki 3.20250221 released with [[!toggle text="these changes"]] +[[!toggleable text=""" +* [ Jonathan Dowland ] + * po.pm: fixes for po4a ≥ 0.70. + * CGI::printheader: optional HTTP status argument + * comments: return HTTP 202 for moderated comments + * page.tmpl: don't generate an empty parentlinks span + * new plugins: + * Jason Blevins' h1title plugin (previously external/contrib) + * DuckDuckGo plugin for site searching + * new theme: lightdark. Supports browse preferences for light or + dark mode. + * Default html5 to '1' + * Remove charset attribute from forms + * Use the HTML5 details tag for more backlinks + +* [ Paul Wise ] + * Remove extra quote character from date spans + +* [ intrigeri ] + * t/po.t: Add missing PO header + +* [ Antoine Beaupré ] + * admonitions plugin +"""]]
todo: fix assumption git branch is master
diff --git a/doc/todo/fix_assumption_git_branch_is_master.mdwn b/doc/todo/fix_assumption_git_branch_is_master.mdwn new file mode 100644 index 000000000..cbf655c7e --- /dev/null +++ b/doc/todo/fix_assumption_git_branch_is_master.mdwn @@ -0,0 +1,7 @@ +`Git.pm` and several tests (and perhaps other things) implicitly assume +the default branch for a repository is `master`. This is currently still +the Git default, but can be overridden by a user (`init.defaultBranch`: +try setting it and running the test suite!). We should make `Git.pm` +more robust by settings `init.defaultBranch` on locally-created repos to +match our assumption (or to match setup's `gitmaster_branch`) +*— [[Jon]], 2025-02-18*
Document duckduckgoform.tmpl
diff --git a/doc/templates.mdwn b/doc/templates.mdwn index 378e579ba..f5e47e7d5 100644 --- a/doc/templates.mdwn +++ b/doc/templates.mdwn @@ -74,8 +74,8 @@ Here is a full list of the template files used: * `feedlink.tmpl` - Used to add rss/atom links if `blogpost.tmpl` is not used. * `aggregatepost.tmpl` - Used by the aggregate plugin to create a page for a post. -* `searchform.tmpl`, `googleform.tmpl` - Used by the search plugin - and google plugin to add search forms to wiki pages. +* `searchform.tmpl`, `googleform.tmpl`, `duckduckgoform.tmpl` - Used by the + search plugin, google and duckduckgo plugins to add search forms to wiki pages. * `searchquery.tmpl` - This is a Omega template, used by the search plugin. * `comment.tmpl` - Used by the comments plugin to display a comment.
Add alternatives to broken download links
diff --git a/doc/plugins/contrib/album.mdwn b/doc/plugins/contrib/album.mdwn index 9fac11164..9bdb304f4 100644 --- a/doc/plugins/contrib/album.mdwn +++ b/doc/plugins/contrib/album.mdwn @@ -59,15 +59,21 @@ First, you need a version of ikiwiki with the [[trail]] plugin merged in Manual installation requires these files (use the "raw" link in gitweb to download): -* [album.pm](http://git.pseudorandom.co.uk/smcv/ikiwiki.git/blob/album5:/IkiWiki/Plugin/album.pm) +* [album.pm](http://git.pseudorandom.co.uk/smcv/ikiwiki.git/blob/album5:/IkiWiki/Plugin/album.pm) / + [cbaine's album.pm](https://git.cbaines.net/ikiwiki/plain/IkiWiki/Plugin/album.pm?h=git-annex-album) in an `IkiWiki/Plugin` subdirectory of your configured `plugindir` -* [albumviewer.tmpl](http://git.pseudorandom.co.uk/smcv/ikiwiki.git/blob/album5:/templates/albumviewer.tmpl), - [albumitem.tmpl](http://git.pseudorandom.co.uk/smcv/ikiwiki.git/blob/album5:/templates/albumitem.tmpl), - [albumnext.tmpl](http://git.pseudorandom.co.uk/smcv/ikiwiki.git/blob/album5:/templates/albumnext.tmpl) and - [albumprev.tmpl](http://git.pseudorandom.co.uk/smcv/ikiwiki.git/blob/album5:/templates/albumprev.tmpl), +* [albumviewer.tmpl](http://git.pseudorandom.co.uk/smcv/ikiwiki.git/blob/album5:/templates/albumviewer.tmpl) / + [cbaine's albumviewer.tmpl](https://git.cbaines.net/ikiwiki/plain/templates/albumviewer.tmpl?h=git-annex-album), + [albumitem.tmpl](http://git.pseudorandom.co.uk/smcv/ikiwiki.git/blob/album5:/templates/albumitem.tmpl) / + [cbaine's albumitem.tmpl](https://git.cbaines.net/ikiwiki/plain/templates/albumitem.tmpl?h=git-annex-album), + [albumnext.tmpl](http://git.pseudorandom.co.uk/smcv/ikiwiki.git/blob/album5:/templates/albumnext.tmpl) / + [cbaine's albumnext.tmpl](https://git.cbaines.net/ikiwiki/plain/templates/albumnext.tmpl?h=git-annex-album) and + [albumprev.tmpl](http://git.pseudorandom.co.uk/smcv/ikiwiki.git/blob/album5:/templates/albumprev.tmpl) / + [cbaine's albumprev.tmpl](https://git.cbaines.net/ikiwiki/plain/templates/albumprev.tmpl?h=git-annex-album), in your configured `templatedir`, or a `templates` subdirectory of your wiki repository * the album-related bits from the end of the - [stylesheet](http://git.pseudorandom.co.uk/smcv/ikiwiki.git/blob/album5:/doc/style.css) + [stylesheet](http://git.pseudorandom.co.uk/smcv/ikiwiki.git/blob/album5:/doc/style.css) / + [cbaine's stylesheet](https://git.cbaines.net/ikiwiki/plain/doc/style.css?h=git-annex-album-2-rebased) (put them in your local.css) ## Changing the templates
Ask question about where to download the album plugin
diff --git a/doc/plugins/contrib/album/discussion.mdwn b/doc/plugins/contrib/album/discussion.mdwn index a60de0b2a..2c33b7e71 100644 --- a/doc/plugins/contrib/album/discussion.mdwn +++ b/doc/plugins/contrib/album/discussion.mdwn @@ -1,3 +1,6 @@ +## working download links +Does anyone have a git repo of the album plugin with the template files? It seems that all of the download links on the page are broken. + ## installation queries from brush thanks for this plugin. it might help me in my application, which is to provide album/galleries which can be edited (ie. new images added, taken away, etc.) through web interface.
Add Crypt Code Club wiki
diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn index c0b987b82..6c027b945 100644 --- a/doc/ikiwikiusers.mdwn +++ b/doc/ikiwikiusers.mdwn @@ -110,6 +110,7 @@ Projects & Organizations * [[guppy|http://guppy.branchable.com/index.en.html]] an internationalized modular Python IRC bot * [[ChessWOB|https://www.chesswob.org]] Chess Without Boundaries * [[Debian Enhancement Proposals|https://dep-team.pages.debian.net/]] +* [[Crypt Code Club|https://cryptcodeclub.codeberg.page/]] Personal sites and blogs ========================
now testing this plugin on my site
diff --git a/doc/todo/extend_match__95__ip_for_netblocks_and_possibly_AS_ranges.mdwn b/doc/todo/extend_match__95__ip_for_netblocks_and_possibly_AS_ranges.mdwn index e0dc2053d..9d439455d 100644 --- a/doc/todo/extend_match__95__ip_for_netblocks_and_possibly_AS_ranges.mdwn +++ b/doc/todo/extend_match__95__ip_for_netblocks_and_possibly_AS_ranges.mdwn @@ -5,48 +5,44 @@ Perhaps not in the same PageSpec, but it might also be useful to support looking *— [[Jon]], 2025-01-24* -Untested: - ``` -diff --git a/IkiWiki.pm b/IkiWiki.pm -index e0d4e2d31..e1344758e 100644 ---- a/IkiWiki.pm -+++ b/IkiWiki.pm -@@ -8,6 +8,7 @@ use Encode; - use Fcntl q{:flock}; - use URI::Escape q{uri_escape_utf8}; - use POSIX (); -+use Net::Netmask; - use Storable; - use open qw{:utf8 :std}; - -@@ -3210,6 +3211,25 @@ sub match_admin ($$;@) { - } - } - -+sub match_ipblock ($$;@) { -+ shift; -+ my $string=shift; -+ my %params=@_; -+ -+ if (! exists $params{ip}) { -+ return IkiWiki::ErrorReason->new("no IP specified"); -+ } -+ my $block = Net::Netmask->safe_new($string); -+ unless $block { -+ return IkiWiki::ErrorReason->new("invalid netmask specified"); -+ } -+ if ($block->match($params{ip})) { -+ return IkiWiki::SuccessReason->new("IP is $ip"); -+ } else { -+ return IkiWiki::FailReason->new("IP is $params{ip}, not $ip"); -+ } -+} -+ - sub match_ip ($$;@) { - shift; - my $ip=shift; +#!/usr/bin/perl +# Copyright © 2008 Joey Hess <joey@ikiwiki.info> +# Copyright © 2025 Jonathan Dowland <jon@dow.land> +# Licensed under the GNU GPL, version 2, or any later version published by the +# Free Software Foundation + +use warnings; +use strict; +use IkiWiki 3.00; +use Net::Netmask; + +package IkiWiki::PageSpec; + +sub match_ipblock ($$;@) { + shift; + my $string=shift; + my %params=@_; + + if (! exists $params{ip}) { + return IkiWiki::ErrorReason->new("no IP specified"); + } + my $block = Net::Netmask->safe_new($string); + unless ($block) { + return IkiWiki::ErrorReason->new("invalid netmask specified"); + } + if ($block->match($params{ip})) { + return IkiWiki::SuccessReason->new("IP is in block $string"); + } else { + return IkiWiki::FailReason->new("IP is $params{ip}, not in block $string"); + } +} + +1 ``` If I look at this further I'd move it into a plugin rather than add `Net::Netmask` to `IkiWiki.pm`. *— [[Jon]], 2025-01-24* + +> I've altered the code block above; I'm now testing this plugin on my +> site. *— [[Jon]], 2025-01-27*
untested patch
diff --git a/doc/todo/extend_match__95__ip_for_netblocks_and_possibly_AS_ranges.mdwn b/doc/todo/extend_match__95__ip_for_netblocks_and_possibly_AS_ranges.mdwn index 7b5d9e7ea..e0dc2053d 100644 --- a/doc/todo/extend_match__95__ip_for_netblocks_and_possibly_AS_ranges.mdwn +++ b/doc/todo/extend_match__95__ip_for_netblocks_and_possibly_AS_ranges.mdwn @@ -4,3 +4,49 @@ PageSpec `ip()` (implementation `match_ip`) supports globs, but it would be usef Perhaps not in the same PageSpec, but it might also be useful to support looking up AS assignments and blocking ranges that way, see <https://feeding.cloud.geek.nz/posts/blocking-comment-spammers-ikiwiki/>. For the example IP above, this would be 6,171 IP ranges, and considerably more lines in `banned_users` without features like these. *— [[Jon]], 2025-01-24* + +Untested: + +``` +diff --git a/IkiWiki.pm b/IkiWiki.pm +index e0d4e2d31..e1344758e 100644 +--- a/IkiWiki.pm ++++ b/IkiWiki.pm +@@ -8,6 +8,7 @@ use Encode; + use Fcntl q{:flock}; + use URI::Escape q{uri_escape_utf8}; + use POSIX (); ++use Net::Netmask; + use Storable; + use open qw{:utf8 :std}; + +@@ -3210,6 +3211,25 @@ sub match_admin ($$;@) { + } + } + ++sub match_ipblock ($$;@) { ++ shift; ++ my $string=shift; ++ my %params=@_; ++ ++ if (! exists $params{ip}) { ++ return IkiWiki::ErrorReason->new("no IP specified"); ++ } ++ my $block = Net::Netmask->safe_new($string); ++ unless $block { ++ return IkiWiki::ErrorReason->new("invalid netmask specified"); ++ } ++ if ($block->match($params{ip})) { ++ return IkiWiki::SuccessReason->new("IP is $ip"); ++ } else { ++ return IkiWiki::FailReason->new("IP is $params{ip}, not $ip"); ++ } ++} ++ + sub match_ip ($$;@) { + shift; + my $ip=shift; +``` + +If I look at this further I'd move it into a plugin rather than add `Net::Netmask` to `IkiWiki.pm`. +*— [[Jon]], 2025-01-24*
propose supporting netmasks, and/or looking up AS assignments
diff --git a/doc/todo/extend_match__95__ip_for_netblocks_and_possibly_AS_ranges.mdwn b/doc/todo/extend_match__95__ip_for_netblocks_and_possibly_AS_ranges.mdwn new file mode 100644 index 000000000..7b5d9e7ea --- /dev/null +++ b/doc/todo/extend_match__95__ip_for_netblocks_and_possibly_AS_ranges.mdwn @@ -0,0 +1,6 @@ +PageSpec `ip()` (implementation `match_ip`) supports globs, but it would be useful to be able to write say +`154.12.192.0/22` to block a range of addresses that aren't matchable with a simple glob. + +Perhaps not in the same PageSpec, but it might also be useful to support looking up AS assignments and blocking ranges that way, see <https://feeding.cloud.geek.nz/posts/blocking-comment-spammers-ikiwiki/>. For the example IP above, this would be 6,171 IP ranges, and considerably more lines in `banned_users` without features like these. + +*— [[Jon]], 2025-01-24*
sadly unsupported
diff --git a/doc/bugs/Discount_footnotes_not_working_in_more_directive.mdwn b/doc/bugs/Discount_footnotes_not_working_in_more_directive.mdwn index 69fedd2ea..d14bba736 100644 --- a/doc/bugs/Discount_footnotes_not_working_in_more_directive.mdwn +++ b/doc/bugs/Discount_footnotes_not_working_in_more_directive.mdwn @@ -11,3 +11,11 @@ EDIT: this was my user error, turns out the footnote comment requires the : foll >> [^2] ref 2 >> the [^1] on some more text never gets turned into a link to the footnote, nor does a second section link get added to the end of the respective footnote. this is counter to the behavior in my markdown editor (not the most useful benchmark, i know). thanks - [[mare]] _Jan 13 2025_ + +>>> This is all pretty transparent to IkiWiki; it depends on the back-end. Unfortunately +>>> neither Discount nor Multimarkdown seem to support this. +>>> +>>> Someone could/should write an IkiWiki plugin to implement footnotes, independent of +>>> of the markdown backend (or even syntax plugin). +>>> +>>> *— [[Jon]], 2025-01-16*
diff --git a/doc/bugs/Discount_footnotes_not_working_in_more_directive.mdwn b/doc/bugs/Discount_footnotes_not_working_in_more_directive.mdwn index 93fdbc26c..69fedd2ea 100644 --- a/doc/bugs/Discount_footnotes_not_working_in_more_directive.mdwn +++ b/doc/bugs/Discount_footnotes_not_working_in_more_directive.mdwn @@ -2,4 +2,12 @@ I was just trying to get footnotes working on a blog post (strange usecase I sup EDIT: this was my user error, turns out the footnote comment requires the : following the [^1] in order to work. i'll leave this here in case it helps someone in the future struggling with footnotes. - [[mare]] _Jan 12 2025 18:15PDT_ -[[done]] *— [[Jon]], 2025-01-13* +> [[done]] *— [[Jon]], 2025-01-13* + +>> i was wondering, is there support for multiple references to the same footnote on a page? e.g., if i have text[^1] more text[^2] some more text[^1] and + +>> [^1] ref 1 + +>> [^2] ref 2 + +>> the [^1] on some more text never gets turned into a link to the footnote, nor does a second section link get added to the end of the respective footnote. this is counter to the behavior in my markdown editor (not the most useful benchmark, i know). thanks - [[mare]] _Jan 13 2025_
done
diff --git a/doc/bugs/Discount_footnotes_not_working_in_more_directive.mdwn b/doc/bugs/Discount_footnotes_not_working_in_more_directive.mdwn index 2c123c75f..93fdbc26c 100644 --- a/doc/bugs/Discount_footnotes_not_working_in_more_directive.mdwn +++ b/doc/bugs/Discount_footnotes_not_working_in_more_directive.mdwn @@ -1,3 +1,5 @@ I was just trying to get footnotes working on a blog post (strange usecase I suppose) and no matter what I did I wasn't able to get them to work. I tried both Discount and MultiMarkdown, looked at the code in the mdwn.pm file, etc. I finally narrowed it down to the issue being that I was trying to have the footnote definition and reference both inside the text=""" """ block of the !more directive. I haven't looked through the code for the more.pm yet to see why that is happening, but will do so and see if I can figure out a fix. EDIT: this was my user error, turns out the footnote comment requires the : following the [^1] in order to work. i'll leave this here in case it helps someone in the future struggling with footnotes. - [[mare]] _Jan 12 2025 18:15PDT_ + +[[done]] *— [[Jon]], 2025-01-13*
diff --git a/doc/bugs/Discount_footnotes_not_working_in_more_directive.mdwn b/doc/bugs/Discount_footnotes_not_working_in_more_directive.mdwn index 2ca3780da..2c123c75f 100644 --- a/doc/bugs/Discount_footnotes_not_working_in_more_directive.mdwn +++ b/doc/bugs/Discount_footnotes_not_working_in_more_directive.mdwn @@ -1 +1,3 @@ -I was just trying to get footnotes working on a blog post (strange usecase I suppose) and no matter what I did I wasn't able to get them to work. I tried both Discount and MultiMarkdown, looked at the code in the mdwn.pm file, etc. I finally narrowed it down to the issue being that I was trying to have the footnote definition and reference both inside the text=""" """ block of the !more directive. I haven't looked through the code for the more.pm yet to see why that is happening, but will do so and see if I can figure out a fix. - [[mare]] _Jan 12 2025 18:15PDT_ +I was just trying to get footnotes working on a blog post (strange usecase I suppose) and no matter what I did I wasn't able to get them to work. I tried both Discount and MultiMarkdown, looked at the code in the mdwn.pm file, etc. I finally narrowed it down to the issue being that I was trying to have the footnote definition and reference both inside the text=""" """ block of the !more directive. I haven't looked through the code for the more.pm yet to see why that is happening, but will do so and see if I can figure out a fix. + +EDIT: this was my user error, turns out the footnote comment requires the : following the [^1] in order to work. i'll leave this here in case it helps someone in the future struggling with footnotes. - [[mare]] _Jan 12 2025 18:15PDT_
diff --git a/doc/bugs/Discount_footnotes_not_working_in_more_directive.mdwn b/doc/bugs/Discount_footnotes_not_working_in_more_directive.mdwn new file mode 100644 index 000000000..2ca3780da --- /dev/null +++ b/doc/bugs/Discount_footnotes_not_working_in_more_directive.mdwn @@ -0,0 +1 @@ +I was just trying to get footnotes working on a blog post (strange usecase I suppose) and no matter what I did I wasn't able to get them to work. I tried both Discount and MultiMarkdown, looked at the code in the mdwn.pm file, etc. I finally narrowed it down to the issue being that I was trying to have the footnote definition and reference both inside the text=""" """ block of the !more directive. I haven't looked through the code for the more.pm yet to see why that is happening, but will do so and see if I can figure out a fix. - [[mare]] _Jan 12 2025 18:15PDT_
diff --git a/doc/users/LS.mdwn b/doc/users/LS.mdwn new file mode 100644 index 000000000..bae796d0c --- /dev/null +++ b/doc/users/LS.mdwn @@ -0,0 +1,2 @@ +LS x.com/LSatan +just creating a newspaper using ikiwiki and working for communism
done
diff --git a/doc/todo/fix_non-HTML5_displaytime_quotes.mdwn b/doc/todo/fix_non-HTML5_displaytime_quotes.mdwn index 6ebe734cf..a5c679d5e 100644 --- a/doc/todo/fix_non-HTML5_displaytime_quotes.mdwn +++ b/doc/todo/fix_non-HTML5_displaytime_quotes.mdwn @@ -29,3 +29,5 @@ index c53be8e01..e0d4e2d31 100644 -- 2.45.2 ``` + +[[done]].. Sorry about that! *— [[Jon]], 2024-12-18*
new patch
diff --git a/doc/todo/fix_non-HTML5_displaytime_quotes.mdwn b/doc/todo/fix_non-HTML5_displaytime_quotes.mdwn new file mode 100644 index 000000000..6ebe734cf --- /dev/null +++ b/doc/todo/fix_non-HTML5_displaytime_quotes.mdwn @@ -0,0 +1,31 @@ +Please apply the attached patch to fix quotes for the non-HTML5 case of the displaytime function: + +``` +From cfb96ee56239eedb9fe702b7c2660046f7a8e668 Mon Sep 17 00:00:00 2001 +From: Paul Wise <pabs3@bonedaddy.net> +Date: Sun, 15 Dec 2024 10:49:21 +0800 +Subject: [PATCH] Remove extra quote character from date spans + +This results in invalid HTML due to the duplicate quote character. + +Fixes: commit b6edc5ffc523c1775bdde15339f8c760dda4f0ca +--- + IkiWiki.pm | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/IkiWiki.pm b/IkiWiki.pm +index c53be8e01..e0d4e2d31 100644 +--- a/IkiWiki.pm ++++ b/IkiWiki.pm +@@ -1291,7 +1291,7 @@ sub displaytime ($;$$) { + else { + return '<span class="date'. + ($_[2] ? ' dt-published' : ''). +- '"">'.$time.'</span>'; ++ '">'.$time.'</span>'; + } + } + +-- +2.45.2 +```
follow-up
diff --git a/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn b/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn index 30730fc87..b47087170 100644 --- a/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn +++ b/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn @@ -154,6 +154,24 @@ commit `f2e3dc8583f82395313aa6f2cbd4f4c67430fa8f`: >> `url_regexp` from the plugin, and just reference `link.pm`'s versions. However >> I haven't got that working yet in my review. >> *— [[Jon]], 2024-12-03* + >> + >> ---- + >> + >> _several hours later…_ + >> + >> Forgive my enthusiasm, but with the feedback above I've gone past reviewing and + >> started bikeshedding the solution. The most important thing is for it to work. + >> I managed to miss that the approach for `renamepage` didn't actually work until + >> Today. So for me I think the next thing I'd like to see is the beginning of some + >> tests. I would suggest a separate test file from `t/linkify.pm`; you could start + >> by copying it but I'd look at some other test files to see if there are more + >> modern approaches to structuring them (`t/linkify.pm` is probably one of the + >> oldest). I'd want to see every routine that's exposed by the plugin be covered + >> by a least one test; I think it's also worth testing to confirm that `link.pm` + >> and `link_local.pm` are not loaded at the same time (in my local hacking around + >> I've ended up with that happening, despite my test config having + >> `disable_plugins: [link]`.) + >> *— [[Jon]], 2024-12-03* * Could `if (length $config{contribpage})` ever be false? I don't think so, since `checkconfig` sets it. Can we remove that conditional?
more review comments
diff --git a/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn b/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn index 2d7431f1a..30730fc87 100644 --- a/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn +++ b/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn @@ -127,6 +127,34 @@ commit `f2e3dc8583f82395313aa6f2cbd4f4c67430fa8f`: > variables, and give errors when I use the technique. > Do you know how to make it work? + >> Ah. I see the problem. In fact, `renamepage` is currently broken. The solution + >> for that, is to add `use IkiWiki::Plugin::link` to the top, meaning we can + >> reference subroutines from that plugin. However a better + >> approach than writing the stub `renamepage` function is to reference `link`s + >> directly in the hook, like this: + >> + >> `hook(type => "renamepage" , id => "link_local" , call => \&IkiWiki::Plugin::link::renamepage);` + >> + >> The same can be done for `scan`, so long as you add a call to `IkiWiki::Plugin::link::checkconfig` + >> in your `checkconfig`. Then you can delete your local `scan` subroutine. + >> + >> That leaves you in a state where both `link` and `link_local` have a variable + >> `$link_regexp`. We can get rid of `link_local`s copy _if_ the one in `link.pm` + >> is changed from `my $link_regexp` to `our $link_regexp`: this permits accessing + >> the variable via `IkiWiki::Plugin::link::link_regexp`, and you can then delete + >> the logic to assign a value in `link_local`'s `checkconfig`. + >> + >> That now leaves you in a situation where we need to modify `link.pm` as well as + >> provide `link_local.pm`. I think that's ok. + >> + >> I noticed that the `hook` calls have `id => "link"`; they need to be changed to + >> match the plugin name, i.e., `id => "link_local"` + >> + >> I'd like to get rid of `is_externallink`, `externallink`, `email_regexp` and + >> `url_regexp` from the plugin, and just reference `link.pm`'s versions. However + >> I haven't got that working yet in my review. + >> *— [[Jon]], 2024-12-03* + * Could `if (length $config{contribpage})` ever be false? I don't think so, since `checkconfig` sets it. Can we remove that conditional?
Add reply to review notes
diff --git a/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn b/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn index 2726e2d75..2d7431f1a 100644 --- a/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn +++ b/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn @@ -118,11 +118,19 @@ commit `f2e3dc8583f82395313aa6f2cbd4f4c67430fa8f`: the plugin source in its present location, but one of us will need to prepare commits for IkiWiki once it's ready. + > Sure, I could do that. + * Can you use the technique you used for `renamepage` for `is_externallink`, `externallink` `scan` and `linkify`? + > These functions use $link_regexp, $email_regexp and $url_regexp which are local + > variables, and give errors when I use the technique. + > Do you know how to make it work? + * Could `if (length $config{contribpage})` ever be false? I don't think so, since `checkconfig` sets it. Can we remove that conditional? + + > Yes, I've removed it. * I think we should consider renaming or making more generic the notion of the "contributing" page. In your case, you want the destination to be @@ -130,4 +138,8 @@ commit `f2e3dc8583f82395313aa6f2cbd4f4c67430fa8f`: not sure what other terminology we could use, something as simple as "broken_link_destination" maybe? + > I don't know if there's a more concise general term, so I've changed it to + > 'broken_link_destination'. + _— [[awesomeadam]], 2024-11-23_ + *— [[Jon]], 2024-11-04*
a few more things
diff --git a/doc/forum/plans_for_next_release.mdwn b/doc/forum/plans_for_next_release.mdwn index d11777fa9..ddaaeedd4 100644 --- a/doc/forum/plans_for_next_release.mdwn +++ b/doc/forum/plans_for_next_release.mdwn @@ -1,6 +1,8 @@ I'd like to cut a new release this year, in particular to ship * [[todo/support for light and dark mode]] + * fix actiontabs + * fix ikiwiki logo graphic * [[todo/add a search plugin that uses duckduckgo]] * po.pm: fixes for po4a ≥ 0.70 * [[todo/admonitions]]
Added a comment
diff --git a/doc/forum/plans_for_next_release/comment_2_fa0ff002747f568374b7c08740a589e4._comment b/doc/forum/plans_for_next_release/comment_2_fa0ff002747f568374b7c08740a589e4._comment new file mode 100644 index 000000000..feb66cc44 --- /dev/null +++ b/doc/forum/plans_for_next_release/comment_2_fa0ff002747f568374b7c08740a589e4._comment @@ -0,0 +1,8 @@ +[[!comment format=mdwn + username="jmtd" + avatar="http://cdn.libravatar.org/avatar/cae0ebd82377a48ef9f1f14ff23b3e0f" + subject="comment 2" + date="2024-11-19T20:00:25Z" + content=""" +Thanks for your kind words. I'll take a look at the patches you've highlighted here. Mentioning Dark Mode I'm reminded that we haven't fixed actiontabs yet, which is probably worthwhile, so I'll add that to the list. +"""]]
done
diff --git a/doc/bugs/backlinks_onhover_thing_can_go_weird.mdwn b/doc/bugs/backlinks_onhover_thing_can_go_weird.mdwn index 2a8e2d956..bac6fbc98 100644 --- a/doc/bugs/backlinks_onhover_thing_can_go_weird.mdwn +++ b/doc/bugs/backlinks_onhover_thing_can_go_weird.mdwn @@ -80,4 +80,4 @@ Foo Bar Baz Baz Bar Foo</details> </blockquote> -So that's what I've settled on. *— [[Jon]], 2024-11-19* +So that's what I've settled on. [[done]]. *— [[Jon]], 2024-11-19* diff --git a/doc/forum/plans_for_next_release.mdwn b/doc/forum/plans_for_next_release.mdwn index 83b4541b0..d11777fa9 100644 --- a/doc/forum/plans_for_next_release.mdwn +++ b/doc/forum/plans_for_next_release.mdwn @@ -4,7 +4,7 @@ I'd like to cut a new release this year, in particular to ship * [[todo/add a search plugin that uses duckduckgo]] * po.pm: fixes for po4a ≥ 0.70 * [[todo/admonitions]] -* [[bugs/backlinks onhover thing can go weird]] (not fixed yet) +* [[bugs/backlinks onhover thing can go weird]] * [[todo/Make recentchanges CGI more configurable]] (hopefully) Is there anything else that people are particularly interested in?
new approach: backlink overflow triggers <details> wrapper
diff --git a/doc/bugs/backlinks_onhover_thing_can_go_weird.mdwn b/doc/bugs/backlinks_onhover_thing_can_go_weird.mdwn index 75055fd87..2a8e2d956 100644 --- a/doc/bugs/backlinks_onhover_thing_can_go_weird.mdwn +++ b/doc/bugs/backlinks_onhover_thing_can_go_weird.mdwn @@ -52,3 +52,32 @@ further down the list, but of course then you are outside the hover region. >>> [[!tag patch]]Patch in my repo, branch `more-backlinks-details-tag`. >>> (I must say this looks *much* nicer, IMHO) *—[[Jon]], 2020-10-07* + +---- + +I've refreshed that branch after exploring this a little more. The main +problem I had with my previous solution (simply substituting the floating +box for a `details` tag) was how to integrate the overflow links +nicely with the normal ones. Since `details` is a block-level tag, by +default it would begin on a line after the existing links, and I couldn't +settle on something which looked particularly integrated. E.g.: + +<blockquote> +Links: Foo Bar Baz… +<details> + <summary>Continued:</summary> +Baz Bar Foo +</details> +</blockquote> + +I decided that, in the event the backlinks list overflowed, it made more +sense to replace the _whole list_ with a `details` tag, and keep all the +links together. E.g. + +<blockquote> +<details><summary>Links:</summary> +Foo Bar Baz +Baz Bar Foo</details> +</blockquote> + +So that's what I've settled on. *— [[Jon]], 2024-11-19*
Added a comment: my pending patch queue
diff --git a/doc/forum/plans_for_next_release/comment_1_a6ce6c71b98450117c59dfe734fcdb6a._comment b/doc/forum/plans_for_next_release/comment_1_a6ce6c71b98450117c59dfe734fcdb6a._comment new file mode 100644 index 000000000..ab8aac021 --- /dev/null +++ b/doc/forum/plans_for_next_release/comment_1_a6ce6c71b98450117c59dfe734fcdb6a._comment @@ -0,0 +1,20 @@ +[[!comment format=mdwn + username="anarcat" + avatar="http://cdn.libravatar.org/avatar/825d3c30cb96a053b5335e51b8d0bd49" + subject="my pending patch queue" + date="2024-11-18T16:18:06Z" + content=""" +I reviewed my patch queue and you merged a bunch, so first off, thanks for that and all the work you've done on ikiwiki, this is great! + +Those are the patches I have left, I think: + +- [[todo/allow_toc_to_skip_entries]]: i'm not sure i want this anymore, but it's something i have on my side... it's a bit messy +- [[bugs/javascript_resources_placed_after_html_tag]]: trivial compatibility / performance fix +- [[bugs/footnotes-look-weird]]: style tweak, got tangled up in markdown dialects issues, not sure what the next step is, i have [other tweaks to the base CSS](https://anarc.at/bootstrap.local.css), but some of them are relevant only to my bootstrap theme, unfortunately + +There might be other patches flying around my git repo... I had essentially given up on submitting patches here, but once this release goes out, I'll cleanup my house and rebase everything on top to make sure I'm not missing anything. + +In general, I'm really excited about the dark mode, and I'm wondering if i should just rebuild my theme on top of the base actiontabs thing now... + +Thanks again! +"""]]
planning for next release
diff --git a/doc/forum/plans_for_next_release.mdwn b/doc/forum/plans_for_next_release.mdwn new file mode 100644 index 000000000..83b4541b0 --- /dev/null +++ b/doc/forum/plans_for_next_release.mdwn @@ -0,0 +1,12 @@ +I'd like to cut a new release this year, in particular to ship + +* [[todo/support for light and dark mode]] +* [[todo/add a search plugin that uses duckduckgo]] +* po.pm: fixes for po4a ≥ 0.70 +* [[todo/admonitions]] +* [[bugs/backlinks onhover thing can go weird]] (not fixed yet) +* [[todo/Make recentchanges CGI more configurable]] (hopefully) + +Is there anything else that people are particularly interested in? + +— *[[Jon]], 2024-11-18*
Initial review notes
diff --git a/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn b/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn index 3504a0eb8..2726e2d75 100644 --- a/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn +++ b/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn @@ -105,3 +105,29 @@ It's probably better to add the functionality I'm looking for in the editing-rel >>>>>> absolutely, happy to. I've started to look at it now, and I'll post review comments >>>>>> here soon. Thanks! *— [[Jon]], 2024-10-30* + +---- + +Initial notes from review of +<https://codeberg.org/AwesomeAdam54321/ikiplugins/src/branch/main/IkiWiki/Plugin/link_local.pm>, +commit `f2e3dc8583f82395313aa6f2cbd4f4c67430fa8f`: + + * Ultimately, what we need is some commits to Ikiwiki's source repository + which introduce the plugin, as well as describe it in a page under + `doc/plugins` and probably introduce some tests under `./`. I will review + the plugin source in its present location, but one of us will need to + prepare commits for IkiWiki once it's ready. + + * Can you use the technique you used for `renamepage` for `is_externallink`, + `externallink` `scan` and `linkify`? + + * Could `if (length $config{contribpage})` ever be false? I don't think so, + since `checkconfig` sets it. Can we remove that conditional? + + * I think we should consider renaming or making more generic the notion of + the "contributing" page. In your case, you want the destination to be + CONTRIBUTING. But other users might want to point it somewhere else. I'm + not sure what other terminology we could use, something as simple as + "broken_link_destination" maybe? + +*— [[Jon]], 2024-11-04*
yep
diff --git a/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn b/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn index eebaa8d29..3504a0eb8 100644 --- a/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn +++ b/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn @@ -102,3 +102,6 @@ It's probably better to add the functionality I'm looking for in the editing-rel >>>>> I'll have to rework the plugin to just handle its case and call `htmllink` to handle >>>>> everything else(DONE). Can you review the plugin? >>>>> _— [[awesomeadam]], 2024-10-18_ + +>>>>>> absolutely, happy to. I've started to look at it now, and I'll post review comments +>>>>>> here soon. Thanks! *— [[Jon]], 2024-10-30*
Request for review
diff --git a/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn b/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn index 6b26a3523..eebaa8d29 100644 --- a/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn +++ b/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn @@ -100,5 +100,5 @@ It's probably better to add the functionality I'm looking for in the editing-rel >>>>> Sorry for the late reply, I'm still interested in you mentoring me writing this plugin. >>>>> I'll have to rework the plugin to just handle its case and call `htmllink` to handle ->>>>> everything else(DONE). Is there anything else that's missing in my IkiWiki contribution? +>>>>> everything else(DONE). Can you review the plugin? >>>>> _— [[awesomeadam]], 2024-10-18_
diff --git a/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn b/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn index 41b77fe91..6b26a3523 100644 --- a/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn +++ b/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn @@ -99,6 +99,6 @@ It's probably better to add the functionality I'm looking for in the editing-rel >>>> to IkiWiki. Let me know! Thanks, *— [[Jon]], 2024-10-01* >>>>> Sorry for the late reply, I'm still interested in you mentoring me writing this plugin. ->>>>> I'll have to rework the plugin to just handle its case and call `htmllink` in the else ->>>>> statement to handle everything else. +>>>>> I'll have to rework the plugin to just handle its case and call `htmllink` to handle +>>>>> everything else(DONE). Is there anything else that's missing in my IkiWiki contribution? >>>>> _— [[awesomeadam]], 2024-10-18_
Add more info to comment
diff --git a/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn b/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn index dd734ddc2..41b77fe91 100644 --- a/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn +++ b/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn @@ -99,4 +99,6 @@ It's probably better to add the functionality I'm looking for in the editing-rel >>>> to IkiWiki. Let me know! Thanks, *— [[Jon]], 2024-10-01* >>>>> Sorry for the late reply, I'm still interested in you mentoring me writing this plugin. +>>>>> I'll have to rework the plugin to just handle its case and call `htmllink` in the else +>>>>> statement to handle everything else. >>>>> _— [[awesomeadam]], 2024-10-18_
Remove simple question since htmllink in the else statement
diff --git a/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn b/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn index af53d6182..dd734ddc2 100644 --- a/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn +++ b/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn @@ -99,7 +99,4 @@ It's probably better to add the functionality I'm looking for in the editing-rel >>>> to IkiWiki. Let me know! Thanks, *— [[Jon]], 2024-10-01* >>>>> Sorry for the late reply, I'm still interested in you mentoring me writing this plugin. ->>>>> I have a question: Wouldn't calling the original `htmllink` to handle the rest result ->>>>> in some of the checks being repeated/overridden? I don't think there's a way to replace ->>>>> only part of a function, so some of the logic will be duplicated. >>>>> _— [[awesomeadam]], 2024-10-18_
Add reply regarding writing this plugin
diff --git a/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn b/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn index 3ae7ce9bb..af53d6182 100644 --- a/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn +++ b/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn @@ -97,3 +97,9 @@ It's probably better to add the functionality I'm looking for in the editing-rel >>>> you interested in trying to write this? I could either write it myself, or I'd be happy >>>> to mentor you and review you doing it instead, if you would like to make a contribution >>>> to IkiWiki. Let me know! Thanks, *— [[Jon]], 2024-10-01* + +>>>>> Sorry for the late reply, I'm still interested in you mentoring me writing this plugin. +>>>>> I have a question: Wouldn't calling the original `htmllink` to handle the rest result +>>>>> in some of the checks being repeated/overridden? I don't think there's a way to replace +>>>>> only part of a function, so some of the logic will be duplicated. +>>>>> _— [[awesomeadam]], 2024-10-18_
lighten ikiwiki text to work better in dark mode
This turns the "iki" (and its reverse) letters, currently fully black, in a complete gray.
This works in both light and dark mode pretty well, as it is #80, which is right in the middle between #00 and #ff.
This turns the "iki" (and its reverse) letters, currently fully black, in a complete gray.
This works in both light and dark mode pretty well, as it is #80, which is right in the middle between #00 and #ff.
diff --git a/doc/logo/ikiwiki.svg b/doc/logo/ikiwiki.svg index dbf124dc5..a940cc8fa 100644 --- a/doc/logo/ikiwiki.svg +++ b/doc/logo/ikiwiki.svg @@ -266,7 +266,7 @@ <path id="text2081" d="M 471.8376,621.04327 L 471.8376,554.67904 L 461.12899,554.67904 L 461.12899,543.02341 L 485.8972,543.02341 L 485.8972,621.04327 L 471.8376,621.04327 M 558.08925,621.04327 L 533.61243,581.99692 L 521.51972,594.45387 L 521.51972,621.04327 L 507.67866,621.04327 L 507.67866,511.04328 L 521.51972,511.04328 L 521.51972,579.30155 L 551.38727,543.02341 L 567.55945,543.02341 L 542.5727,572.67241 L 573.09588,621.04327 L 558.08925,621.04327 M 589.85084,621.04327 L 589.85084,554.67904 L 579.14223,554.67904 L 579.14223,543.02341 L 603.91044,543.02341 L 603.91044,621.04327 L 589.85084,621.04327" - style="font-size:149.19204712px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:black;fill-opacity:1;stroke:none;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Trebuchet MS" /> + style="font-size:149.19204712px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#808080;fill-opacity:1;stroke:none;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Trebuchet MS" /> <path id="rect2087" d="M 697.65887,17.409769 L 712.24488,17.409769 L 712.24488,32.021817 L 697.65887,32.021817 L 697.65887,17.409769 z " @@ -284,7 +284,7 @@ <path id="text2097" d="M -328.19676,621.04327 L -328.19676,554.67904 L -338.90537,554.67904 L -338.90537,543.02341 L -314.13716,543.02341 L -314.13716,621.04327 L -328.19676,621.04327 M -241.94511,621.04327 L -266.42193,581.99692 L -278.51464,594.45387 L -278.51464,621.04327 L -292.3557,621.04327 L -292.3557,511.04328 L -278.51464,511.04328 L -278.51464,579.30155 L -248.6471,543.02341 L -232.47491,543.02341 L -257.46166,572.67241 L -226.93849,621.04327 L -241.94511,621.04327 M -210.18352,621.04327 L -210.18352,554.67904 L -220.89213,554.67904 L -220.89213,543.02341 L -196.12392,543.02341 L -196.12392,621.04327 L -210.18352,621.04327" - style="font-size:149.19204712px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:black;fill-opacity:1;stroke:none;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Trebuchet MS" + style="font-size:149.19204712px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#808080;fill-opacity:1;stroke:none;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Trebuchet MS" transform="scale(-1,1)" /> <path id="rect2103"
update SVG to latest inkscape version, noop
This should get rid of warnings when we open the file.
This should get rid of warnings when we open the file.
diff --git a/doc/logo/ikiwiki.svg b/doc/logo/ikiwiki.svg index ecad86a45..dbf124dc5 100644 --- a/doc/logo/ikiwiki.svg +++ b/doc/logo/ikiwiki.svg @@ -1,21 +1,21 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!-- Created with Inkscape (http://www.inkscape.org/) --> + <svg - xmlns:dc="http://purl.org/dc/elements/1.1/" - xmlns:cc="http://web.resource.org/cc/" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns="http://www.w3.org/2000/svg" - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="882.78107" height="855.25427" id="svg6600" sodipodi:version="0.32" - inkscape:version="0.44.1" + inkscape:version="1.2.2 (b0a8486541, 2022-12-01)" version="1.0" - sodipodi:docbase="/home/roktas/Contrib/ikiwiki/upstream/doc/logo" - sodipodi:docname="ikiwiki.svg"> + sodipodi:docname="ikiwiki.svg" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"> <defs id="defs6602" /> <sodipodi:namedview @@ -28,19 +28,23 @@ objecttolerance="10" inkscape:pageopacity="0.0" inkscape:pageshadow="2" - inkscape:zoom="0.65312309" - inkscape:cx="351.70406" - inkscape:cy="711.38497" + inkscape:zoom="0.82579931" + inkscape:cx="441.39053" + inkscape:cy="427.46463" inkscape:document-units="px" - inkscape:current-layer="layer1" + inkscape:current-layer="logo" width="1000px" - inkscape:window-width="1012" - inkscape:window-height="691" + inkscape:window-width="1278" + inkscape:window-height="1412" inkscape:window-x="0" - inkscape:window-y="25" + inkscape:window-y="0" showgrid="true" showguides="false" - height="1000px" /> + height="1000px" + inkscape:showpageshadow="2" + inkscape:pagecheckerboard="0" + inkscape:deskcolor="#d1d1d1" + inkscape:window-maximized="1" /> <metadata id="metadata6605"> <rdf:RDF>
uncompress our logo so we get diffs
Before: 6.2K, after: 32K, so we're adding 28K to our git history,
permanently. But then this is compressed by git and now we get
meaningful diffs: i think in the long run it's a huge win.
It should also make it readable in a web browser: Firefox currently
chokes on the .svgz.
Before: 6.2K, after: 32K, so we're adding 28K to our git history,
permanently. But then this is compressed by git and now we get
meaningful diffs: i think in the long run it's a huge win.
It should also make it readable in a web browser: Firefox currently
chokes on the .svgz.
diff --git a/doc/logo.mdwn b/doc/logo.mdwn index 3608cb382..af4bd7210 100644 --- a/doc/logo.mdwn +++ b/doc/logo.mdwn @@ -10,19 +10,19 @@ added). [[ikiwiki_logo_large|ikiwiki_large.png]] [[ikiwiki_button|ikiwiki_button.png]] - [[SVG_source|ikiwiki.svgz]], can be used to generate a logo at any size + [[SVG_source|ikiwiki.svg]], can be used to generate a logo at any size with a command like: - inkscape -w 90 -i logo -e ikiwiki.png ikiwiki.svgz - inkscape -w 150 -i logo -e ikiwiki_large.png ikiwiki.svgz + inkscape -w 90 -i logo -e ikiwiki.png ikiwiki.svg + inkscape -w 150 -i logo -e ikiwiki_large.png ikiwiki.svg The [[favicon.ico]] can also be generated from this file, as follows: - inkscape -w 16 -i favicon -e favicon.ico ikiwiki.svgz + inkscape -w 16 -i favicon -e favicon.ico ikiwiki.svg The button can also be generated as follows: - inkscape -w 80 -i button -e ikiwiki_button.png ikiwiki.svgz + inkscape -w 80 -i button -e ikiwiki_button.png ikiwiki.svg Some other alternate icons and buttons are also included in the svg file and can be extracted by specifying their names. diff --git a/doc/logo/ikiwiki.svg b/doc/logo/ikiwiki.svg new file mode 100644 index 000000000..ecad86a45 --- /dev/null +++ b/doc/logo/ikiwiki.svg @@ -0,0 +1,359 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://web.resource.org/cc/" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="882.78107" + height="855.25427" + id="svg6600" + sodipodi:version="0.32" + inkscape:version="0.44.1" + version="1.0" + sodipodi:docbase="/home/roktas/Contrib/ikiwiki/upstream/doc/logo" + sodipodi:docname="ikiwiki.svg"> + <defs + id="defs6602" /> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + gridtolerance="10000" + guidetolerance="10" + objecttolerance="10" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="0.65312309" + inkscape:cx="351.70406" + inkscape:cy="711.38497" + inkscape:document-units="px" + inkscape:current-layer="layer1" + width="1000px" + inkscape:window-width="1012" + inkscape:window-height="691" + inkscape:window-x="0" + inkscape:window-y="25" + showgrid="true" + showguides="false" + height="1000px" /> + <metadata + id="metadata6605"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <cc:license + rdf:resource="http://creativecommons.org/licenses/GPL/2.0/" /> + <dc:title>IkiWiki</dc:title> + <dc:creator> + <cc:Agent> + <dc:title>Recai Oktaş</dc:title> + </cc:Agent> + </dc:creator> + <dc:rights> + <cc:Agent> + <dc:title>GPL</dc:title> + </cc:Agent> + </dc:rights> + <dc:subject> + <rdf:Bag> + <rdf:li>ikiwiki</rdf:li> + </rdf:Bag> + </dc:subject> + </cc:Work> + <cc:License + rdf:about="http://creativecommons.org/licenses/GPL/2.0/"> + <cc:permits + rdf:resource="http://web.resource.org/cc/Reproduction" /> + <cc:permits + rdf:resource="http://web.resource.org/cc/Distribution" /> + <cc:requires + rdf:resource="http://web.resource.org/cc/Notice" /> + <cc:permits + rdf:resource="http://web.resource.org/cc/DerivativeWorks" /> + <cc:requires + rdf:resource="http://web.resource.org/cc/ShareAlike" /> + <cc:requires + rdf:resource="http://web.resource.org/cc/SourceCode" /> + </cc:License> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(-196.1239,-511.0432)"> + <path + style="font-size:149.19204712px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:black;fill-opacity:1;stroke:none;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Trebuchet MS" + d="M 712.20531,840.86542 L 712.20531,774.50118 L 701.4967,774.50118 L 701.4967,762.84555 L 726.26491,762.84555 L 726.26491,840.86542 L 712.20531,840.86542 M 798.45696,840.86542 L 773.98014,801.81906 L 761.88743,814.27601 L 761.88743,840.86542 L 748.04637,840.86542 L 748.04637,730.86542 L 761.88743,730.86542 L 761.88743,799.1237 L 791.75497,762.84555 L 807.92716,762.84555 L 782.9404,792.49456 L 813.46358,840.86542 L 798.45696,840.86542 M 830.21854,840.86542 L 830.21854,774.50118 L 819.50994,774.50118 L 819.50994,762.84555 L 844.27815,762.84555 L 844.27815,840.86542 L 830.21854,840.86542" + id="text2145" /> + <path + style="fill:#c00040;fill-opacity:0.94117647;stroke:none;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 1022.877,-0.80123305 L 1037.463,-0.80123305 L 1037.463,13.810815 L 1022.877,13.810815 L 1022.877,-0.80123305 z " + id="rect2151" + transform="matrix(0.699056,0.715067,-0.715067,0.699056,0,0)" /> + <path + style="fill:#c00040;fill-opacity:0.94117647;stroke:none;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 1105.5886,-85.40728 L 1120.1746,-85.40728 L 1120.1746,-70.795231 L 1105.5886,-70.795231 L 1105.5886,-85.40728 z " + id="rect2153" + transform="matrix(0.699056,0.715067,-0.715067,0.699056,0,0)" /> + <path + style="font-size:145.65322876px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#c00040;fill-opacity:1;stroke:none;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Trebuchet MS" + d="M 666.12036,841.37393 L 662.56438,841.37393 L 640.23278,789.52764 L 617.9723,841.37393 L 614.41631,841.37393 L 587.17745,763.56894 L 601.61476,763.56894 L 617.90118,813.56611 L 638.17031,763.56894 L 641.72629,763.56894 L 662.6355,813.56611 L 680.13095,763.56894 L 693.43035,763.56894 L 666.12036,841.37393" + id="text2155" /> + <g + id="logo-bracket"> + <g + id="g2234"> + <path + transform="scale(-1,1)" + style="font-size:270.54162598px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#c00040;fill-opacity:1;stroke:none;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier New" + d="M -873.347,697.34823 L -873.347,875.02327 L -846.39852,875.02327 C -843.75662,875.02325 -841.86319,875.50762 -840.7182,876.47638 C -839.57345,877.53315 -839.00101,878.89819 -839.00089,880.57149 C -839.00101,882.24473 -839.57345,883.56573 -840.7182,884.5345 C -841.86319,885.59127 -843.75662,886.11967 -846.39852,886.11971 L -884.44343,886.11971 L -884.44343,686.11969 L -846.39852,686.11969 C -843.75662,686.11986 -841.86319,686.64826 -840.7182,687.7049 C -839.57345,688.76187 -839.00101,690.1269 -839.00089,691.80001 C -839.00101,693.38538 -839.57345,694.70638 -840.7182,695.76302 C -841.86319,696.81998 -843.75662,697.34838 -846.39852,697.34823 L -873.347,697.34823" + id="text2133" /> + <path + style="font-size:270.54162598px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#c00040;fill-opacity:1;stroke:none;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier New" + d="M 401.68181,697.34823 L 401.68181,875.02327 L 428.63029,875.02327 C 431.27218,875.02325 433.16562,875.50762 434.31061,876.47638 C 435.45536,877.53315 436.02779,878.89819 436.02792,880.57149 C 436.02779,882.24473 435.45536,883.56573 434.31061,884.5345 C 433.16562,885.59127 431.27218,886.11967 428.63029,886.11971 L 390.58538,886.11971 L 390.58538,686.11969 L 428.63029,686.11969 C 431.27218,686.11986 433.16562,686.64826 434.31061,687.7049 C 435.45536,688.76187 436.02779,690.1269 436.02792,691.80001 C 436.02779,693.38538 435.45536,694.70638 434.31061,695.76302 C 433.16562,696.81998 431.27218,697.34838 428.63029,697.34823 L 401.68181,697.34823" + id="text2137" /> + </g> + <path + transform="scale(-1,1)" + id="text2161" + d="M -568.56435,840.86542 L -568.56435,774.50118 L -579.27295,774.50118 L -579.27295,762.84555 L -554.50474,762.84555 L -554.50474,840.86542 L -568.56435,840.86542 M -482.31269,840.86542 L -506.78951,801.81906 L -518.88223,814.27601 L -518.88223,840.86542 L -532.72329,840.86542 L -532.72329,730.86542 L -518.88223,730.86542 L -518.88223,799.1237 L -489.01468,762.84555 L -472.84249,762.84555 L -497.82925,792.49456 L -467.30607,840.86542 L -482.31269,840.86542 M -450.55111,840.86542 L -450.55111,774.50118 L -461.25972,774.50118 L -461.25972,762.84555 L -436.49151,762.84555 L -436.49151,840.86542 L -450.55111,840.86542" + style="font-size:149.19204712px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:black;fill-opacity:1;stroke:none;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Trebuchet MS" /> + </g> + <path + style="fill:#c00040;fill-opacity:0.94117647;stroke:none;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 127.54727,915.03485 L 142.13327,915.03485 L 142.13327,929.6469 L 127.54727,929.6469 L 127.54727,915.03485 z " + id="rect2167" + transform="matrix(-0.699056,0.715067,0.715067,0.699056,0,0)" /> + <path + style="fill:#c00040;fill-opacity:0.94117647;stroke:none;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 210.25894,830.42883 L 224.84494,830.42883 L 224.84494,845.04088 L 210.25894,845.04088 L 210.25894,830.42883 z " + id="rect2169" + transform="matrix(-0.699056,0.715067,0.715067,0.699056,0,0)" /> + <g + id="logo-bracket-more" + inkscape:label="#logo-bracket"> + <g + id="g2244"> + <path + style="font-size:149.19204712px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:black;fill-opacity:1;stroke:none;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Trebuchet MS" + d="M 711.30803,1105.8268 L 711.30803,1039.4625 L 700.59942,1039.4625 L 700.59942,1027.8069 L 725.36763,1027.8069 L 725.36763,1105.8268 L 711.30803,1105.8268 M 797.55968,1105.8268 L 773.08286,1066.7804 L 760.99015,1079.2374 L 760.99015,1105.8268 L 747.14909,1105.8268 L 747.14909,995.82679 L 760.99015,995.82679 L 760.99015,1064.0851 L 790.8577,1027.8069 L 807.02988,1027.8069 L 782.04313,1057.4559 L 812.5663,1105.8268 L 797.55968,1105.8268 M 829.32127,1105.8268 L 829.32127,1039.4625 L 818.61266,1039.4625 L 818.61266,1027.8069 L 843.38087,1027.8069 L 843.38087,1105.8268 L 829.32127,1105.8268" + id="text2229" /> + <path + transform="matrix(0.699056,0.715067,-0.715067,0.699056,0,0)" + style="fill:#c00040;fill-opacity:0.94117647;stroke:none;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 1211.7147,185.06317 L 1226.3007,185.06317 L 1226.3007,199.67522 L 1211.7147,199.67522 L 1211.7147,185.06317 z " + id="rect2235" /> + <path + transform="matrix(0.699056,0.715067,-0.715067,0.699056,0,0)" + style="fill:#c00040;fill-opacity:0.94117647;stroke:none;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 1294.4264,100.45712 L 1309.0124,100.45712 L 1309.0124,115.06917 L 1294.4264,115.06917 L 1294.4264,100.45712 z " + id="rect2237" /> + <path + style="font-size:145.65322876px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#c00040;fill-opacity:1;stroke:none;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Trebuchet MS" + d="M 665.22309,1106.3352 L 661.6671,1106.3352 L 639.3355,1054.4889 L 617.07502,1106.3352 L 613.51904,1106.3352 L 586.28018,1028.5302 L 600.71748,1028.5302 L 617.0039,1078.5274 L 637.27303,1028.5302 L 640.82902,1028.5302 L 661.73822,1078.5274 L 679.23368,1028.5302 L 692.53307,1028.5302 L 665.22309,1106.3352" + id="text2239" /> + <path + transform="scale(-1,1)" (Diff truncated)
add thumbnail size to force a regeneration
diff --git a/doc/themes.mdwn b/doc/themes.mdwn index 8cede5848..cfaa9b67e 100644 --- a/doc/themes.mdwn +++ b/doc/themes.mdwn @@ -28,7 +28,7 @@ based on [[Jon]]'s homepage design. <br clear="both" /> -[[!img lightdark_small.png align=left]] The **lightdark** theme, which honours +[[!img lightdark_small.png size=192x align=left]] The **lightdark** theme, which honours your browser's preference for light or dark mode. <br clear="both" />
adjust lightdark thumbnail to approx ratio of the others
diff --git a/doc/themes/lightdark_small.png b/doc/themes/lightdark_small.png index d99c1d31a..744fe1a3a 100644 Binary files a/doc/themes/lightdark_small.png and b/doc/themes/lightdark_small.png differ
use consistent emphasis for each theme name
diff --git a/doc/themes.mdwn b/doc/themes.mdwn index 62e4a6a54..8cede5848 100644 --- a/doc/themes.mdwn +++ b/doc/themes.mdwn @@ -28,7 +28,7 @@ based on [[Jon]]'s homepage design. <br clear="both" /> -[[!img lightdark_small.png align=left]] The *lightdark* theme, which honours +[[!img lightdark_small.png align=left]] The **lightdark** theme, which honours your browser's preference for light or dark mode. <br clear="both" />
done, notes on ikiwiki.info
diff --git a/doc/todo/support_for_light_and_dark_mode.mdwn b/doc/todo/support_for_light_and_dark_mode.mdwn index 58967a147..5e4b408c3 100644 --- a/doc/todo/support_for_light_and_dark_mode.mdwn +++ b/doc/todo/support_for_light_and_dark_mode.mdwn @@ -144,4 +144,9 @@ is probably the best way to implement this. >>> >>>> This looks great, really nice to see the `style=` bits being gone, good job! I had a small comment in https://salsa.debian.org/jmtd/ikiwiki/-/commit/1deb739c1503db7831e8bcbd534ef2d78872f454, maybe there's a screenshot missing from the branch? Can't wait to merge this in my bootstrap theme (or could i?)... --[[anarcat]] ->>>>> Good catch! I haven't taken one yet :-) — [[Jon]], *2024-10-09* +>>>>> Good catch! I hadn't taken one yet. Thanks for giving this a look over. +>>>>> Thumbnail added and theme merged. [[done]]. +>>>>> Once we ship this in a release, I'm going to request [[Joey|users/Joey]] +>>>>> switch <https://ikiwiki.info> over to it. One thing that will need +>>>>> adjusting for that, though, is the ikiwiki logo: [[ikiwiki_logo|logo/ikiwiki.png]] +>>>>> — [[Jon]], *2024-10-09*
add a lightdark theme thumbnail
diff --git a/doc/themes/lightdark_small.png b/doc/themes/lightdark_small.png new file mode 100644 index 000000000..d99c1d31a Binary files /dev/null and b/doc/themes/lightdark_small.png differ
good catch
diff --git a/doc/todo/support_for_light_and_dark_mode.mdwn b/doc/todo/support_for_light_and_dark_mode.mdwn index 1283d70ca..58967a147 100644 --- a/doc/todo/support_for_light_and_dark_mode.mdwn +++ b/doc/todo/support_for_light_and_dark_mode.mdwn @@ -143,3 +143,5 @@ is probably the best way to implement this. >>> — [[Jon]], *2024-10-08* >>> >>>> This looks great, really nice to see the `style=` bits being gone, good job! I had a small comment in https://salsa.debian.org/jmtd/ikiwiki/-/commit/1deb739c1503db7831e8bcbd534ef2d78872f454, maybe there's a screenshot missing from the branch? Can't wait to merge this in my bootstrap theme (or could i?)... --[[anarcat]] + +>>>>> Good catch! I haven't taken one yet :-) — [[Jon]], *2024-10-09*
LGTM
diff --git a/doc/todo/support_for_light_and_dark_mode.mdwn b/doc/todo/support_for_light_and_dark_mode.mdwn index 6bd0284c4..1283d70ca 100644 --- a/doc/todo/support_for_light_and_dark_mode.mdwn +++ b/doc/todo/support_for_light_and_dark_mode.mdwn @@ -141,3 +141,5 @@ is probably the best way to implement this. >>> I've put it up as a separate branch to gather feedback if anyone wants >>> to take a look before I merge it. >>> — [[Jon]], *2024-10-08* +>>> +>>>> This looks great, really nice to see the `style=` bits being gone, good job! I had a small comment in https://salsa.debian.org/jmtd/ikiwiki/-/commit/1deb739c1503db7831e8bcbd534ef2d78872f454, maybe there's a screenshot missing from the branch? Can't wait to merge this in my bootstrap theme (or could i?)... --[[anarcat]]
first cut done!
diff --git a/doc/todo/support_for_light_and_dark_mode.mdwn b/doc/todo/support_for_light_and_dark_mode.mdwn index f3a9b09ff..6bd0284c4 100644 --- a/doc/todo/support_for_light_and_dark_mode.mdwn +++ b/doc/todo/support_for_light_and_dark_mode.mdwn @@ -114,3 +114,30 @@ is probably the best way to implement this. >> could be enabled as part of a transition if we can detect where it >> introduces a problem (or perhaps mechanically detecting that is impractical). >> — [[Jon]], *2024-04-23* + +[[!template id=gitbranch + branch=jon/lightdark-theme + author="[[Jon]]" +]] + +>>> I completed a first cut of this last night. The changes are not fully +>>> contained within the new theme: I've adjusted the login JavaScript to +>>> not inject `style` attributes; adjusted three icons to work better on +>>> a dark background, although I think the OpenID one needs further work. +>>> +>>> I discovered [CSS System Colors](https://developer.mozilla.org/en-US/docs/Web/CSS/system-color) +>>> whilst working on this: they're colour specifiers which use browser- +>>> specified values which will change when in light or dark mode. For +>>> example `Canvas` is the background colour, and `CanvasText` the text +>>> colour. +>>> +>>> The default style uses a lot of different greys which we could probably +>>> reduce and harmonize a little bit, perhaps by using one of the System +>>> Colors. +>>> +>>> I think we should expect to fold the contents of this theme into the +>>> default stylesheet in a future IkiWiki major version. +>>> +>>> I've put it up as a separate branch to gather feedback if anyone wants +>>> to take a look before I merge it. +>>> — [[Jon]], *2024-10-08*
lightdark theme: enable light/dark mode
Override the definitions from the default anti-theme (doc/style.css)
which thwart using the browser's light/dark mode preferences. A
future major version update of IkiWiki will fold these changes into
the default stylesheet.
Override the definitions from the default anti-theme (doc/style.css)
which thwart using the browser's light/dark mode preferences. A
future major version update of IkiWiki will fold these changes into
the default stylesheet.
diff --git a/doc/themes.mdwn b/doc/themes.mdwn index bc654a39d..62e4a6a54 100644 --- a/doc/themes.mdwn +++ b/doc/themes.mdwn @@ -28,6 +28,11 @@ based on [[Jon]]'s homepage design. <br clear="both" /> +[[!img lightdark_small.png align=left]] The *lightdark* theme, which honours +your browser's preference for light or dark mode. + +<br clear="both" /> + [[!img none_small.png align=left]] For completeness, ikiwiki's default anti-theme. diff --git a/themes/lightdark/style.css b/themes/lightdark/style.css new file mode 100644 index 000000000..9994cfdc4 --- /dev/null +++ b/themes/lightdark/style.css @@ -0,0 +1,172 @@ +/* lightdark theme + * Follow browser's preference for light or dark mode + * Based on initial work by Joey Hess (doc/todo/support_for_light_and_dark_mode.mdwn) + * + * floating div backgrounds need a color specified or they are transparent + * and might overlap and be obscured by other elements (see + * d1cb73cb55ce2ecf185e2554a878a689113a01e4 and + * doc/bugs/sidebar_is_obscured_by_recentchanges.mdwn) + */ + +/* + * the following will eventually be merged into the anti-theme (doc/style.css) + */ + +html { + color-scheme: light dark; +} + +.sidebar { + background: inherit; + border-color: initial; + color: inherit !important; /* antitheme uses !important, so we have to too */ +} + +.infobox, .notebox { + background: inherit; + color: inherit !important; +} + +.pageheader .actions ul { + border-bottom-color: inherit; +} +#pageinfo { + border-top-color: inherit; +} +.pageheader #otherlanguages { + border-bottom-color: inherit; +} + +.blogform, #blogform { + color: inherit !important; +} + +pre.hl { color: inherit; background-color: inherit; } +.hl.kwa { color: inherit; } +.hl.sym { color: inherit; } +.hl.kwc { color: inherit; } + +input#openid_identifier, +input#searchbox +{ + background-color: inherit; + color: inherit; +} + +.fb_invalid { + background: Field !important; +} + +.pagecloud { + color: inherit !important; + border-color: black; /* XXX? */ +} + +.login_large_btn { + background-color: Canvas; +} +#login_highlight { + background-color: CanvasText; +} + +.feedbutton { + color: Canvas !important; +} + +.popup { + border-bottom-color: currentColor; +} + .popup:hover .balloon, + .popup:focus .balloon { + color: CanvasText; + } + +fieldset { + border: 1px solid CanvasText; +} + +/* + * the following won't be merged as-is into the anti-theme + */ + +/* recentchanges handling ***************************************************/ +/* XXX: come back to recentchanges, look at + * the structure and see if that provides + * insights */ + +@media (prefers-color-scheme: dark) { + div.recentchanges { + background: #333; /* light=#eee */ + color: inherit !important; + } + .recentchanges .changelog { + background: Canvas !important; + } +} + +.recentchanges .changelog { + color: inherit !important; +} + +/* end recentchanges handling ***********************************************/ + +@media (prefers-color-scheme: dark) { + .pagecloud + .comment, + .div.poll, + .inlinepage, + .infobox, + .notebox { + /* antitheme's value of aaa is intended to be a non-distracting + * less-bold choice than black. It's approx 5 notches down from + * white, so we choose five notches up from black for dark theme*/ + border-color: #555; + } + + .blogform, #blogform { + border-color: #aaa; + background: #333; /* light choice was #eee */ + } + + hr.poll { + color: inherit !important; + background-color: #555; /* was eee. 333 seems too dark */ + border-color: inherit; + } + div.progress { + background-color: #333; /* was #eee */ + color: inherit !important; + } + div.progress-done { + background-color: #996d42 !important; /* same hue, different luminance */ + color: inherit !important; + } + + .popup { + color: #5dbbbb; /* #366 + 50% luminance */ + } + + .popup:hover .balloon, + .popup:focus .balloon { + background-color: #3f4444; /* #dee -50% luminance */ + } + + .hl.kwb { color: #d80000; } /* lum+50%. too close ot hl.str/#f00?*/ + .hl.kwd { color: #8080c0; } /* still to dakr on blcak */ + .hl.str { color: #aa0000; } /* to differentiate better from #d80000 */ + .hl.num { color: #9494ff; } + .hl.mark { color: black; background:#bbbb88; } + + .pagecloud, + .month-calendar-day-this-day, + .year-calendar-this-month { + background-color: #333; + } + + .login-selected, + .login_small_btn, + .login_large_btn { + border-color: #444; + } + +}
login-selector: move background color to style.css
Don't specify 'style="background: #FFF"' for login buttons in
JavaScript; instead, specify the background color in style.css.
Don't specify 'style="background: #FFF"' for login buttons in
JavaScript; instead, specify the background color in style.css.
diff --git a/doc/style.css b/doc/style.css index 9f8289969..7762f8beb 100644 --- a/doc/style.css +++ b/doc/style.css @@ -486,6 +486,7 @@ li.L8 { list-style: upper-alpha; } border: 1px solid #DDD; margin: 3px; float: left; + background-color: white; } .login_small_btn { padding: 4px 4px; diff --git a/underlays/login-selector/ikiwiki/login-selector/login-selector.js b/underlays/login-selector/ikiwiki/login-selector/login-selector.js index f54a94469..c381b6516 100644 --- a/underlays/login-selector/ikiwiki/login-selector/login-selector.js +++ b/underlays/login-selector/ikiwiki/login-selector/login-selector.js @@ -68,7 +68,6 @@ var selector = { this.othersignin_id=othersignin_id; selector_btns.prepend( '<a href="javascript: selector.signin(\'othersignin\');"' + - ' style="background: #FFF" ' + 'class="othersignin login_large_btn">' + '<img alt="" width="16" height="16" src="favicon.ico" />' + ' ' + this.othersignin_label + @@ -95,7 +94,6 @@ var selector = { } var box_id = selection["name"].toLowerCase(); return '<a' + title +' href="javascript: selector.signin(\''+ box_id +'\');"' + - ' style="background: #FFF" ' + 'class="' + box_id + ' login_' + box_size + '_btn">' + '<img alt="" width="16" height="16" src="' + selection["icon"] + '" />' + label +
close semi-dupe light/dark TODO
diff --git a/doc/todo/support_dark_mode_in_antitheme.mdwn b/doc/todo/support_dark_mode_in_antitheme.mdwn index 968969c20..db77e61ee 100644 --- a/doc/todo/support_dark_mode_in_antitheme.mdwn +++ b/doc/todo/support_dark_mode_in_antitheme.mdwn @@ -35,3 +35,6 @@ mode, in my testing, is the styling around [[RecentChanges]].) > clear in release notes that this might be a problem, and how to avoid it. > > — [[Jon]], *2024-02-26* + +>> closing ([[done]]) in favour of the approach outlined in +>> [[support for light and dark mode]]. — [[Jon]], *2024-XX-XX*
Import Jason Blevins' h1title plugin
diff --git a/IkiWiki/Plugin/h1title.pm b/IkiWiki/Plugin/h1title.pm new file mode 100644 index 000000000..be2921650 --- /dev/null +++ b/IkiWiki/Plugin/h1title.pm @@ -0,0 +1,87 @@ +#!/usr/bin/perl + +package IkiWiki::Plugin::h1title; + +use warnings; +use strict; +use IkiWiki 2.00; + +sub import { + hook(type => "filter", id => "h1title", call => \&filter); +} + +sub filter(@) { + my %params = @_; + my $page = $params{page}; + my $content = $params{content}; + + if ($content =~ s/^\#[ \t]+(.*?)[ \t]*\#*\n//) { + $pagestate{$page}{meta}{title} = $1; + } + return $content; +} + +1 + +__END__ + +=head1 NAME + +ikiwiki Plug-in: h1title + +=head1 SYNOPSIS + +If there is a level 1 Markdown atx-style (hash mark) header on the first line, +this plugin uses it to set the page title and removes it from the page body so +that it won't be rendered twice. Level 1 headers in the remainder of the page +will be ignored. + +For example, the following page will have title "My Title" and the rendered +page body will begin with the level two header "Introduction." + + # My Title + + ## Introduction + + Introductory text with a list: + + * Item 1 + * Item 2 + + ## Second header + + Second section + +This plugin can be used with page templates that use <h1> tags for the page +title to produce a consistent header hierarchy in rendered pages while keeping +the Markdown source clean and free of meta directives. + +=head1 AUTHOR + +Jason Blevins <jrblevin@sdf.lonestar.org>, + +=head1 SEE ALSO + +ikiwiki Homepage: +http://ikiwiki.info/ + +ikiwiki Plugin Documentation: +http://ikiwiki.info/plugins/write/ + +=head1 LICENSE + +Copyright (C) 2008 Jason Blevins + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along +with this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. diff --git a/debian/copyright b/debian/copyright index a25660adf..ba0be2d85 100644 --- a/debian/copyright +++ b/debian/copyright @@ -155,6 +155,10 @@ Files: IkiWiki/Plugin/trail.pm Copyright: 2009-2012 Simon McVittie <http://smcv.pseudorandom.co.uk/> License: GPL-2+ +Files: IkiWiki/Plugin/h1title.pm +Copyright: © 2008 Jason Blevins +License: GPL-2+ + Files: doc/logo/* Copyright: © 2006 Recai Oktaş <roktas@debian.org> License: GPL-2+ diff --git a/doc/plugins/h1title.mdwn b/doc/plugins/h1title.mdwn new file mode 100644 index 000000000..4f9b165f3 --- /dev/null +++ b/doc/plugins/h1title.mdwn @@ -0,0 +1,5 @@ +[[!template id=plugin name=h1title core=0 author="[[jasonblevins]]"]] +[[!tag type/chrome]] + +This plugin uses the leading level 1 Markdown header (if present) to +set the page title and remove it from the page body. diff --git a/doc/users/jasonblevins.mdwn b/doc/users/jasonblevins.mdwn index e4a459e30..b3844dc95 100644 --- a/doc/users/jasonblevins.mdwn +++ b/doc/users/jasonblevins.mdwn @@ -16,7 +16,7 @@ more details. * [mdwn_itex][] - Works with the [[`mdwn`|plugins/mdwn]] plugin to convert inline [[todo/LaTeX]] expressions to MathML using `itex2MML`. - * [h1title][] - If present, use the leading level 1 Markdown header to + * [[plugins/h1title]] - If present, use the leading level 1 Markdown header to set the page title and remove it from the page body. * [code][] - Whole file and inline code snippet [[todo/syntax highlighting]] @@ -36,7 +36,6 @@ more details. `IS_HOMEPAGE` and `IN_DIR_SUBDIR`. [mdwn_itex]: http://jblevins.org/git/ikiwiki/plugins.git/plain/mdwn_itex.pm - [h1title]: http://jblevins.org/git/ikiwiki/plugins.git/plain/h1title.pm [code]: http://jblevins.org/projects/ikiwiki/code [metamail]: http://jblevins.org/git/ikiwiki/plugins.git/plain/metamail.pm [pandoc]: http://jblevins.org/git/ikiwiki/plugins.git/plain/pandoc.pm
would you like to write this?
diff --git a/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn b/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn index 063b42b7f..3ae7ce9bb 100644 --- a/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn +++ b/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn @@ -92,3 +92,8 @@ It's probably better to add the functionality I'm looking for in the editing-rel >>>> existing one. Also: in the logic immediately after generating the CONTRIBUTIONS link, >>>> we could actually call the real `htmllink` to handle the rest, which would remove the >>>> need for some of those utility functions. Great work! *— [[Jon]], 2024-09-10* + +>>>> Hey Adam, I'm in a position now where I could work on this. But I want to check, are +>>>> you interested in trying to write this? I could either write it myself, or I'd be happy +>>>> to mentor you and review you doing it instead, if you would like to make a contribution +>>>> to IkiWiki. Let me know! Thanks, *— [[Jon]], 2024-10-01*
nice!
diff --git a/doc/forum/paged_feeds___40__RFC_5005__41__.mdwn b/doc/forum/paged_feeds___40__RFC_5005__41__.mdwn index 8fcd2bb68..4dc91ecf2 100644 --- a/doc/forum/paged_feeds___40__RFC_5005__41__.mdwn +++ b/doc/forum/paged_feeds___40__RFC_5005__41__.mdwn @@ -5,3 +5,5 @@ The purpose is to support pagination of feeds: have (say) 5 entries in your most This might improve bandwidth for full-text entry/large entry feeds. It also might help with flooding aggregators, assuming the aggregators didn't blindly follow the links. I've no idea what client support is like. Does this sound interesting to anyone? *— [[Jon]], 2024-09-23* + +> Really interesting! Sounds like something we should implement, IMHO, if only as a way to pull "all the articles from this blog" kind of thing in a mechanical way. No idea what client support is either, as a RSS feed reader author myself, I had [no idea this existed in the first place](https://gitlab.com/anarcat/feed2exec/-/issues/33), yet this has been around for almost 20 years at this point, fascinating! (But then again, I've never really done much work trying to support that stuff and assumed the feedresader python module would do everything for me... Unfortunately, it doesn't, particularly with poorly formatted feeds, of course. See also [RSS Podcast Feed Inefficiency](https://www.earth.org.uk/RSS-efficiency.html). --[[anarcat]]
diff --git a/doc/forum/paged_feeds___40__RFC_5005__41__.mdwn b/doc/forum/paged_feeds___40__RFC_5005__41__.mdwn index e009c45f2..8fcd2bb68 100644 --- a/doc/forum/paged_feeds___40__RFC_5005__41__.mdwn +++ b/doc/forum/paged_feeds___40__RFC_5005__41__.mdwn @@ -1,6 +1,6 @@ I've [just learned](https://pleroma.debian.social/notice/AmEPTRoZiQifOD3hce) about [paged feeds](https://datatracker.ietf.org/doc/html/rfc5005): an RFC proposal for linking separate feed URIs together via `<link rel=prev`, `<link rel=next` etc. to specify an ordering. -The purpose is to support pagination of feeds: have (say) 5 entries in your most recent URI, and then the next 5 (or so) in another file/URI, that a compliant reader could fetch if required (or not, if not desired). +The purpose is to support pagination of feeds: have (say) 5 entries in your most recent URI, and then the next 5 (or so) in another file/URI, (etc etc) that a compliant reader could fetch if required (or not, if not desired). This might improve bandwidth for full-text entry/large entry feeds. It also might help with flooding aggregators, assuming the aggregators didn't blindly follow the links.
RFC 5005: paged (atom or rss) feeds
diff --git a/doc/forum/paged_feeds___40__RFC_5005__41__.mdwn b/doc/forum/paged_feeds___40__RFC_5005__41__.mdwn new file mode 100644 index 000000000..e009c45f2 --- /dev/null +++ b/doc/forum/paged_feeds___40__RFC_5005__41__.mdwn @@ -0,0 +1,7 @@ +I've [just learned](https://pleroma.debian.social/notice/AmEPTRoZiQifOD3hce) about [paged feeds](https://datatracker.ietf.org/doc/html/rfc5005): an RFC proposal for linking separate feed URIs together via `<link rel=prev`, `<link rel=next` etc. to specify an ordering. + +The purpose is to support pagination of feeds: have (say) 5 entries in your most recent URI, and then the next 5 (or so) in another file/URI, that a compliant reader could fetch if required (or not, if not desired). + +This might improve bandwidth for full-text entry/large entry feeds. It also might help with flooding aggregators, assuming the aggregators didn't blindly follow the links. + +I've no idea what client support is like. Does this sound interesting to anyone? *— [[Jon]], 2024-09-23*
Add Adventure Time wiki shortcut
diff --git a/doc/shortcuts.mdwn b/doc/shortcuts.mdwn index 7d1f49105..c8fde49fa 100644 --- a/doc/shortcuts.mdwn +++ b/doc/shortcuts.mdwn @@ -68,6 +68,7 @@ This page controls what shortcut links the wiki supports. * [[!shortcut name=pkgsrc url="http://pkgsrc.se/%S"]] * [[!shortcut name=doi url="http://dx.doi.org/%s" desc="doi:%s"]] * [[!shortcut name=arxiv url="http://arxiv.org/abs/%s" desc="arXiv:%s"]] +* [[!shortcut name=adventuretime url="https://breezewiki.com/adventuretime/wiki/%W"]] To add a new shortcut, use the `shortcut` [[ikiwiki/directive]]. In the url, "%s" is replaced with the
call the real htmllink in the tail
diff --git a/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn b/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn index 57a545a8b..063b42b7f 100644 --- a/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn +++ b/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn @@ -89,4 +89,6 @@ It's probably better to add the functionality I'm looking for in the editing-rel >>>> exports, so, we should review whether to add them to that list. Also, I'd rename the >>>> copy of `htmllink` to something unique (`myhtmllink`? you can probably do better than >>>> that) and reference that name in `linkify`, to quash a warning about redefining the ->>>> existing one. Great work! *— [[Jon]], 2024-09-10* +>>>> existing one. Also: in the logic immediately after generating the CONTRIBUTIONS link, +>>>> we could actually call the real `htmllink` to handle the rest, which would remove the +>>>> need for some of those utility functions. Great work! *— [[Jon]], 2024-09-10*
great work! a "pre-review"
diff --git a/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn b/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn index cc51b4d79..57a545a8b 100644 --- a/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn +++ b/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn @@ -77,3 +77,16 @@ It's probably better to add the functionality I'm looking for in the editing-rel >>> Thanks, here's my working [[modified link plugin|https://codeberg.org/AwesomeAdam54321/ikiplugins/src/branch/main/IkiWiki/Plugin/link_local.pm]] >>> based on your instructions. >>> Would the functionality be accepted into ikiwiki's link plugin? I could make adjustments if necessary. _— [[awesomeadam]], 2024-09-10_ + +>>>> Nice! I think I might use this myself, too: on [my site](https://jmtd.net) I have CGI +>>>> turned on for comments, but I don't do web-based page editing. I'll do a full review +>>>> once I'm back at work. For now, I'd say that this works well as an independent plugin +>>>> from `link.pm`, so it probably makes sense to keep it that way rather than modify +>>>> `link.pm`, but I'd like to see this as a plugin included in IkiWiki. One quick hint, +>>>> I noticed after a quick scan over: rather than copy the utility functions from +>>>> `IkiWiki.pm`, you can reference them with e.g. `IkiWiki::abs2rel`. This wouldn't be +>>>> necessary if we included those utility functions in the list of things that `IkiWiki.pm` +>>>> exports, so, we should review whether to add them to that list. Also, I'd rename the +>>>> copy of `htmllink` to something unique (`myhtmllink`? you can probably do better than +>>>> that) and reference that name in `linkify`, to quash a warning about redefining the +>>>> existing one. Great work! *— [[Jon]], 2024-09-10*
Add missing message author
diff --git a/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn b/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn index e900149bc..cc51b4d79 100644 --- a/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn +++ b/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn @@ -76,4 +76,4 @@ It's probably better to add the functionality I'm looking for in the editing-rel >>> Thanks, here's my working [[modified link plugin|https://codeberg.org/AwesomeAdam54321/ikiplugins/src/branch/main/IkiWiki/Plugin/link_local.pm]] >>> based on your instructions. ->>> Would the functionality be accepted into ikiwiki's link plugin? I could make adjustments if necessary. +>>> Would the functionality be accepted into ikiwiki's link plugin? I could make adjustments if necessary. _— [[awesomeadam]], 2024-09-10_
link_local: a modified link plugin
diff --git a/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn b/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn index 54191d648..e900149bc 100644 --- a/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn +++ b/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn @@ -73,3 +73,7 @@ It's probably better to add the functionality I'm looking for in the editing-rel >> Then, in the copy of `htmllink`, you can find the chunk of code which generates the links >> for missing pages (search for `"<span class=\"createlink\">`) and adjust it to be a static >> link to your `CONTRIBUTING` page. *— [[Jon]], 2024-09-09* + +>>> Thanks, here's my working [[modified link plugin|https://codeberg.org/AwesomeAdam54321/ikiplugins/src/branch/main/IkiWiki/Plugin/link_local.pm]] +>>> based on your instructions. +>>> Would the functionality be accepted into ikiwiki's link plugin? I could make adjustments if necessary.
Add reply to theme vote discussion
diff --git a/doc/users/awesomeadam/discussion.mdwn b/doc/users/awesomeadam/discussion.mdwn index 39aaf43f6..77a389b80 100644 --- a/doc/users/awesomeadam/discussion.mdwn +++ b/doc/users/awesomeadam/discussion.mdwn @@ -1,3 +1,5 @@ Thanks for participating in the [[forum/theme poll]]! Your vote was for antitheme, with your last commit message reading [Undo my vote for "other" theme, since I use the antitheme with local.css](https://source.ikiwiki.branchable.com/?p=source.git;a=blobdiff;f=doc/forum/theme_poll.mdwn;h=47cafc9369b6ea30c82494a9e3f1735f45e218d5;hp=f86b8e3726bf0f2c301ec6001873392cd6155565;hb=b250476ebe183adeb2eb0973ae800258518ddd8c;hpb=6efba197e496cbfe86fa7fb8ab065cc37e45c642). The intention of the poll choice was to capture people using the antitheme with only light modifications: if you've done any kind of theming or styling via local.css, the more appropriate poll choice would be "Other". *— [[Jon]], 2024-09-05* + +> Thanks for the clarification, I've changed my vote to "other" in [Change my vote from antitheme to "other" theme](http://source.ikiwiki.branchable.com/?p=source.git;a=commit;h=2bfbd13aaa86529ec681dc52b91c662ae650fb15) to better reflect that I customised the antitheme :-).
Change my vote from antitheme to "other" theme
diff --git a/doc/forum/theme_poll.mdwn b/doc/forum/theme_poll.mdwn index 47cafc936..730694300 100644 --- a/doc/forum/theme_poll.mdwn +++ b/doc/forum/theme_poll.mdwn @@ -1,9 +1,9 @@ Existing IkiWiki users: which [[themes]] do you use on your site? -[[!poll 2 "antitheme (i.e., none)" +[[!poll 1 "antitheme (i.e., none)" 1 "actiontabs" 0 "blueview" 0 goldtype 0 monochrome -4 "other, including heavily modified versions of the above" +5 "other, including heavily modified versions of the above" ]]
approach: override the `link` plugin
diff --git a/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn b/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn index 3eb34b249..54191d648 100644 --- a/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn +++ b/doc/todo/Make_recentchanges_CGI_more_configurable.mdwn @@ -65,3 +65,11 @@ It's probably better to add the functionality I'm looking for in the editing-rel > in any scenario where you don't want CGI is likely to have some risky corner cases. Cleaner > would be CGI off; a separate plugin handles dealing with ?-plugins; and anarcat's changes to > make recentchanges work properly with CGI off. *— [[Jon]], 2024-09-05* + +>> you'd need to make a copy of the `link` plugin, explicitly disable `link` and enable your +>> copy. You'd then need to add a (renamed?) copy of `htmllink` from `IkiWiki.pm` to the copy, +>> and call that instead, within the `linkify` subroutine. +>> +>> Then, in the copy of `htmllink`, you can find the chunk of code which generates the links +>> for missing pages (search for `"<span class=\"createlink\">`) and adjust it to be a static +>> link to your `CONTRIBUTING` page. *— [[Jon]], 2024-09-09*
theme poll vote
diff --git a/doc/users/awesomeadam/discussion.mdwn b/doc/users/awesomeadam/discussion.mdwn new file mode 100644 index 000000000..39aaf43f6 --- /dev/null +++ b/doc/users/awesomeadam/discussion.mdwn @@ -0,0 +1,3 @@ +Thanks for participating in the [[forum/theme poll]]! Your vote was for antitheme, with your last commit message reading [Undo my vote for "other" theme, since I use the antitheme with local.css](https://source.ikiwiki.branchable.com/?p=source.git;a=blobdiff;f=doc/forum/theme_poll.mdwn;h=47cafc9369b6ea30c82494a9e3f1735f45e218d5;hp=f86b8e3726bf0f2c301ec6001873392cd6155565;hb=b250476ebe183adeb2eb0973ae800258518ddd8c;hpb=6efba197e496cbfe86fa7fb8ab065cc37e45c642). + +The intention of the poll choice was to capture people using the antitheme with only light modifications: if you've done any kind of theming or styling via local.css, the more appropriate poll choice would be "Other". *— [[Jon]], 2024-09-05*
page.tmpl: don't generate an empty parentlinks span
Guard span id=parentlinks gen with HAS_PARENTLINKS.
Guard span id=parentlinks gen with HAS_PARENTLINKS.
diff --git a/doc/todo/don__39__t_generate_an_empty_parentlink_span.mdwn b/doc/todo/don__39__t_generate_an_empty_parentlink_span.mdwn index ceadfca5e..7332e0488 100644 --- a/doc/todo/don__39__t_generate_an_empty_parentlink_span.mdwn +++ b/doc/todo/don__39__t_generate_an_empty_parentlink_span.mdwn @@ -6,4 +6,6 @@ This was reported in Debian in 2009 <https://bugs.debian.org/cgi-bin/bugreport.c I actually closed it recently, because I disagreed with the suggested patch. However, there's a more agreeable fix: just wrap the parentlinks section in a test of HAS_PARENTLINKS. [[!tag patch]] +[[done]]. + *— [[Jon]], 2024-03-29* diff --git a/templates/page.tmpl b/templates/page.tmpl index a1991f6e4..ce84e5d56 100644 --- a/templates/page.tmpl +++ b/templates/page.tmpl @@ -45,11 +45,15 @@ <TMPL_IF HTML5><section class="pageheader"><TMPL_ELSE><div class="pageheader"></TMPL_IF> <TMPL_IF HTML5><header class="header"><TMPL_ELSE><div class="header"></TMPL_IF> <span> + +<TMPL_IF HAS_PARENTLINKS> <span class="parentlinks"> <TMPL_LOOP PARENTLINKS> <a href="<TMPL_VAR URL>"><TMPL_VAR PAGE></a>/ </TMPL_LOOP> </span> +</TMPL_IF> + <span class="title"> <TMPL_VAR TITLE> <TMPL_IF ISTRANSLATION>
admonitions: fix missing semi-colon in CSS
diff --git a/doc/style.css b/doc/style.css index 031cc9356..a2244d13f 100644 --- a/doc/style.css +++ b/doc/style.css @@ -607,7 +607,7 @@ a.login_large_btn:focus { background-repeat: no-repeat; background-position: 8px 8px; /* small gap around icon */ /* 32 is the expected size of the icons */ - min-height: 32px + min-height: 32px; padding: 8px 1em 8px 48px; /* 48 = 32 + 8 + 8 px */ } #content div.tip { background-image: url("smileys/admon-tip.png"); }
DuckDuckGo plugin for site searching
Adds a search form to the wiki, powered by DuckDuckGo. The quality of
results will depend on if/when DuckDuckGo have indexed your site, and
how recently.
DuckDuckGo market themselves as privacy-concious and claim to not track
your searches or purchases.
This is an alternative to the Google plugin (and is derived from it).
Adds a search form to the wiki, powered by DuckDuckGo. The quality of
results will depend on if/when DuckDuckGo have indexed your site, and
how recently.
DuckDuckGo market themselves as privacy-concious and claim to not track
your searches or purchases.
This is an alternative to the Google plugin (and is derived from it).
diff --git a/IkiWiki/Plugin/duckduckgo.pm b/IkiWiki/Plugin/duckduckgo.pm new file mode 100644 index 000000000..71b235463 --- /dev/null +++ b/IkiWiki/Plugin/duckduckgo.pm @@ -0,0 +1,53 @@ +#!/usr/bin/perl +package IkiWiki::Plugin::duckduckgo; + +use warnings; +use strict; +use IkiWiki 3.00; +use URI; + +sub import { + hook(type => "getsetup", id => "duckduckgo", call => \&getsetup); + hook(type => "checkconfig", id => "duckduckgo", call => \&checkconfig); + hook(type => "pagetemplate", id => "duckduckgo", call => \&pagetemplate); +} + +sub getsetup () { + return + plugin => { + safe => 1, + rebuild => 1, + section => "web", + }, +} + +sub checkconfig () { + if (! length $config{url}) { + error(sprintf(gettext("Must specify %s when using the %s plugin"), "url", "duckduckgo")); + } + + # This is a mass dependency, so if the search form template + # changes, every page is rebuilt. + add_depends("", "templates/duckduckgoform.tmpl"); +} + +my $form; +sub pagetemplate (@) { + my %params=@_; + my $page=$params{page}; + my $template=$params{template}; + + # Add search box to page header. + if ($template->query(name => "searchform")) { + if (! defined $form) { + my $searchform = template("duckduckgoform.tmpl", blind_cache => 1); + $searchform->param(url => $config{url}); + $searchform->param(html5 => $config{html5}); + $form=$searchform->output; + } + + $template->param(searchform => $form); + } +} + +1 diff --git a/doc/plugins/duckduckgo.mdwn b/doc/plugins/duckduckgo.mdwn new file mode 100644 index 000000000..5bca58332 --- /dev/null +++ b/doc/plugins/duckduckgo.mdwn @@ -0,0 +1,11 @@ +[[!template id=plugin name=duckduckgo author="[[Jon]]"]] +[[!tag type/web]] + +This plugin adds a search form to the wiki, using DuckDuckGo's site search. + +DuckDuckGo is asked to search for pages in the domain specified in the wiki's +`url` configuration parameter. Results will depend on whether DuckDuckGo has +indexed the site, and how recently. + +By comparison the [[search]] plugin offers full text search of only the wiki, +but requires that a search engine be installed on your site. diff --git a/templates/duckduckgoform.tmpl b/templates/duckduckgoform.tmpl new file mode 100644 index 000000000..e2c5f521c --- /dev/null +++ b/templates/duckduckgoform.tmpl @@ -0,0 +1,6 @@ +<form action="https://duckduckgo.com/" id=searchform> + <div> + <input type="text" autocomplete="off" name="q" id="searchbox" value="" size=16 placeholder="Search with DuckDuckGo" /> + <input type="hidden" name="sites" value="<TMPL_VAR URL>" /> + </div> +</form>
fix padding around admonitions
diff --git a/doc/style.css b/doc/style.css index 8578857af..031cc9356 100644 --- a/doc/style.css +++ b/doc/style.css @@ -607,8 +607,8 @@ a.login_large_btn:focus { background-repeat: no-repeat; background-position: 8px 8px; /* small gap around icon */ /* 32 is the expected size of the icons */ - min-height: 48px; /*48=32+8+8 but doesn't work with IE*/ - padding: 1em 1em 1em 48px; + min-height: 32px + padding: 8px 1em 8px 48px; /* 48 = 32 + 8 + 8 px */ } #content div.tip { background-image: url("smileys/admon-tip.png"); } #content div.note { background-image: url("smileys/admon-note.png"); }
parse insides of directives normally, add unit tests
diff --git a/IkiWiki/Plugin/admonition.pm b/IkiWiki/Plugin/admonition.pm index 0962a6180..012046fd2 100644 --- a/IkiWiki/Plugin/admonition.pm +++ b/IkiWiki/Plugin/admonition.pm @@ -19,6 +19,9 @@ sub import { sub preprocess { my %params = @_; my $text = shift; + my $format = pagetype($params{page}); + $text = IkiWiki::preprocess($params{page}, $params{destpage}, $text); + $text = IkiWiki::htmlize($params{page}, $params{destpage}, pagetype($params{page}), $text); # we use 'id' here instead of class because that's the hook # keyword above, but it's really a class we're setting, so that we # can reuse it multiple times. diff --git a/doc/plugins/admonition.mdwn b/doc/plugins/admonition.mdwn index db1cacdf6..8a41823ea 100644 --- a/doc/plugins/admonition.mdwn +++ b/doc/plugins/admonition.mdwn @@ -47,17 +47,24 @@ would be silly.</div> Also: -<span/><div class="caution">Note that markup does not work inside -directives. You can use the `<div>` tag directly instead, but keep in -mind that Markdown has some quirks regarding how it parses markup -inside HTML: it needs to think that it is a "span" element for markup -to be parsed. You can trick the parser by prefixing your `<div>` with -a `<span/>` or ` ` element to force it to be parsed.</div> +<span/><div class="caution">You can use the `<div>` tag directly +instead, but keep in mind that Markdown has some quirks regarding how +it parses markup inside HTML: it needs to think that it is a "span" +element for markup to be parsed. You can trick the parser by prefixing +your `<div>` with a `<span/>` or ` ` element to force it to be +parsed. You can also use the [[ikiwiki/directive/format]] directive +directly inside the div to format the text as Markdown (or whatever +you wish) directly. So this should also work: -<div class="tip">[[!format mdwn """Another workaround is to use the -[[ikiwiki/directive/format]] directive directly inside the div."""]]</div> + <div class="tip">\[[!format "this is *great*!"]]</div> -And finally: +Markup inside the directives is of course parsed normally, so this +also works as expected: + + \[[!tip "this is *great*!"]] +</div> + +And a final example: <div class="warning">Use warnings where there is a risk of bodily harm or data loss.</div> diff --git a/t/admonition.pm b/t/admonition.pm new file mode 100644 index 000000000..a2815ad9b --- /dev/null +++ b/t/admonition.pm @@ -0,0 +1,38 @@ +#!/usr/bin/perl + +package IkiWiki; + +use warnings; +use strict; +use Test::More tests => 13; +use Encode; + +BEGIN { use_ok("IkiWiki"); } +BEGIN { use_ok("IkiWiki::Render"); } +BEGIN { use_ok("IkiWiki::Plugin::admonition"); } +BEGIN { use_ok("IkiWiki::Plugin::mdwn"); } +BEGIN { use_ok("IkiWiki::Plugin::format"); } + +# Initialize htmlscrubber plugin +%config=IkiWiki::defaultconfig(); +$config{srcdir}=$config{destdir}="/dev/null"; +IkiWiki::loadplugins(); +IkiWiki::checkconfig(); +%IkiWiki::pagesources = ('inliner.mdwn' => "inliner.html", 'inlinee.mdwn' => "inlinee.html"); + +sub render_quick { + my $content = shift; + $content = IkiWiki::preprocess('inliner.mdwn', 'inlinee.mdwn', $content); + $content = IkiWiki::htmlize('inliner.mdwn', 'inlinee.mdwn', 'mdwn', $content); + return $content; +} +foreach my $type (qw/tip note important caution warning/) { + like(render_quick("[[!$type foo]]"), qr!<div class="$type">foo</div>\s+!, $type); +} +my $rendered = '<div class="tip">foo <em>bar</em> baz</div>\s*'; +my $not_rendered = '<div class="tip">foo \*bar\* baz</div>\s*'; +like(render_quick('[[!tip "foo *bar* baz"]]'), qr/$rendered/, 'renders'); +like(render_quick('<div class="tip">foo *bar* baz</div>'), qr!$not_rendered!, 'no rendering because mdwn'); +like(render_quick(' <div class="tip">foo *bar* baz</div>'), qr! $rendered!, 'nbsp hack'); +like(render_quick('<span/><div class="tip">foo *bar* baz</div>'), qr!<span />$rendered!, 'span hack'); +like(render_quick('<span/><div class="tip">[[!format mdwn "foo *bar* baz"]]</div>'), qr!<span />$rendered!, 'format hack');
clarify workarounds
diff --git a/doc/plugins/admonition.mdwn b/doc/plugins/admonition.mdwn index a2911c4ed..db1cacdf6 100644 --- a/doc/plugins/admonition.mdwn +++ b/doc/plugins/admonition.mdwn @@ -48,10 +48,14 @@ would be silly.</div> Also: <span/><div class="caution">Note that markup does not work inside -directives. For that, use the DIV tag directly. Keep in mind that -Markdown has some quirks as to parsing markup inside HTML blocks: it -needs to think that it is a "span" element, so you can prefix your -`<div>` with a `<span/>` element to force it to be parsed.</div> +directives. You can use the `<div>` tag directly instead, but keep in +mind that Markdown has some quirks regarding how it parses markup +inside HTML: it needs to think that it is a "span" element for markup +to be parsed. You can trick the parser by prefixing your `<div>` with +a `<span/>` or ` ` element to force it to be parsed.</div> + +<div class="tip">[[!format mdwn """Another workaround is to use the +[[ikiwiki/directive/format]] directive directly inside the div."""]]</div> And finally:
markdown quirks: content inside <div>s are *not* parsed,
... except in some weird circumstances, for example when there's a
quoted `<div>` block *inside* the div, or when the `<div>` element is
prefixed by some text, in which case markdown believes it *is* a span
element.
this is also a complete clusterfuck in commonmark:
http://spec.commonmark.org/0.24/#html-blocks
... except in some weird circumstances, for example when there's a
quoted `<div>` block *inside* the div, or when the `<div>` element is
prefixed by some text, in which case markdown believes it *is* a span
element.
this is also a complete clusterfuck in commonmark:
http://spec.commonmark.org/0.24/#html-blocks
diff --git a/doc/plugins/admonition.mdwn b/doc/plugins/admonition.mdwn index 084256ae2..a2911c4ed 100644 --- a/doc/plugins/admonition.mdwn +++ b/doc/plugins/admonition.mdwn @@ -45,11 +45,13 @@ will create an important section: admonitions. First, the CSS does not support that, and second, that would be silly.</div> - Also: -<div class="caution">Note that markup does not work inside -directives. For that, use the DIV tag directly.</div> +<span/><div class="caution">Note that markup does not work inside +directives. For that, use the DIV tag directly. Keep in mind that +Markdown has some quirks as to parsing markup inside HTML blocks: it +needs to think that it is a "span" element, so you can prefix your +`<div>` with a `<span/>` element to force it to be parsed.</div> And finally:
replace lorem ipsum by more useful examples
diff --git a/doc/plugins/admonition.mdwn b/doc/plugins/admonition.mdwn index 04e0499a8..084256ae2 100644 --- a/doc/plugins/admonition.mdwn +++ b/doc/plugins/admonition.mdwn @@ -15,30 +15,46 @@ sections of text using a custom style sheet and bright icons. * [[ikiwiki/directive/caution]] * [[ikiwiki/directive/warning]] -Or, in Ikiwiki markup: - - \[[!tip "Lorem ipsum dolor sit amet, consectetuer adipiscing elit."]] - \[[!note "Vivamus id enim."]] - \[[!important "In id erat non orci commodo lobortis."]] - \[[!caution "In id erat non orci commodo lobortis."]] - \[[!warning "Phasellus neque orci, porta a, aliquet quis, semper a, massa."]] - -Those directives simply create a `<div>` elements in the right -style. So the above can also be simply written as: - - <div class="tip">Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</div> - <div class="note">Vivamus id enim.</div> - <div class="important">In id erat non orci commodo lobortis.</div> - <div class="caution">In id erat non orci commodo lobortis.</div> - <div class="warning">Phasellus neque orci, porta a, aliquet quis, semper a, massa.</div> - -Which will render as: - -<div class="tip">Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</div> -<div class="note">Vivamus id enim.</div> -<div class="important">In id erat non orci commodo lobortis.</div> -<div class="caution">In id erat non orci commodo lobortis.</div> -<div class="warning">Phasellus neque orci, porta a, aliquet quis, semper a, massa.</div> +For example: + + \[[!tip "Admonitions should be used with care. A page riddled with admonitions will look restless and will be harder to follow than a page where admonitions are used sparingly."]] + +This will render as: + +<div class="tip">Admonitions should be used with care. A page riddled +with admonitions will look restless and will be harder to follow than +a page where admonitions are used sparingly.</div> + +Here's other examples: + +<div class="note"> +The directive only creates a `<div>` with the appropriate style. You +can of course create a `<div>` yourself. For example, the following +will create an important section: + + <div class="important">You can't put admonitions inside + admonitions. First, the CSS does not support that, and second, + that would be silly.!</div> + +... like this: +</div> + +... well, like this really: + +<div class="important">You can't put admonitions inside +admonitions. First, the CSS does not support that, and second, that +would be silly.</div> + + +Also: + +<div class="caution">Note that markup does not work inside +directives. For that, use the DIV tag directly.</div> + +And finally: + +<div class="warning">Use warnings where there is a risk of bodily harm +or data loss.</div> The admonition plugin does not need to be enabled for the `<div>` to render properly. The plugin only enables the directive shortcuts, the
add documentation for the directives and sample rendering
diff --git a/doc/ikiwiki/directive/caution.mdwn b/doc/ikiwiki/directive/caution.mdwn new file mode 100644 index 000000000..f947f6d28 --- /dev/null +++ b/doc/ikiwiki/directive/caution.mdwn @@ -0,0 +1,17 @@ +The `caution` directive is provided by the +[[!iki plugins/admonition desc=admonition]] plugin. + +The following markup: + + \[[!caution "Lorem ipsum dolor sit amet, consectetuer adipiscing elit."]] + +Will show: + +<div class="caution">Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</div> + +It generates the following HTML, which is the equivalent: + + <div class="caution">Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</div> + +Other admonitions are available, see +[[!iki plugins/admonition desc=admonition]] for more and rationale. diff --git a/doc/ikiwiki/directive/important.mdwn b/doc/ikiwiki/directive/important.mdwn new file mode 100644 index 000000000..caed2d2bc --- /dev/null +++ b/doc/ikiwiki/directive/important.mdwn @@ -0,0 +1,17 @@ +The `important` directive is provided by the +[[!iki plugins/admonition desc=admonition]] plugin. + +The following markup: + + \[[!important "Lorem ipsum dolor sit amet, consectetuer adipiscing elit."]] + +Will show: + +<div class="important">Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</div> + +It generates the following HTML, which is the equivalent: + + <div class="important">Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</div> + +Other admonitions are available, see +[[!iki plugins/admonition desc=admonition]] for more and rationale. diff --git a/doc/ikiwiki/directive/note.mdwn b/doc/ikiwiki/directive/note.mdwn new file mode 100644 index 000000000..bb3e788ca --- /dev/null +++ b/doc/ikiwiki/directive/note.mdwn @@ -0,0 +1,17 @@ +The `note` directive is provided by the +[[!iki plugins/admonition desc=admonition]] plugin. + +The following markup: + + \[[!note "Lorem ipsum dolor sit amet, consectetuer adipiscing elit."]] + +Will show: + +<div class="note">Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</div> + +It generates the following HTML, which is the equivalent: + + <div class="note">Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</div> + +Other admonitions are available, see +[[!iki plugins/admonition desc=admonition]] for more and rationale. diff --git a/doc/ikiwiki/directive/tip.mdwn b/doc/ikiwiki/directive/tip.mdwn new file mode 100644 index 000000000..5422c4081 --- /dev/null +++ b/doc/ikiwiki/directive/tip.mdwn @@ -0,0 +1,17 @@ +The `tip` directive is provided by the +[[!iki plugins/admonition desc=admonition]] plugin. + +The following markup: + + \[[!tip "Lorem ipsum dolor sit amet, consectetuer adipiscing elit."]] + +Will show: + +<div class="tip">Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</div> + +It generates the following HTML, which is the equivalent: + + <div class="tip">Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</div> + +Other admonitions are available, see +[[!iki plugins/admonition desc=admonition]] for more and rationale. diff --git a/doc/ikiwiki/directive/warning.mdwn b/doc/ikiwiki/directive/warning.mdwn new file mode 100644 index 000000000..1fb9fb8d2 --- /dev/null +++ b/doc/ikiwiki/directive/warning.mdwn @@ -0,0 +1,17 @@ +The `warning` directive is provided by the +[[!iki plugins/admonition desc=admonition]] plugin. + +The following markup: + + \[[!warning "Lorem ipsum dolor sit amet, consectetuer adipiscing elit."]] + +Will show: + +<div class="warning">Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</div> + +It generates the following HTML, which is the equivalent: + + <div class="warning">Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</div> + +Other admonitions are available, see +[[!iki plugins/admonition desc=admonition]] for more and rationale. diff --git a/doc/plugins/contrib/admonition.mdwn b/doc/plugins/admonition.mdwn similarity index 74% rename from doc/plugins/contrib/admonition.mdwn rename to doc/plugins/admonition.mdwn index 2b81c9881..04e0499a8 100644 --- a/doc/plugins/contrib/admonition.mdwn +++ b/doc/plugins/admonition.mdwn @@ -32,6 +32,18 @@ style. So the above can also be simply written as: <div class="caution">In id erat non orci commodo lobortis.</div> <div class="warning">Phasellus neque orci, porta a, aliquet quis, semper a, massa.</div> +Which will render as: + +<div class="tip">Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</div> +<div class="note">Vivamus id enim.</div> +<div class="important">In id erat non orci commodo lobortis.</div> +<div class="caution">In id erat non orci commodo lobortis.</div> +<div class="warning">Phasellus neque orci, porta a, aliquet quis, semper a, massa.</div> + +The admonition plugin does not need to be enabled for the `<div>` to +render properly. The plugin only enables the directive shortcuts, the +CSS and icons are always available. + # Rationale The idea behind the directives is to make the the CSS elements easier @@ -39,18 +51,3 @@ to discover through the builtin documentation. Obviously, more admonitions can be created simply by adding similar icons and CSS elements. Of course, you will not get the above directives expanded automatically unless you patch the admonition plugin, unfortunately. - -# Code - -[[!template id=gitbranch branch=anarcat/admonitions author="[[anarcat]]"]] - -The [[!taglink patch]] is available from -[anarcat's "admonition" branch][] and is designed to be merged in -Ikiwiki directly: - - git clone -b admonitions git://src.anarc.at/ikiwiki.git - -[anarcat's "admonition" branch]: http://src.anarc.at/ikiwiki.git/shortlog/refs/heads/admonitions - -See also [[todo/admonitions]] for the discussion leading to the -creation of this plugin.
allow divs to show admonitions
diff --git a/doc/style.css b/doc/style.css index 7762f8beb..8578857af 100644 --- a/doc/style.css +++ b/doc/style.css @@ -595,3 +595,24 @@ a.login_large_btn:focus { padding: 4px 4px; } } + +/* admonition start */ +#content div.caution, +#content div.important, +#content div.note, +#content div.tip, +#content div.warning { + border: 1px solid #aaa; + margin: 1em 3em 1em 3em; + background-repeat: no-repeat; + background-position: 8px 8px; /* small gap around icon */ + /* 32 is the expected size of the icons */ + min-height: 48px; /*48=32+8+8 but doesn't work with IE*/ + padding: 1em 1em 1em 48px; +} +#content div.tip { background-image: url("smileys/admon-tip.png"); } +#content div.note { background-image: url("smileys/admon-note.png"); } +#content div.important { background-image: url("smileys/admon-important.png"); } +#content div.caution { background-image: url("smileys/admon-caution.png"); } +#content div.warning { background-image: url("smileys/admon-warning.png"); } +/* admonition end */
import admonitions logos from MoinMoin
those admonitions are not clearly sourced in MoinMoin. the license is
also unclear in the python-moinmoin debian package, marked as
UNKNOWN. However, I did some research through Google images and could
find GPL-compatible licenses for all files, so I feel that it is
reasonable to include them here, in good faith.
* [admon-warning.png][] seems to be [public domain according to this sketchy site][]
* [admon-note.png][] seems to have a [source in XFCE][], as part of
the notes plugin
* [admon-tip.png][] is used in the Debian release notes, so is
presumably fine as well, see [note.png][]
* [admon-important.png][], same, see [important.png][]
* [admon-caution.png][] can be found in Mediawiki as well, which is
a good source of icons. According to Debian, some are public domain,
some are LGPL (!?). In MediaWiki itself, the source of that file is
lost in the mists of time.
[note.png]: https://www.debian.org/releases/testing/amd64/release-notes/images/note.png
[important.png]: https://www.debian.org/releases/testing/amd64/release-notes/images/important.png
[public domain according to this sketchy site]: http://all-free-download.com/free-vector/download/tango_process_stop_115912.html
[source in XFCE]: http://git.xfce.org/panel-plugins/xfce4-notes-plugin/tree/data/icons/scalable/xfce4-notes-plugin.svg
[admon-warning.png]: https://moinmo.in/moin_static19/modernized/img/admon-warning.png
[admon-note.png]: https://moinmo.in/moin_static19/modernized/img/admon-note.png
[admon-tip.png]: https://moinmo.in/moin_static19/modernized/img/admon-tip.png
[admon-important.png]: https://moinmo.in/moin_static19/modernized/img/admon-important.png
[admon-caution.png]: https://moinmo.in/moin_static19/modernized/img/admon-caution.png
those admonitions are not clearly sourced in MoinMoin. the license is
also unclear in the python-moinmoin debian package, marked as
UNKNOWN. However, I did some research through Google images and could
find GPL-compatible licenses for all files, so I feel that it is
reasonable to include them here, in good faith.
* [admon-warning.png][] seems to be [public domain according to this sketchy site][]
* [admon-note.png][] seems to have a [source in XFCE][], as part of
the notes plugin
* [admon-tip.png][] is used in the Debian release notes, so is
presumably fine as well, see [note.png][]
* [admon-important.png][], same, see [important.png][]
* [admon-caution.png][] can be found in Mediawiki as well, which is
a good source of icons. According to Debian, some are public domain,
some are LGPL (!?). In MediaWiki itself, the source of that file is
lost in the mists of time.
[note.png]: https://www.debian.org/releases/testing/amd64/release-notes/images/note.png
[important.png]: https://www.debian.org/releases/testing/amd64/release-notes/images/important.png
[public domain according to this sketchy site]: http://all-free-download.com/free-vector/download/tango_process_stop_115912.html
[source in XFCE]: http://git.xfce.org/panel-plugins/xfce4-notes-plugin/tree/data/icons/scalable/xfce4-notes-plugin.svg
[admon-warning.png]: https://moinmo.in/moin_static19/modernized/img/admon-warning.png
[admon-note.png]: https://moinmo.in/moin_static19/modernized/img/admon-note.png
[admon-tip.png]: https://moinmo.in/moin_static19/modernized/img/admon-tip.png
[admon-important.png]: https://moinmo.in/moin_static19/modernized/img/admon-important.png
[admon-caution.png]: https://moinmo.in/moin_static19/modernized/img/admon-caution.png
diff --git a/doc/smileys/admon-caution.png b/doc/smileys/admon-caution.png new file mode 100644 index 000000000..750ae97c6 Binary files /dev/null and b/doc/smileys/admon-caution.png differ diff --git a/doc/smileys/admon-important.png b/doc/smileys/admon-important.png new file mode 100644 index 000000000..c5726d5a0 Binary files /dev/null and b/doc/smileys/admon-important.png differ diff --git a/doc/smileys/admon-note.png b/doc/smileys/admon-note.png new file mode 100644 index 000000000..d01b8c636 Binary files /dev/null and b/doc/smileys/admon-note.png differ diff --git a/doc/smileys/admon-tip.png b/doc/smileys/admon-tip.png new file mode 100644 index 000000000..2ac57475c Binary files /dev/null and b/doc/smileys/admon-tip.png differ diff --git a/doc/smileys/admon-warning.png b/doc/smileys/admon-warning.png new file mode 100644 index 000000000..f5c7a6f9b Binary files /dev/null and b/doc/smileys/admon-warning.png differ