comparison docs/usage/customization.rst @ 8655:e3d8f4bc3ce7

extensions: rename 'rcextensions' into 'extensions' but provide compatibility The 'rc' prefix is legacy. Rename 'rcextensions' into 'extensions', updating all references. Compatibility with the old name will be retained for a while, and removed in a later release. Migrating is as simple as renaming a file.
author Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
date Tue, 06 Oct 2020 20:14:59 +0200
parents 3b54bcf6d128
children
comparison
equal deleted inserted replaced
8654:2228102b99ab 8655:e3d8f4bc3ce7
37 .. _bootstrap 3: https://getbootstrap.com/docs/3.3/ 37 .. _bootstrap 3: https://getbootstrap.com/docs/3.3/
38 .. _bootstrap variables: https://getbootstrap.com/docs/3.3/customize/#less-variables 38 .. _bootstrap variables: https://getbootstrap.com/docs/3.3/customize/#less-variables
39 .. _less: http://lesscss.org/ 39 .. _less: http://lesscss.org/
40 40
41 41
42 Behavioral customization: rcextensions 42 Behavioral customization: Kallithea extensions
43 -------------------------------------- 43 ----------------------------------------------
44 44
45 Some behavioral customization can be done in Python using ``rcextensions``, a 45 Some behavioral customization can be done in Python using Kallithea
46 custom Python package that can extend Kallithea functionality. 46 ``extensions``, a custom Python file you can create to extend Kallithea
47 functionality.
47 48
48 With ``rcextensions`` it's possible to add additional mappings for Whoosh 49 With ``extensions`` it's possible to add additional mappings for Whoosh
49 indexing and statistics, to add additional code into the push/pull/create/delete 50 indexing and statistics, to add additional code into the push/pull/create/delete
50 repository hooks (for example to send signals to build bots such as Jenkins) and 51 repository hooks (for example to send signals to build bots such as Jenkins) and
51 even to monkey-patch certain parts of the Kallithea source code (for example 52 even to monkey-patch certain parts of the Kallithea source code (for example
52 overwrite an entire function, change a global variable, ...). 53 overwrite an entire function, change a global variable, ...).
53 54
54 To generate a skeleton extensions package, run:: 55 To generate a skeleton extensions package, run::
55 56
56 kallithea-cli extensions-create -c my.ini 57 kallithea-cli extensions-create -c my.ini
57 58
58 This will create an ``rcextensions`` package next to the specified ``ini`` file. 59 This will create an ``extensions.py`` file next to the specified ``ini`` file.
59 See the ``__init__.py`` file inside the generated ``rcextensions`` package 60 You can find more details inside this file.
60 for more details. 61
62 For compatibility with previous releases of Kallithea, a directory named
63 ``rcextensions`` with a file ``__init__.py`` inside of it can also be used. If
64 both an ``extensions.py`` file and an ``rcextensions`` directory are found, only
65 ``extensions.py`` will be loaded. Note that the name ``rcextensions`` is
66 deprecated and support for it will be removed in a future release.
61 67
62 68
63 Behavioral customization: code changes 69 Behavioral customization: code changes
64 -------------------------------------- 70 --------------------------------------
65 71