-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start plugin using lektor dev new_plugin.
- Loading branch information
0 parents
commit 90c80c1
Showing
3 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
dist | ||
build | ||
*.pyc | ||
*.pyo | ||
*.egg-info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# -*- coding: utf-8 -*- | ||
from lektor.pluginsystem import Plugin | ||
|
||
|
||
class TipueSearchPlugin(Plugin): | ||
name = u'Lektor Tipue Search' | ||
description = u'Add your description here.' | ||
|
||
def on_process_template_context(self, context, **extra): | ||
def test_function(): | ||
return 'Value from plugin %s' % self.name | ||
context['test_function'] = test_function |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from setuptools import setup | ||
|
||
setup( | ||
name='lektor-tipue-search', | ||
version='0.1', | ||
author=u'Rafael Laverde,,,', | ||
author_email='[email protected]', | ||
license='MIT', | ||
py_modules=['lektor_tipue_search'], | ||
entry_points={ | ||
'lektor.plugins': [ | ||
'tipue-search = lektor_tipue_search:TipueSearchPlugin', | ||
] | ||
} | ||
) |