Permalink
Browse files

Basic sbt / jbake integration going to prepare automated deploy of bl…

…ended site
  • Loading branch information...
atooni committed Oct 31, 2018
1 parent 3c19ad5 commit 14a2d0a4a01e9a9638916f84a34c9304d3ab3af8
Showing with 421 additions and 111 deletions.
  1. +1 −0 .gitignore
  2. +1 −1 build.sbt
  3. +14 −0 buildSite.sh
  4. +1 −1 doc/.gitignore
  5. +2 −0 doc/_config.yml
  6. +0 −29 doc/_layouts/default.html
  7. +0 −74 doc/_layouts/default_orig.html
  8. 0 doc/{ → assets}/css/asciidoctor.css
  9. 0 doc/{ → assets}/css/font-awesome.css
  10. 0 doc/{ → assets}/css/font-awesome.min.css
  11. 0 doc/{ → assets}/css/golo.css
  12. 0 doc/{ → assets}/css/normalize.css
  13. 0 doc/{ → assets}/js/highlight/CHANGES.md
  14. 0 doc/{ → assets}/js/highlight/LICENSE
  15. 0 doc/{ → assets}/js/highlight/README.md
  16. 0 doc/{ → assets}/js/highlight/README.ru.md
  17. 0 doc/{ → assets}/js/highlight/highlight.min.js
  18. 0 doc/{ → assets}/js/highlight/styles/a11y-dark.css
  19. 0 doc/{ → assets}/js/highlight/styles/a11y-light.css
  20. 0 doc/{ → assets}/js/highlight/styles/agate.css
  21. 0 doc/{ → assets}/js/highlight/styles/an-old-hope.css
  22. 0 doc/{ → assets}/js/highlight/styles/androidstudio.css
  23. 0 doc/{ → assets}/js/highlight/styles/arduino-light.css
  24. 0 doc/{ → assets}/js/highlight/styles/arta.css
  25. 0 doc/{ → assets}/js/highlight/styles/ascetic.css
  26. 0 doc/{ → assets}/js/highlight/styles/atelier-cave-dark.css
  27. 0 doc/{ → assets}/js/highlight/styles/atelier-cave-light.css
  28. 0 doc/{ → assets}/js/highlight/styles/atelier-dune-dark.css
  29. 0 doc/{ → assets}/js/highlight/styles/atelier-dune-light.css
  30. 0 doc/{ → assets}/js/highlight/styles/atelier-estuary-dark.css
  31. 0 doc/{ → assets}/js/highlight/styles/atelier-estuary-light.css
  32. 0 doc/{ → assets}/js/highlight/styles/atelier-forest-dark.css
  33. 0 doc/{ → assets}/js/highlight/styles/atelier-forest-light.css
  34. 0 doc/{ → assets}/js/highlight/styles/atelier-heath-dark.css
  35. 0 doc/{ → assets}/js/highlight/styles/atelier-heath-light.css
  36. 0 doc/{ → assets}/js/highlight/styles/atelier-lakeside-dark.css
  37. 0 doc/{ → assets}/js/highlight/styles/atelier-lakeside-light.css
  38. 0 doc/{ → assets}/js/highlight/styles/atelier-plateau-dark.css
  39. 0 doc/{ → assets}/js/highlight/styles/atelier-plateau-light.css
  40. 0 doc/{ → assets}/js/highlight/styles/atelier-savanna-dark.css
  41. 0 doc/{ → assets}/js/highlight/styles/atelier-savanna-light.css
  42. 0 doc/{ → assets}/js/highlight/styles/atelier-seaside-dark.css
  43. 0 doc/{ → assets}/js/highlight/styles/atelier-seaside-light.css
  44. 0 doc/{ → assets}/js/highlight/styles/atelier-sulphurpool-dark.css
  45. 0 doc/{ → assets}/js/highlight/styles/atelier-sulphurpool-light.css
  46. 0 doc/{ → assets}/js/highlight/styles/atom-one-dark-reasonable.css
  47. 0 doc/{ → assets}/js/highlight/styles/atom-one-dark.css
  48. 0 doc/{ → assets}/js/highlight/styles/atom-one-light.css
  49. 0 doc/{ → assets}/js/highlight/styles/brown-paper.css
  50. BIN doc/{ → assets}/js/highlight/styles/brown-papersq.png
  51. 0 doc/{ → assets}/js/highlight/styles/codepen-embed.css
  52. 0 doc/{ → assets}/js/highlight/styles/color-brewer.css
  53. 0 doc/{ → assets}/js/highlight/styles/darcula.css
  54. 0 doc/{ → assets}/js/highlight/styles/dark.css
  55. 0 doc/{ → assets}/js/highlight/styles/darkula.min.css
  56. 0 doc/{ → assets}/js/highlight/styles/default.css
  57. 0 doc/{ → assets}/js/highlight/styles/docco.css
  58. 0 doc/{ → assets}/js/highlight/styles/dracula.css
  59. 0 doc/{ → assets}/js/highlight/styles/far.css
  60. 0 doc/{ → assets}/js/highlight/styles/foundation.css
  61. 0 doc/{ → assets}/js/highlight/styles/github-gist.css
  62. 0 doc/{ → assets}/js/highlight/styles/github.min.css
  63. 0 doc/{ → assets}/js/highlight/styles/gml.css
  64. 0 doc/{ → assets}/js/highlight/styles/googlecode.css
  65. 0 doc/{ → assets}/js/highlight/styles/grayscale.css
  66. 0 doc/{ → assets}/js/highlight/styles/gruvbox-dark.css
  67. 0 doc/{ → assets}/js/highlight/styles/gruvbox-light.css
  68. 0 doc/{ → assets}/js/highlight/styles/hopscotch.css
  69. 0 doc/{ → assets}/js/highlight/styles/hybrid.css
  70. 0 doc/{ → assets}/js/highlight/styles/idea.css
  71. 0 doc/{ → assets}/js/highlight/styles/ir-black.css
  72. 0 doc/{ → assets}/js/highlight/styles/isbl-editor-dark.css
  73. 0 doc/{ → assets}/js/highlight/styles/isbl-editor-light.css
  74. 0 doc/{ → assets}/js/highlight/styles/kimbie.dark.css
  75. 0 doc/{ → assets}/js/highlight/styles/kimbie.light.css
  76. 0 doc/{ → assets}/js/highlight/styles/lightfair.css
  77. 0 doc/{ → assets}/js/highlight/styles/magula.css
  78. 0 doc/{ → assets}/js/highlight/styles/mono-blue.css
  79. 0 doc/{ → assets}/js/highlight/styles/monokai-sublime.css
  80. 0 doc/{ → assets}/js/highlight/styles/monokai.css
  81. 0 doc/{ → assets}/js/highlight/styles/nord.css
  82. 0 doc/{ → assets}/js/highlight/styles/obsidian.css
  83. 0 doc/{ → assets}/js/highlight/styles/ocean.css
  84. 0 doc/{ → assets}/js/highlight/styles/paraiso-dark.css
  85. 0 doc/{ → assets}/js/highlight/styles/paraiso-light.css
  86. 0 doc/{ → assets}/js/highlight/styles/pojoaque.css
  87. BIN doc/{ → assets}/js/highlight/styles/pojoaque.jpg
  88. 0 doc/{ → assets}/js/highlight/styles/purebasic.css
  89. 0 doc/{ → assets}/js/highlight/styles/qtcreator_dark.css
  90. 0 doc/{ → assets}/js/highlight/styles/qtcreator_light.css
  91. 0 doc/{ → assets}/js/highlight/styles/railscasts.css
  92. 0 doc/{ → assets}/js/highlight/styles/rainbow.css
  93. 0 doc/{ → assets}/js/highlight/styles/routeros.css
  94. 0 doc/{ → assets}/js/highlight/styles/school-book.css
  95. BIN doc/{ → assets}/js/highlight/styles/school-book.png
  96. 0 doc/{ → assets}/js/highlight/styles/shades-of-purple.css
  97. 0 doc/{ → assets}/js/highlight/styles/solarized-dark.css
  98. 0 doc/{ → assets}/js/highlight/styles/solarized-light.css
  99. 0 doc/{ → assets}/js/highlight/styles/sunburst.css
  100. 0 doc/{ → assets}/js/highlight/styles/tomorrow-night-blue.css
  101. 0 doc/{ → assets}/js/highlight/styles/tomorrow-night-bright.css
  102. 0 doc/{ → assets}/js/highlight/styles/tomorrow-night-eighties.css
  103. 0 doc/{ → assets}/js/highlight/styles/tomorrow-night.css
  104. 0 doc/{ → assets}/js/highlight/styles/tomorrow.css
  105. 0 doc/{ → assets}/js/highlight/styles/vs.css
  106. 0 doc/{ → assets}/js/highlight/styles/vs2015.css
  107. 0 doc/{ → assets}/js/highlight/styles/xcode.css
  108. 0 doc/{ → assets}/js/highlight/styles/xt256.css
  109. 0 doc/{ → assets}/js/highlight/styles/zenburn.css
  110. +1 −0 doc/content/.asciidoctor/diagram/sample.svg.cache
  111. +1 −0 doc/content/.asciidoctor/diagram/test.svg.cache
  112. +9 −6 doc/{ → content}/BUILDING.adoc
  113. +19 −0 doc/jbake.properties
  114. +25 −0 doc/templates/archive.thyme
  115. +21 −0 doc/templates/feed.thyme
  116. +23 −0 doc/templates/footer.thyme
  117. +30 −0 doc/templates/header.thyme
  118. +27 −0 doc/templates/index.thyme
  119. +43 −0 doc/templates/menu.thyme
  120. +23 −0 doc/templates/page.thyme
  121. +24 −0 doc/templates/post.thyme
  122. +7 −0 doc/templates/sitemap.thyme
  123. +25 −0 doc/templates/tags.thyme
  124. +6 −0 package.json
  125. +115 −0 project/JBake.scala
  126. +3 −0 project/plugins.sbt
  127. 0 {doc → }/yarn.lock
