Many thanks for the help Chris and Roberto! I'll try to play a bit in the next days/weeks :)
Cheers, Luca On Mon, Aug 5, 2019, 01:46 Roberto Alsina <rals...@kde.org> wrote: > > > On Sun, Aug 4, 2019 at 4:19 AM Luca Cerone <luca.cer...@gmail.com> wrote: > >> Hi everybody, >> I'd like to learn more about Nikola internals and I thought that >> contributing to the codebase would be a good way to learn about it. >> >> > Cool! > > > >> At some point I would like to add some extra functionalities but now I >> struggle a bit to understand well how things work >> (I don't know yapsi, nor pydoit and other technologies used by Nikola), >> which is why I think contributing first would be best and the chance to >> thank all the developers for their efforts. >> >> > Good news: you may never need to understand Yapsy :-) > > Basically, everything is wrapped so that to build a plugin you just need > to: > > 1. Figure out what kind of plugin it is. > * Is it a task? (if it's something that needs to run every time > something or other changes, then yes) > * Is it a compiler for a specific markup? > * Is it a shortcode that can be used to extend markups? > * Is it a taxonomy? (Meaning: is it used to group posts and pages by a > common feature, like sharing a tag or an author?) > > If you can't figure it out just write down how you expect it to work, what > you want it to do and ask here. > > 2. Implement a class inheriting the desired kind of plugin and put it in > nikola/plugins/whatever > 3. Add a metadata file (just do what I do and copy one that feels similar > and change the name ;-) > > That is it. > > As for doit ... IF you are doing a Task plugin you need to understand a > little, but basically: > > * You implement a generator that yields tasks > * tasks are dictionaries with specific fields in them (see > https://pydoit.org/tasks.html ) > > Tasks can get hairy because dependency control is very important and a bit > hard to get right. > > As for the internals ... Nikola is ~90% a pile of plugins that get called > as needed. The data flow in the other 10% is a bit dense, but it's > perfectly possible to never touch it. > > > > >> Do you have any advice on getting started? >> >> Thanks a lot for your help! >> >> Luca >> >> -- >> You received this message because you are subscribed to the Google Groups >> "nikola-discuss" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to nikola-discuss+unsubscr...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/nikola-discuss/6ac7dc16-0da9-4b91-8711-bf8fe781a4a3%40googlegroups.com >> . >> > -- > You received this message because you are subscribed to the Google Groups > "nikola-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to nikola-discuss+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/nikola-discuss/CALXDAfo3Pix3TqH%2BeLDx6%2BM%2Bp0mc0ApUAqEEZmKJCz5Z5exNNQ%40mail.gmail.com > <https://groups.google.com/d/msgid/nikola-discuss/CALXDAfo3Pix3TqH%2BeLDx6%2BM%2Bp0mc0ApUAqEEZmKJCz5Z5exNNQ%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "nikola-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to nikola-discuss+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/nikola-discuss/CAFnz2--BXg9ZjXL08GtL8-_vgQtQcjYbAhd5eVG2A4GHBYupZQ%40mail.gmail.com.