Skip to content

Commit

Permalink
doc: Add template pages with plugin examples
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-kolarik authored and j-mracek committed Jan 2, 2024
1 parent 7e8273c commit 2508120
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
2 changes: 2 additions & 0 deletions doc/templates/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ Templates
:numbered:

template-command
template-dnf5-plugin
template-libdnf5-plugin
17 changes: 17 additions & 0 deletions doc/templates/template-dnf5-plugin.rst
Original file line number Diff line number Diff line change
@@ -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:
23 changes: 23 additions & 0 deletions doc/templates/template-libdnf5-plugin.rst
Original file line number Diff line number Diff line change
@@ -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:

0 comments on commit 2508120

Please sign in to comment.