@@ -8,6 +8,7 @@ libs/
3rdparty
package-lock.json
.bloop
node_modules
blended.sslcontext/notes.txt
@@ -170,7 +170,7 @@ lazy val root = {
.settings(global)
.settings(CommonSettings())
.settings(PublishConfig.doPublish)
.enablePlugins(ScalaUnidocPlugin)
.enablePlugins(ScalaUnidocPlugin, JBake)
.aggregate(aggregates:_*)
}
@@ -0,0 +1,14 @@
#!/bin/bash
set -x
set -e
mkdir -p doc/_site
sbt -mem 4096 cleanCoverage unidoc
mv target/scala-2.12/scoverage-report doc/_site/coverage
mv target/scala-2.12/unidoc doc/_site/scaladoc
cd doc
jekyll build
@@ -1,3 +1,3 @@
_site
node_modules
content/images
@@ -9,6 +9,8 @@ exclude:
asciidoc:
require_front_matter_header: true
keep_files:
- coverage
- scaladoc
- images
asciidoctor:
base_dir: :docdir

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1 @@
{"checksum":"3d8f5a29658047c5a7c0836f519b404d","width":101,"height":154}
@@ -0,0 +1 @@
{"checksum":"a9c1679e18afed18fbd77eecc20e9346","width":128,"height":230}
@@ -1,6 +1,5 @@
---
layout: default
---
:jbake-type: page
:jbake-status: published
== Build file structure
_Blended_ uses `sbt 1.2.6` to build. Currently we have a bit more than 60 submodules in _Blended_, so that the build
@@ -16,7 +15,7 @@ file structure needs a bit of explanation:
[source,scala,linenums]
----
include::../project/BlendedActivemqClient.scala[]
include::../../project/BlendedActivemqClient.scala[]
----
* All sub module files mix in the trait `ProjectFactory`, which means they have to expose a `val` of type `Project`.
@@ -31,7 +30,7 @@ To complete the example, here is how the sub module above is referenced in the `
[source,scala]
----
include::../build.sbt[tags=Building]
include::../../build.sbt[tags=Building]
----
=== Special cases
@@ -42,8 +41,12 @@ There are more complex project definitions, e.g. when the submodule needs to gen
TODO
[graphviz, sample, svg]
----
digraph G {Hello->World}
----
[mermaid.cli, test, svg]
[mermaid, test, svg]
----
graph TD;
A-->B;
@@ -0,0 +1,19 @@
asset.folder=assets
template.folder=templates
content.folder=content
db.clear.cache=false
db.store=memory
db.path=target/doccache
template.masterindex.file=index.thyme
template.archive.file=archive.thyme
template.tag.file=tags.thyme
template.sitemap.file=sitemap.thyme
template.post.file=post.thyme
template.page.file=page.thyme
template.feed.file=feed.thyme
asciidoctor.option.requires=asciidoctor-diagram
asciidoctor.attributes=imagesdir=images,imagesoutdir=images
@@ -0,0 +1,25 @@
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head th:replace="header.thyme::head"/>
<body onload="prettyPrint()">
<div id="wrap">
<div th:replace="menu.thyme::menu"/>
<div class="container">
<div class="page-header">
<h1>Blog Archive</h1>
</div>
<div th:each="post : ${posts}" th:with='last_month=null' th:remove='tag'>
<h3 th:if='${last_month!=#dates.format(post.date,"MMMM yyyy")}' th:text='${#dates.format(post.date,"MMMM yyyy")}'>June 2014</h3>
<h4><span th:text='${#dates.format(post.date,"dd")}' th:remove='tag'/> - <a th:href="${content.rootpath+post.uri}" th:text='${post.title}' href="foo.html">Post title</a></h4>
<span th:remove='all' th:with='last_month = ${#dates.format(post.date,"MMMM yyyy")}'/>
</div>
</div>
</div>
<div th:replace="footer.thyme::footer"></div>
</body>
</html>
@@ -0,0 +1,21 @@
<?xml version="1.0"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:th="http://www.thymeleaf.org">
<channel>
<title>JBake</title>
<link th:text='${config.site_host}'/>
<atom:link th:href='${config.site_host+"/feed.xml"}' href="link" rel="self" type="application/rss+xml" />
<description>JBake Bootstrap Template</description>
<language>en-gb</language>
<pubDate th:text='${#dates.format(published_date,"EEE, d MMM yyyy HH:mm:ss Z")}'>pubdate</pubDate>
<lastBuildDate th:text='${#dates.format(published_date,"EEE, d MMM yyyy HH:mm:ss Z")}'>lastbuilddate</lastBuildDate>
<item th:each="post: ${published_posts}">
<title th:text='${post.title}'>title</title>
<link th:text='${config.site_host+"/"+post.uri}'/>
<pubDate th:text='${#dates.format(post.date,"EEE, d MMM yyyy HH:mm:ss Z")}'>pubdate</pubDate>
<guid th:text='${post.uri}' isPermaLink="false">guid</guid>
<description th:text='${#strings.escapeXml(post.body)}'>description</description>
</item>
</channel>
</rss>
@@ -0,0 +1,23 @@
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<body>
<div th:fragment="footer">
<div id="push"></div>
<div id="footer">
<div class="container">
<p class="muted credit">&copy; 2014 | Mixed with <a href="http://getbootstrap.com/">Bootstrap v3.1.1</a> | Baked with <a href="http://jbake.org">JBake <span th:text='${version}'>version</span></a></p>
</div>
</div>
<!-- Le javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script th:with="rootpath=(${content.rootpath != null} ? ${content.rootpath} : '')" th:src="${rootpath} + 'js/jquery-1.11.1.min.js'"></script>
<script th:with="rootpath=(${content.rootpath != null} ? ${content.rootpath} : '')" th:src="${rootpath} + 'js/bootstrap.min.js'"></script>
<script th:with="rootpath=(${content.rootpath != null} ? ${content.rootpath} : '')" th:src="${rootpath} + 'js/prettify.js'"></script>
</div>
</body>
</html>
@@ -0,0 +1,30 @@
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-transitional-thymeleaf-4.dtd">
<html lang="en">
<head th:fragment="head">
<meta charset="utf-8"/>
<title th:with="title=(${content.title != null} ? ${content.title} : 'JBake')" th:text="${title}"></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta name="description" content=""/>
<meta name="author" content=""/>
<meta name="keywords" content=""/>
<meta name="generator" content="JBake"/>
<!-- Le styles -->
<link th:with="rootpath=(${content.rootpath != null} ? ${content.rootpath} : '')" th:href="${rootpath}+'css/bootstrap.min.css'" rel="stylesheet"/>
<link th:with="rootpath=(${content.rootpath != null} ? ${content.rootpath} : '')" th:href="${rootpath}+'css/asciidoctor.css'" rel="stylesheet"/>
<link th:with="rootpath=(${content.rootpath != null} ? ${content.rootpath} : '')" th:href="${rootpath}+'css/base.css'" rel="stylesheet"/>
<link th:with="rootpath=(${content.rootpath != null} ? ${content.rootpath} : '')" th:href="${rootpath}+'css/prettify.css'" rel="stylesheet"/>
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script th:with="rootpath=(${content.rootpath != null} ? ${content.rootpath} : '')" th:src="${rootpath}+'js/html5shiv.min.js'"></script>
<![endif]-->
<!-- Fav and touch icons -->
<!--<link rel="apple-touch-icon-precomposed" sizes="144x144" href="../assets/ico/apple-touch-icon-144-precomposed.png"/>
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="../assets/ico/apple-touch-icon-114-precomposed.png"/>
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="../assets/ico/apple-touch-icon-72-precomposed.png"/>
<link rel="apple-touch-icon-precomposed" href="../assets/ico/apple-touch-icon-57-precomposed.png"/>-->
<link th:with="rootpath=(${content.rootpath != null} ? ${content.rootpath} : '')" rel="shortcut icon" th:href="${rootpath}+'favicon.ico'"/>
</head>
</html>
@@ -0,0 +1,27 @@
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head th:replace="header.thyme::head"/>
<body onload="prettyPrint()">
<div id="wrap">
<div th:replace="menu.thyme::menu"/>
<div class="container">
<div class="page-header">
<h1>Blog</h1>
</div>
<div th:each="post : ${published_posts}">
<a th:href='${post.uri}' href='href'><h1 th:text='${post.title}'>title</h1></a>
<p th:text='${#dates.format(post.date,"dd MMMM yyyy")}'>date</p>
<p th:utext='${post.body}'>body</p>
</div>
<hr />
<p>Older posts are available in the <a th:href='${content.rootpath+config.archive_file}' href='href'>archive</a>.</p>
</div>
</div>
<div th:replace="footer.thyme::footer"></div>
</body>
</html>
@@ -0,0 +1,43 @@
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<body>
<div th:fragment="menu">
<!-- Fixed navbar -->
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" th:with="rootpath=(${content.rootpath != null} ? ${content.rootpath} : '')" th:href="${rootpath}">JBake</a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><a th:with="rootpath=(${content.rootpath != null} ? ${content.rootpath} : '')" th:href="${rootpath}+'index.html'">Home</a></li>
<li><a th:with="rootpath=(${content.rootpath != null} ? ${content.rootpath} : '')" th:href="${rootpath}+'about.html'">About</a></li>
<li><a th:with="rootpath=(${content.rootpath != null} ? ${content.rootpath} : '')" th:href="${rootpath}+${config.feed_file}">Subscribe</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="#">Action</a></li>
<li><a href="#">Another action</a></li>
<li><a href="#">Something else here</a></li>
<li class="divider"></li>
<li class="dropdown-header">Nav header</li>
<li><a href="#">Separated link</a></li>
<li><a href="#">One more separated link</a></li>
</ul>
</li>
</ul>
</div><!--/.nav-collapse -->
</div>
</div>
</div>
</body>
</html>
Oops, something went wrong.

0 comments on commit 14a2d0a

Please sign in to comment.