Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
c3317047
Commit
c3317047
authored
Jan 26, 2022
by
Brett Walker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add rake task for Banzai rendering
parent
a9216d7d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
lib/tasks/gitlab/banzai.rake
lib/tasks/gitlab/banzai.rake
+18
-0
No files found.
lib/tasks/gitlab/banzai.rake
0 → 100644
View file @
c3317047
# frozen_string_literal: true
namespace
:gitlab
do
namespace
:banzai
do
desc
'GitLab | Banzai | Render markdown using our FullPipeline (input will be requested)'
task
:render
=>
:environment
do
|
_t
|
markdown
=
Array
.
new
puts
"
\n
Enter markdown below, Ctrl-D to end (if you need blank lines, paste in the full text):"
while
buf
=
Readline
.
readline
(
''
,
true
)
do
markdown
<<
buf
end
puts
"Rendering using Gitlab's FullPipeline...
\n\n
"
puts
Banzai
::
Pipeline
::
FullPipeline
.
to_html
(
markdown
.
join
(
"
\n
"
),
project:
nil
)
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment