14:01:45 <masin> Hello! I'm just trying to extend my Nikola instance a little bit by integrating Mastodon as a comment system as described in https://sd.ai/blog/2023-10-19/integrating-mastodon-and-ghost/ for Ghost. I referred to https://plugins.getnikola.com/v8/cactuscomments/ as an example. But I stumbled upon a few hurdles: I'd need to add some files to the output, a js and a css file. I found out that this would be the job for a Task or a 14:01:45 <masin> gin. But the comments are of type CommentSystem. What would be the proper way to achieve that? Should I declare a Task or LateTask object in the same file and instantiate that from my CommentSystem plugin? 14:06:51 <masin> Then, another hurdle would be that each blogpost needs a Mastodon post ID. I could inject it using a reStructured Text raw directive but it looks ugly. I thought about extending Nikola with a custom reST directive. The docs refer to media.py as an example, https://github.com/getnikola/nikola/blob/master/nikola/plugins/compile/rest/media.py but I don't get it. It would help a little bit if I found documentation on what this di 14:06:51 <masin> and how to use it but I find "only" https://getnikola.com/handbook.html#media. In media.py the name is defined as "rest_media", the directive though is called "media". How is this name derived? 14:07:40 <ChrisWarrick> masin: if you’re adding CSS or JS, put them in the files/ folder of your site 14:07:54 <ChrisWarrick> masin: for the mastodon post ID, you can use post metadata, they are accessible from templates 14:09:35 <masin> ChrisWarrick: Wouldn't adding them directly make the plugin non-deployable, e.g. if I wanted to offer it for download? Putting those files there is my current workaround, I just wanted to understand if there's a way at all for plugins to provide additional files at all. 14:10:14 <masin> ChrisWarrick: Post metadata? I'll need to check that out … :-) 14:11:38 <ChrisWarrick> masin: the localsearch plugin does its own file copying via tasks, there is no common facility to do it automatically 14:11:50 <ChrisWarrick> masin: post metadata is the thing at the top of your .rst file, you can add anything here 14:13:41 <masin> ChrisWarrick: yes, I know, but I didn't know I could put anything there. At least, Nikola didn't complain about `.. mastodon: 1234567890`. I'll now try to find out how to use that in my commentsystem class. Thanks for the hints! 14:13:52 <ChrisWarrick> you’re welcome! 14:14:03 <ChrisWarrick> try something like ${post.meta('mastodon')} in the template 14:35:40 <masin> Nice. Mako if conditionals accept 'and'. 14:37:09 <masin> Whyever the cactus comments plugin checks for comment_system_id, I do it, too, and additionally "and post.meta('mastodon')", and it works. Magic! 15:20:18 <masin> What's the proper way to use variables from conf.py in templates? 15:48:45 <ChrisWarrick> masin: https://getnikola.com/template-variables.html or GLOBAL_CONTEXT 17:09:33 <masin> Great, it works! :-) 17:09:44 <masin> Thanks for your help, ChrisWarrick 17:10:20 <ChrisWarrick> you’re welcome! 17:10:28 <masin> Now I have to make a git repo out of it and write a README. Maybe other people may find it useful. 17:12:18 <masin> https://blog.wiedner.berlin/posts/umzug-auf-nikola/ is currently the only blog post with (test) comments. 17:56:44 <masin> https://github.com/MasinAD/nikola-mastodoncomments/ 17:58:08 <masin> I don't think it's fit for inclusion in nikola/plugins as long as the files don't get copied appropriately. But maybe someone wants to link to it. 18:08:35 <ChrisWarrick> masin: you should put it in the getnikola/plugins repo 18:08:40 <ChrisWarrick> masin: it’s fine to have setup instructions 18:09:29 <masin> How do I do it? Clone the plugins repo, add my plugin, pull request? 18:10:37 <ChrisWarrick> yes 18:10:57 <masin> Will do. 20:20:02 <KwBot> [plugins] MasinAD opened pull request #433 (MasinAD:master): Added comment system plugin mastodoncomments https://github.com/getnikola/plugins/pull/433 20:20:02 <KwBot> [plugins] MasinAD opened pull request #433 (MasinAD:master): Added comment system plugin mastodoncomments https://github.com/getnikola/plugins/pull/433 20:20:02 <KwBot> [plugins] MasinAD opened pull request #433 (MasinAD:master): Added comment system plugin mastodoncomments https://github.com/getnikola/plugins/pull/433 20:20:02 <KwBot> [plugins] MasinAD opened pull request #433 (MasinAD:master): Added comment system plugin mastodoncomments https://github.com/getnikola/plugins/pull/433 20:20:02 <KwBot> [plugins] MasinAD opened pull request #433 (MasinAD:master): Added comment system plugin mastodoncomments https://github.com/getnikola/plugins/pull/433 20:20:02 <KwBot> [plugins] MasinAD opened pull request #433 (MasinAD:master): Added comment system plugin mastodoncomments https://github.com/getnikola/plugins/pull/433 23:59:37 <KwBot> [nikola] Kwpolska assigned issue #3741 to Kwpolska: New plugin manager does not support symlinks https://github.com/getnikola/nikola/issues/3741 23:59:37 <KwBot> [nikola] Kwpolska assigned issue #3741 to Kwpolska: New plugin manager does not support symlinks https://github.com/getnikola/nikola/issues/3741 23:59:37 <KwBot> [nikola] Kwpolska assigned issue #3741 to Kwpolska: New plugin manager does not support symlinks https://github.com/getnikola/nikola/issues/3741 23:59:37 <KwBot> [nikola] Kwpolska assigned issue #3741 to Kwpolska: New plugin manager does not support symlinks https://github.com/getnikola/nikola/issues/3741 23:59:37 <KwBot> [nikola] Kwpolska assigned issue #3741 to Kwpolska: New plugin manager does not support symlinks https://github.com/getnikola/nikola/issues/3741 23:59:37 <KwBot> [nikola] Kwpolska assigned issue #3741 to Kwpolska: New plugin manager does not support symlinks https://github.com/getnikola/nikola/issues/3741 23:59:37 <KwBot> [nikola] Kwpolska assigned issue #3741 to Kwpolska: New plugin manager does not support symlinks https://github.com/getnikola/nikola/issues/3741 23:59:37 <KwBot> [nikola] Kwpolska assigned issue #3741 to Kwpolska: New plugin manager does not support symlinks https://github.com/getnikola/nikola/issues/3741 23:59:37 <KwBot> [nikola] Kwpolska assigned issue #3741 to Kwpolska: New plugin manager does not support symlinks https://github.com/getnikola/nikola/issues/3741 23:59:37 <KwBot> [nikola] Kwpolska assigned issue #3741 to Kwpolska: New plugin manager does not support symlinks https://github.com/getnikola/nikola/issues/3741 23:59:37 <KwBot> [nikola] Kwpolska assigned issue #3741 to Kwpolska: New plugin manager does not support symlinks https://github.com/getnikola/nikola/issues/3741 23:59:37 <KwBot> [nikola] Kwpolska assigned issue #3741 to Kwpolska: New plugin manager does not support symlinks https://github.com/getnikola/nikola/issues/3741 23:59:38 <KwBot> [nikola] Kwpolska opened issue #3741: New plugin manager does not support symlinks https://github.com/getnikola/nikola/issues/3741 23:59:38 <KwBot> [nikola] Kwpolska opened issue #3741: New plugin manager does not support symlinks https://github.com/getnikola/nikola/issues/3741 23:59:38 <KwBot> [nikola] Kwpolska opened issue #3741: New plugin manager does not support symlinks https://github.com/getnikola/nikola/issues/3741 23:59:38 <KwBot> [nikola] Kwpolska opened issue #3741: New plugin manager does not support symlinks https://github.com/getnikola/nikola/issues/3741 23:59:38 <KwBot> [nikola] Kwpolska opened issue #3741: New plugin manager does not support symlinks https://github.com/getnikola/nikola/issues/3741 23:59:38 <KwBot> [nikola] Kwpolska opened issue #3741: New plugin manager does not support symlinks https://github.com/getnikola/nikola/issues/3741