Skip to content

Commit

Permalink
Merge branch 'master' into more-rstcss-fixes
Browse files Browse the repository at this point in the history
I used GitHub to create the branch, why did it go wrong?
  • Loading branch information
Kwpolska committed Jul 4, 2015
2 parents 2fd19fa + e8ce9bb commit 09f2f2c
Show file tree
Hide file tree
Showing 17 changed files with 67 additions and 8 deletions.
6 changes: 0 additions & 6 deletions nikola/data/themes/base/assets/css/rst.css
Expand Up @@ -140,12 +140,6 @@ html[dir="rtl"] div.line-block div.line-block {
div.sidebar {
margin-left: 2em;
min-height: 20px;
/*TODO
background-color: #f5f5f5;
border: 1px solid #e3e3e3;
border-radius: 4px;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);*/
width: 40% ;
float: right ;
clear: right }
Expand Down
2 changes: 2 additions & 0 deletions nikola/nikola.py
Expand Up @@ -60,6 +60,7 @@
Command,
LateTask,
PageCompiler,
CompilerExtension,
RestExtension,
MarkdownExtension,
Task,
Expand Down Expand Up @@ -668,6 +669,7 @@ def __init__(self, **config):
"TemplateSystem": TemplateSystem,
"PageCompiler": PageCompiler,
"TaskMultiplier": TaskMultiplier,
"CompilerExtension": CompilerExtension,
"RestExtension": RestExtension,
"MarkdownExtension": MarkdownExtension,
"SignalHandler": SignalHandler,
Expand Down
25 changes: 23 additions & 2 deletions nikola/plugin_categories.py
Expand Up @@ -284,12 +284,33 @@ def split_metadata(self, data):
return split_result[0], split_result[-1]


class RestExtension(BasePlugin):
class CompilerExtension(BasePlugin):

"""An extension for a Nikola compiler.
If you intend to implement those in your own compiler, you can:
(a) create a new plugin class for them; or
(b) use this class and filter them yourself.
If you choose (b), you should the compiler name to the .plugin
file in the Nikola/Compiler section and filter all plugins of
this category, getting the compiler name with:
p.details.get('Nikola', 'Compiler')
Note that not all compiler plugins have this option and you might
need to catch configparser.NoOptionError exceptions.
"""

name = "dummy_compiler_extension"
compiler_name = "dummy_compiler"


class RestExtension(CompilerExtension):
name = "dummy_rest_extension"
compiler_name = "rest"


class MarkdownExtension(BasePlugin):
class MarkdownExtension(CompilerExtension):
name = "dummy_markdown_extension"
compiler_name = "markdown"


class SignalHandler(BasePlugin):
Expand Down
3 changes: 3 additions & 0 deletions nikola/plugins/compile/markdown/mdx_gist.plugin
Expand Up @@ -2,6 +2,9 @@
Name = mdx_gist
Module = mdx_gist

[Nikola]
Compiler = markdown

[Documentation]
Author = Roberto Alsina
Version = 0.1
Expand Down
3 changes: 3 additions & 0 deletions nikola/plugins/compile/markdown/mdx_nikola.plugin
Expand Up @@ -2,6 +2,9 @@
Name = mdx_nikola
Module = mdx_nikola

[Nikola]
Compiler = markdown

[Documentation]
Author = Roberto Alsina
Version = 0.1
Expand Down
3 changes: 3 additions & 0 deletions nikola/plugins/compile/markdown/mdx_podcast.plugin
Expand Up @@ -2,6 +2,9 @@
Name = mdx_podcast
Module = mdx_podcast

[Nikola]
Compiler = markdown

[Documentation]
Author = Roberto Alsina
Version = 0.1
Expand Down
3 changes: 3 additions & 0 deletions nikola/plugins/compile/rest/chart.plugin
Expand Up @@ -2,6 +2,9 @@
Name = rest_chart
Module = chart

[Nikola]
Compiler = rest

[Documentation]
Author = Roberto Alsina
Version = 0.1
Expand Down
3 changes: 3 additions & 0 deletions nikola/plugins/compile/rest/doc.plugin
Expand Up @@ -2,6 +2,9 @@
Name = rest_doc
Module = doc

[Nikola]
Compiler = rest

[Documentation]
Author = Manuel Kaufmann
Version = 0.1
Expand Down
3 changes: 3 additions & 0 deletions nikola/plugins/compile/rest/gist.plugin
Expand Up @@ -2,6 +2,9 @@
Name = rest_gist
Module = gist

[Nikola]
Compiler = rest

[Documentation]
Author = Roberto Alsina
Version = 0.1
Expand Down
3 changes: 3 additions & 0 deletions nikola/plugins/compile/rest/listing.plugin
Expand Up @@ -2,6 +2,9 @@
Name = rest_listing
Module = listing

[Nikola]
Compiler = rest

[Documentation]
Author = Roberto Alsina
Version = 0.1
Expand Down
3 changes: 3 additions & 0 deletions nikola/plugins/compile/rest/media.plugin
Expand Up @@ -2,6 +2,9 @@
Name = rest_media
Module = media

[Nikola]
Compiler = rest

[Documentation]
Author = Roberto Alsina
Version = 0.1
Expand Down
3 changes: 3 additions & 0 deletions nikola/plugins/compile/rest/post_list.plugin
Expand Up @@ -2,6 +2,9 @@
Name = rest_post_list
Module = post_list

[Nikola]
Compiler = rest

[Documentation]
Author = Udo Spallek
Version = 0.1
Expand Down
3 changes: 3 additions & 0 deletions nikola/plugins/compile/rest/slides.plugin
Expand Up @@ -2,6 +2,9 @@
Name = rest_slides
Module = slides

[Nikola]
Compiler = rest

[Documentation]
Author = Roberto Alsina
Version = 0.1
Expand Down
3 changes: 3 additions & 0 deletions nikola/plugins/compile/rest/soundcloud.plugin
Expand Up @@ -2,6 +2,9 @@
Name = rest_soundcloud
Module = soundcloud

[Nikola]
Compiler = rest

[Documentation]
Author = Roberto Alsina
Version = 0.1
Expand Down
3 changes: 3 additions & 0 deletions nikola/plugins/compile/rest/thumbnail.plugin
Expand Up @@ -2,6 +2,9 @@
Name = rest_thumbnail
Module = thumbnail

[Nikola]
Compiler = rest

[Documentation]
Author = Pelle Nilsson
Version = 0.1
Expand Down
3 changes: 3 additions & 0 deletions nikola/plugins/compile/rest/vimeo.plugin
Expand Up @@ -2,6 +2,9 @@
Name = rest_vimeo
Module = vimeo

[Nikola]
Compiler = rest

[Documentation]
Description = Vimeo directive

3 changes: 3 additions & 0 deletions nikola/plugins/compile/rest/youtube.plugin
Expand Up @@ -2,6 +2,9 @@
Name = rest_youtube
Module = youtube

[Nikola]
Compiler = rest

[Documentation]
Version = 0.1
Description = Youtube directive
Expand Down

0 comments on commit 09f2f2c

Please sign in to comment.