Skip to content

Commit

Permalink
Start plugin using lektor dev new_plugin.
Browse files Browse the repository at this point in the history
  • Loading branch information
rlaverde committed Mar 9, 2017
0 parents commit 90c80c1
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
dist
build
*.pyc
*.pyo
*.egg-info
12 changes: 12 additions & 0 deletions lektor_tipue_search.py
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
15 changes: 15 additions & 0 deletions setup.py
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',
]
}
)

0 comments on commit 90c80c1

Please sign in to comment.