Skip to content

Commit

Permalink
Add pdf backend to asciidoctor task
Browse files Browse the repository at this point in the history
  • Loading branch information
FatihBozik committed Nov 17, 2019
1 parent c2a9da9 commit 2999d13
Show file tree
Hide file tree
Showing 18 changed files with 433 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@ build
# Java
*.class

!docs/resources/images/logo.svg

# Miscellaneous
.DS_Store
.DS_Store
16 changes: 15 additions & 1 deletion docs/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ buildscript {
}
dependencies {
classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.6.1'
classpath 'org.asciidoctor:asciidoctorj-pdf:1.5.0-beta.2'
}
}

Expand All @@ -19,10 +20,23 @@ asciidoctorj {
}

asciidoctor {
backends 'html5'
backends 'html5', 'pdf'
setRequires('./src/docs/resources/styles/github_light.rb')
sources {
include 'index.adoc'
}
options doctype: 'book'
attributes = [
'revnumber' : project.version,
'imagesdir' : '../resources/images',
'pdf-stylesdir' : '../resources/styles',
'pdf-fontsdir' : '../resources/fonts',
'pdf-style' : 'ocp',
'icons' : 'font',
'source-highlighter': 'rouge',
'rouge-style' : 'github_light',
'sourcedir' : 'src/docs/asciidoc'
]
}

gitPublish {
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
70 changes: 70 additions & 0 deletions docs/src/docs/resources/images/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
74 changes: 74 additions & 0 deletions docs/src/docs/resources/styles/github_light.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# -*- coding: utf-8 -*- #
# frozen_string_literal: true

require 'rouge' unless defined? ::Rouge.version

module Rouge
module Themes
class GithubLight < CSSTheme
name 'github_light'

style Comment::Multiline, :fg => '#6a737d', :italic => false
style Comment::Preproc, :fg => '#999999', :bold => false
style Comment::Single, :fg => '#6a737d', :italic => false
style Comment::Special, :fg => '#999999', :italic => false, :bold => false
style Comment, :fg => '#999988', :italic => false
style Error, :fg => '#a61717', :bg => '#e3d2d2'
style Generic::Deleted, :fg => '#000000', :bg => '#ffdddd'
style Generic::Emph, :fg => '#000000', :italic => false
style Generic::Error, :fg => '#aa0000'
style Generic::Heading, :fg => '#999999'
style Generic::Inserted, :fg => '#000000', :bg => '#ddffdd'
style Generic::Output, :fg => '#888888'
style Generic::Prompt, :fg => '#555555'
style Generic::Strong, :bold => true
style Generic::Subheading, :fg => '#aaaaaa'
style Generic::Traceback, :fg => '#aa0000'
style Keyword::Constant, :fg => '#005cc5', :bold => false
style Keyword::Declaration, :fg => '#d73a49', :bold => false
style Keyword::Namespace, :fg => '#d73a49', :bold => false
style Keyword::Pseudo, :fg => '#d73a49', :bold => false
style Keyword::Reserved, :fg => '#d73a49', :bold => false
style Keyword::Type, :fg => '#d73a49', :bold => false
style Keyword, :fg => '#d73a49', :bold => false
style Literal::Number::Float, :fg => '#005cc5'
style Literal::Number::Hex, :fg => '#005cc5'
style Literal::Number::Integer::Long, :fg => '#005cc5'
style Literal::Number::Integer, :fg => '#005cc5'
style Literal::Number::Oct, :fg => '#005cc5'
style Literal::Number, :fg => '#005cc5'
style Literal::String::Backtick, :fg => '#032f62'
style Literal::String::Char, :fg => '#032f62'
style Literal::String::Doc, :fg => '#032f62'
style Literal::String::Double, :fg => '#032f62'
style Literal::String::Escape, :fg => '#032f62'
style Literal::String::Heredoc, :fg => '#032f62'
style Literal::String::Interpol, :fg => '#032f62'
style Literal::String::Other, :fg => '#032f62'
style Literal::String::Regex, :fg => '#032f62'
style Literal::String::Single, :fg => '#032f62'
style Literal::String::Symbol, :fg => '#005cc5'
style Literal::String, :fg => '#032f62'
style Name::Attribute, :fg => '#000000'
style Name::Builtin::Pseudo, :fg => '#999999'
style Name::Builtin, :fg => '#d73a49'
style Name::Class, :fg => '#6f42c1', :bold => false
style Name::Constant, :fg => '#005cc5'
style Name::Decorator, :fg => '#d73a49', :bold => false
style Name::Entity, :fg => '#6f42c1'
style Name::Exception, :fg => '#990000', :bold => true
style Name::Function, :fg => '#6f42c1', :bold => false
style Name::Label, :fg => '#000000'
style Name::Namespace, :fg => '#000000'
style Name::Tag, :fg => '#000000'
style Name::Variable::Class, :fg => '#000000'
style Name::Variable::Global, :fg => '#000000'
style Name::Variable::Instance, :fg => '#000000'
style Name::Variable, :fg => '#000000'
style Operator::Word, :fg => '#d73a49', :bold => true
style Operator, :fg => '#000000', :bold => false
style Text::Whitespace, :fg => '#bbbbbb'
style Text, :bg => '#ffffff'
end
end
end
Loading

0 comments on commit 2999d13

Please sign in to comment.