diff --git a/doc/templates/index.rst b/doc/templates/index.rst index 9f683b8d9..738f99137 100644 --- a/doc/templates/index.rst +++ b/doc/templates/index.rst @@ -7,3 +7,5 @@ Templates :numbered: template-command + template-dnf5-plugin + template-libdnf5-plugin diff --git a/doc/templates/template-dnf5-plugin.rst b/doc/templates/template-dnf5-plugin.rst new file mode 100644 index 000000000..20f2e54cd --- /dev/null +++ b/doc/templates/template-dnf5-plugin.rst @@ -0,0 +1,17 @@ +DNF5 Plugin Template +==================== + +Below is a template code for a DNF5 plugin. For the complete tutorial on writing +DNF5 plugins, refer to :ref:`dnf5 plugins tutorial`. + +``dnf5-plugins/template_plugin/template_cmd_plugin.cpp`` + +.. literalinclude:: dnf5-plugin/template_cmd_plugin.cpp + :language: c++ + :linenos: + +``dnf5-plugins/template_plugin/CMakeLists.txt`` + +.. literalinclude:: dnf5-plugin/CMakeLists.txt + :language: cmake + :linenos: diff --git a/doc/templates/template-libdnf5-plugin.rst b/doc/templates/template-libdnf5-plugin.rst new file mode 100644 index 000000000..2768a5dd6 --- /dev/null +++ b/doc/templates/template-libdnf5-plugin.rst @@ -0,0 +1,23 @@ +LIBDNF5 Plugin Template +======================= + +Below is a template code for a LIBDNF5 plugin. For the complete tutorial +on writing LIBDNF5 plugins, refer to :ref:`libdnf5 plugins tutorial`. + +``libdnf5-plugins/template/template.cpp`` + +.. literalinclude:: libdnf5-plugin/template.cpp + :language: c++ + :linenos: + +``libdnf5-plugins/template/CMakeLists.txt`` + +.. literalinclude:: libdnf5-plugin/CMakeLists.txt + :language: cmake + :linenos: + +``libdnf5-plugins/template/template.conf`` + +.. literalinclude:: libdnf5-plugin/template.conf + :language: cfg + :linenos: