Skip to content

Commit 09f2f2c

Browse files
committedJul 4, 2015
Merge branch 'master' into more-rstcss-fixes
I used GitHub to create the branch, why did it go wrong?
2 parents 2fd19fa + e8ce9bb commit 09f2f2c

17 files changed

+67
-8
lines changed
 

‎nikola/data/themes/base/assets/css/rst.css

-6
Original file line numberDiff line numberDiff line change
@@ -140,12 +140,6 @@ html[dir="rtl"] div.line-block div.line-block {
140140
div.sidebar {
141141
margin-left: 2em;
142142
min-height: 20px;
143-
/*TODO
144-
background-color: #f5f5f5;
145-
border: 1px solid #e3e3e3;
146-
border-radius: 4px;
147-
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);
148-
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);*/
149143
width: 40% ;
150144
float: right ;
151145
clear: right }

‎nikola/nikola.py

+2
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
Command,
6161
LateTask,
6262
PageCompiler,
63+
CompilerExtension,
6364
RestExtension,
6465
MarkdownExtension,
6566
Task,
@@ -668,6 +669,7 @@ def __init__(self, **config):
668669
"TemplateSystem": TemplateSystem,
669670
"PageCompiler": PageCompiler,
670671
"TaskMultiplier": TaskMultiplier,
672+
"CompilerExtension": CompilerExtension,
671673
"RestExtension": RestExtension,
672674
"MarkdownExtension": MarkdownExtension,
673675
"SignalHandler": SignalHandler,

‎nikola/plugin_categories.py

+23-2
Original file line numberDiff line numberDiff line change
@@ -284,12 +284,33 @@ def split_metadata(self, data):
284284
return split_result[0], split_result[-1]
285285

286286

287-
class RestExtension(BasePlugin):
287+
class CompilerExtension(BasePlugin):
288+
289+
"""An extension for a Nikola compiler.
290+
291+
If you intend to implement those in your own compiler, you can:
292+
(a) create a new plugin class for them; or
293+
(b) use this class and filter them yourself.
294+
If you choose (b), you should the compiler name to the .plugin
295+
file in the Nikola/Compiler section and filter all plugins of
296+
this category, getting the compiler name with:
297+
p.details.get('Nikola', 'Compiler')
298+
Note that not all compiler plugins have this option and you might
299+
need to catch configparser.NoOptionError exceptions.
300+
"""
301+
302+
name = "dummy_compiler_extension"
303+
compiler_name = "dummy_compiler"
304+
305+
306+
class RestExtension(CompilerExtension):
288307
name = "dummy_rest_extension"
308+
compiler_name = "rest"
289309

290310

291-
class MarkdownExtension(BasePlugin):
311+
class MarkdownExtension(CompilerExtension):
292312
name = "dummy_markdown_extension"
313+
compiler_name = "markdown"
293314

294315

295316
class SignalHandler(BasePlugin):

‎nikola/plugins/compile/markdown/mdx_gist.plugin

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
Name = mdx_gist
33
Module = mdx_gist
44

5+
[Nikola]
6+
Compiler = markdown
7+
58
[Documentation]
69
Author = Roberto Alsina
710
Version = 0.1

‎nikola/plugins/compile/markdown/mdx_nikola.plugin

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
Name = mdx_nikola
33
Module = mdx_nikola
44

5+
[Nikola]
6+
Compiler = markdown
7+
58
[Documentation]
69
Author = Roberto Alsina
710
Version = 0.1

‎nikola/plugins/compile/markdown/mdx_podcast.plugin

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
Name = mdx_podcast
33
Module = mdx_podcast
44

5+
[Nikola]
6+
Compiler = markdown
7+
58
[Documentation]
69
Author = Roberto Alsina
710
Version = 0.1

‎nikola/plugins/compile/rest/chart.plugin

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
Name = rest_chart
33
Module = chart
44

5+
[Nikola]
6+
Compiler = rest
7+
58
[Documentation]
69
Author = Roberto Alsina
710
Version = 0.1

‎nikola/plugins/compile/rest/doc.plugin

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
Name = rest_doc
33
Module = doc
44

5+
[Nikola]
6+
Compiler = rest
7+
58
[Documentation]
69
Author = Manuel Kaufmann
710
Version = 0.1

‎nikola/plugins/compile/rest/gist.plugin

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
Name = rest_gist
33
Module = gist
44

5+
[Nikola]
6+
Compiler = rest
7+
58
[Documentation]
69
Author = Roberto Alsina
710
Version = 0.1

‎nikola/plugins/compile/rest/listing.plugin

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
Name = rest_listing
33
Module = listing
44

5+
[Nikola]
6+
Compiler = rest
7+
58
[Documentation]
69
Author = Roberto Alsina
710
Version = 0.1

‎nikola/plugins/compile/rest/media.plugin

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
Name = rest_media
33
Module = media
44

5+
[Nikola]
6+
Compiler = rest
7+
58
[Documentation]
69
Author = Roberto Alsina
710
Version = 0.1

‎nikola/plugins/compile/rest/post_list.plugin

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
Name = rest_post_list
33
Module = post_list
44

5+
[Nikola]
6+
Compiler = rest
7+
58
[Documentation]
69
Author = Udo Spallek
710
Version = 0.1

‎nikola/plugins/compile/rest/slides.plugin

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
Name = rest_slides
33
Module = slides
44

5+
[Nikola]
6+
Compiler = rest
7+
58
[Documentation]
69
Author = Roberto Alsina
710
Version = 0.1

‎nikola/plugins/compile/rest/soundcloud.plugin

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
Name = rest_soundcloud
33
Module = soundcloud
44

5+
[Nikola]
6+
Compiler = rest
7+
58
[Documentation]
69
Author = Roberto Alsina
710
Version = 0.1

‎nikola/plugins/compile/rest/thumbnail.plugin

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
Name = rest_thumbnail
33
Module = thumbnail
44

5+
[Nikola]
6+
Compiler = rest
7+
58
[Documentation]
69
Author = Pelle Nilsson
710
Version = 0.1

‎nikola/plugins/compile/rest/vimeo.plugin

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
Name = rest_vimeo
33
Module = vimeo
44

5+
[Nikola]
6+
Compiler = rest
7+
58
[Documentation]
69
Description = Vimeo directive
710

‎nikola/plugins/compile/rest/youtube.plugin

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
Name = rest_youtube
33
Module = youtube
44

5+
[Nikola]
6+
Compiler = rest
7+
58
[Documentation]
69
Version = 0.1
710
Description = Youtube directive

0 commit comments

Comments
 (0)
Please sign in to comment.