Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
J
jekyll-pandoc-multiple-formats
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
edsl
jekyll-pandoc-multiple-formats
Commits
a174ce30
Commit
a174ce30
authored
Jan 24, 2015
by
fauno
Browse files
Options
Downloads
Plain Diff
Merge branch 'release/0.0.7'
parents
abac1ec6
461f9e93
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/jekyll-pandoc-multiple-formats.rb
+14
-11
14 additions, 11 deletions
lib/jekyll-pandoc-multiple-formats.rb
lib/jekyll-pandoc-multiple-formats/version.rb
+1
-1
1 addition, 1 deletion
lib/jekyll-pandoc-multiple-formats/version.rb
with
15 additions
and
12 deletions
lib/jekyll-pandoc-multiple-formats.rb
+
14
−
11
View file @
a174ce30
...
@@ -43,7 +43,7 @@ class PandocGenerator < Generator
...
@@ -43,7 +43,7 @@ class PandocGenerator < Generator
# The command
# The command
# Move to the source dir since everything will be relative to # that
# Move to the source dir since everything will be relative to # that
pandoc
=
"
pushd
\"
#{
site
.
config
[
'source'
]
}
\"
>/dev/null;
pandoc
#{
flags
}
#{
output_flag
}
#{
extra_flags
}
; popd >/dev/null
"
pandoc
=
"pandoc
#{
flags
}
#{
output_flag
}
#{
extra_flags
}
"
# Inform what's being done
# Inform what's being done
puts
pandoc
puts
pandoc
...
@@ -54,11 +54,13 @@ class PandocGenerator < Generator
...
@@ -54,11 +54,13 @@ class PandocGenerator < Generator
content
<<
post
.
content
content
<<
post
.
content
# Do the stuff
# Do the stuff
Dir
::
chdir
(
site
.
config
[
'source'
])
do
Open3
::
popen3
(
pandoc
)
do
|
stdin
,
stdout
,
stderr
|
Open3
::
popen3
(
pandoc
)
do
|
stdin
,
stdout
,
stderr
|
stdin
.
puts
content
stdin
.
puts
content
stdin
.
close
stdin
.
close
STDERR
.
print
stderr
.
read
STDERR
.
print
stderr
.
read
end
end
end
# Skip failed files
# Skip failed files
next
if
not
File
.
exist?
filename_with_path
next
if
not
File
.
exist?
filename_with_path
...
@@ -108,7 +110,8 @@ module JekyllPandocMultipleFormats
...
@@ -108,7 +110,8 @@ module JekyllPandocMultipleFormats
flags
=
"
#{
@config
[
'pandoc'
][
'flags'
]
}
#{
@config
[
'pandoc'
][
'site_flags'
]
}
"
flags
=
"
#{
@config
[
'pandoc'
][
'flags'
]
}
#{
@config
[
'pandoc'
][
'site_flags'
]
}
"
output
=
''
output
=
''
Open3
::
popen3
(
"pushd
\"
#{
@config
[
'source'
]
}
\"
>/dev/null; pandoc -t html5
#{
flags
}
; popd >/dev/null"
)
do
|
stdin
,
stdout
,
stderr
|
Dir
::
chdir
(
@config
[
'source'
])
do
Open3
::
popen3
(
"pandoc -t html5
#{
flags
}
"
)
do
|
stdin
,
stdout
,
stderr
|
stdin
.
puts
content
stdin
.
puts
content
stdin
.
close
stdin
.
close
...
@@ -116,9 +119,9 @@ module JekyllPandocMultipleFormats
...
@@ -116,9 +119,9 @@ module JekyllPandocMultipleFormats
STDERR
.
print
stderr
.
read
STDERR
.
print
stderr
.
read
end
end
end
output
output
end
end
def
matches
(
ext
)
def
matches
(
ext
)
...
...
This diff is collapsed.
Click to expand it.
lib/jekyll-pandoc-multiple-formats/version.rb
+
1
−
1
View file @
a174ce30
module
JekyllPandocMultipleFormats
module
JekyllPandocMultipleFormats
VERSION
=
"0.0.
6
"
VERSION
=
"0.0.
7
"
end
end
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment