Permalink
Browse files

doc updates, conversions, howto extension, theme from akka

  • Loading branch information...
harrah committed Sep 19, 2012
1 parent 208f0ce commit 839f9b65743aff6ddeb49d5d3c9ccbb2f2450341
Showing with 3,713 additions and 3,560 deletions.
  1. +1 −0 .gitignore
  2. +2 −5 README.md
  3. +38 −24 project/Docs.scala
  4. +12 −6 project/Sxr.scala
  5. +5 −1 project/p.sbt
  6. +0 −5 src/jekyll/_config.yml
  7. +0 −31 src/jekyll/_includes/footer.txt
  8. +0 −13 src/jekyll/_includes/header.txt
  9. +0 −13 src/jekyll/_includes/howto_header.txt
  10. +0 −15 src/jekyll/_includes/topbar.txt
  11. +0 −23 src/jekyll/_layouts/content.html
  12. +0 −65 src/jekyll/_layouts/default.html
  13. +0 −25 src/jekyll/_layouts/howto.html
  14. +0 −66 src/jekyll/community-plugins.md
  15. +0 −14 src/jekyll/community.md
  16. +0 −85 src/jekyll/download.md
  17. +0 −26 src/jekyll/howto.md
  18. +0 −76 src/jekyll/howto/generatefiles.md
  19. +0 −298 src/jekyll/howto/inspect.md
  20. +0 −180 src/jekyll/howto/interactive.md
  21. +0 −254 src/jekyll/howto/logging.md
  22. +0 −60 src/jekyll/howto/metadata.md
  23. +0 −78 src/jekyll/howto/package.md
  24. +0 −70 src/jekyll/howto/runningcommands.md
  25. +0 −136 src/jekyll/howto/scala.md
  26. +0 −64 src/jekyll/howto/triggered.md
  27. +0 −6 src/jekyll/jquery.scrollto.min.js
  28. +0 −21 src/jekyll/learn.md
  29. +0 −15 src/jekyll/repository-rules.md
  30. +0 −284 src/jekyll/resources/howto-site.css
  31. +0 −279 src/jekyll/resources/site.css
  32. +0 −63 src/jekyll/resources/syntax.css
  33. +0 −24 src/jekyll/talks.md
  34. +0 −191 src/jekyll/using_sonatype.md
  35. 0 src/{jekyll → sphinx}/CNAME
  36. +59 −15 src/sphinx/Community/{sbt-0.10-plugins-list.rst → Community-Plugins.rst}
  37. +0 −11 src/sphinx/Community/Community.rst
  38. +4 −4 src/sphinx/Community/Opportunities.rst
  39. +21 −0 src/sphinx/Community/Repository-Rules.rst
  40. +264 −0 src/sphinx/Community/Using-Sonatype.rst
  41. +19 −9 src/sphinx/Community/index.rst
  42. +4 −4 src/sphinx/Detailed-Topics/Artifacts.rst
  43. +3 −1 src/sphinx/Detailed-Topics/Classpaths.rst
  44. +7 −5 src/sphinx/Detailed-Topics/Compiler-Plugins.rst
  45. +12 −10 src/sphinx/Detailed-Topics/Console-Project.rst
  46. +1 −1 src/sphinx/Detailed-Topics/Cross-Build.rst
  47. +121 −0 src/sphinx/Detailed-Topics/Dependency-Management-Flow.rst
  48. +0 −14 src/sphinx/Detailed-Topics/Detailed-Topics.rst
  49. +15 −15 src/sphinx/Detailed-Topics/Inspecting-Settings.rst
  50. +58 −59 src/sphinx/Detailed-Topics/Launcher.rst
  51. +2 −2 src/sphinx/Detailed-Topics/Library-Management.rst
  52. +9 −8 src/sphinx/Detailed-Topics/Mapping-Files.rst
  53. +3 −3 src/sphinx/Detailed-Topics/Migrating-from-sbt-0.7.x-to-0.10.x.rst
  54. +3 −1 src/sphinx/Detailed-Topics/Parsing-Input.rst
  55. +5 −2 src/sphinx/Detailed-Topics/Process.rst
  56. +1 −1 src/sphinx/Detailed-Topics/Publishing.rst
  57. +1 −1 src/sphinx/Detailed-Topics/Resolvers.rst
  58. +5 −5 src/sphinx/Detailed-Topics/Scripts.rst
  59. +10 −6 src/sphinx/Detailed-Topics/Setup-Notes.rst
  60. +71 −462 src/sphinx/Detailed-Topics/Tasks.rst
  61. +13 −8 src/sphinx/Detailed-Topics/Testing.rst
  62. +5 −3 src/sphinx/Detailed-Topics/Triggered-Execution.rst
  63. +9 −4 src/sphinx/{ → Detailed-Topics}/Understanding-incremental-recompilation.rst
  64. +15 −33 src/sphinx/Detailed-Topics/index.rst
  65. +53 −24 src/sphinx/Dormant/Basic-Configuration.rst
  66. +7 −10 src/sphinx/Dormant/Dormant.rst
  67. +23 −12 src/sphinx/Dormant/Full-Configuration.rst
  68. +3 −3 src/sphinx/Dormant/Needs-New-Home.rst
  69. +0 −10 src/sphinx/Examples/Examples.rst
  70. +16 −6 src/sphinx/Examples/index.rst
  71. +1 −1 src/sphinx/Extending/Command-Line-Applications.rst
  72. +0 −12 src/sphinx/Extending/Extending.rst
  73. +1 −1 src/sphinx/Extending/Input-Tasks.rst
  74. +2 −2 src/sphinx/Extending/Plugins-Best-Practices.rst
  75. +18 −7 src/sphinx/Extending/Plugins.rst
  76. +13 −11 src/sphinx/Extending/index.rst
  77. +1 −0 src/sphinx/Getting-Started/Custom-Settings.rst
  78. +3 −3 src/sphinx/Getting-Started/Directories.rst
  79. +7 −7 src/sphinx/Getting-Started/Full-Def.rst
  80. +3 −3 src/sphinx/Getting-Started/Hello.rst
  81. +1 −1 src/sphinx/Getting-Started/More-About-Settings.rst
  82. +1 −1 src/sphinx/Getting-Started/Multi-Project.rst
  83. +5 −4 src/sphinx/Getting-Started/Running.rst
  84. +2 −2 src/sphinx/Getting-Started/Scopes.rst
  85. +66 −28 src/sphinx/Getting-Started/Setup.rst
  86. +6 −16 src/sphinx/Getting-Started/Using-Plugins.rst
  87. +1 −0 src/sphinx/Getting-Started/Welcome.rst
  88. +19 −16 src/sphinx/Getting-Started/index.rst
  89. +12 −0 src/sphinx/Howto/Howto.rst
  90. +78 −0 src/sphinx/Howto/generatefiles.rst
  91. +13 −0 src/sphinx/Howto/index.rst
  92. +328 −0 src/sphinx/Howto/inspect.rst
  93. +211 −0 src/sphinx/Howto/interactive.rst
  94. +261 −0 src/sphinx/Howto/logging.rst
  95. +63 −0 src/sphinx/Howto/metadata.rst
  96. +82 −0 src/sphinx/Howto/package.rst
  97. +88 −0 src/sphinx/Howto/runningcommands.rst
  98. +153 −0 src/sphinx/Howto/scala.rst
  99. +70 −0 src/sphinx/Howto/triggered.rst
  100. +71 −102 src/sphinx/Name-Index.rst
  101. +240 −0 src/sphinx/_sphinx/exts/howto.py
  102. +90 −0 src/sphinx/_sphinx/themes/sbt/layout.html
  103. +41 −0 src/sphinx/_sphinx/themes/sbt/static/base.css
  104. BIN src/sphinx/_sphinx/themes/sbt/static/dark-blue-bg-main.jpg
  105. BIN src/sphinx/_sphinx/themes/sbt/static/dark-blue-bg.png
  106. +195 −0 src/sphinx/_sphinx/themes/sbt/static/docs.css
  107. +488 −0 src/sphinx/_sphinx/themes/sbt/static/style.css
  108. +58 −0 src/sphinx/_sphinx/themes/sbt/static/syntax.css
  109. +6 −0 src/sphinx/_sphinx/themes/sbt/theme.conf
  110. +7 −2 src/sphinx/conf.py
  111. +14 −14 src/sphinx/faq.rst
  112. +58 −0 src/sphinx/home.rst
  113. +36 −59 src/sphinx/index.rst
View
@@ -1,3 +1,4 @@
target/
project/boot/
.release.sbt
+__pycache__
View
@@ -59,16 +59,13 @@ This is the 0.13.x series of sbt.
## Building Documentation
-Documentation is built using jekyll and sphinx and requires some external programs and libraries to be manually installed first:
+Documentation is built using sphinx and requires some external programs and libraries to be manually installed first:
```text
$ pip install pygments
$ pip install sphinx
$ pip install sphinxcontrib-issuetracker
-$ gem install rdiscount
-$ gem install jekyll
```
To build the full site, run the `make-site` task, which will generate the manual, API, SXR, and other site pages in `target/site/`.
-
-Individual pieces of the site may be generated using `xsbt/sphinx:mappings`, `xsbt/jekyll:mappings`, `xsbt/doc`, or `xsbt/sxr`. The output directories will be under `target/`, such as `target/sphinx`.
+To only work on the site and not API or SXR, run `sphinx:mappings`.
View
@@ -1,49 +1,63 @@
import sbt._
import Keys._
import Status.{isSnapshot, publishStatus}
- import com.jsuereth.sbtsite.{SitePlugin, SiteKeys}
- import SitePlugin.site
+ import com.typesafe.sbt.{SbtGhPages,SbtGit,SbtSite,site=>sbtsite}
+ import SbtSite.{site, SiteKeys}
+ import SbtGhPages.{ghpages, GhPagesKeys => ghkeys}
+ import SbtGit.{git, GitKeys}
+ import sbtsite.SphinxSupport
import SiteKeys.{makeSite,siteMappings}
import Sxr.sxr
object Docs
{
+ val cnameFile = SettingKey[File]("cname-file", "Location of the CNAME file for the website.")
+
def settings: Seq[Setting[_]] =
site.settings ++
- site.sphinxSupport("manual") ++
- site.jekyllSupport() ++
+ site.sphinxSupport("docs") ++
site.includeScaladoc("api") ++
- siteIncludeSxr ++
- sitePrefixVersion
+ siteIncludeSxr("sxr") ++
+ ghPagesSettings
- def siteIncludeSxr = Seq(
- mappings in sxr <<= sxr.map(dir => Path.allSubpaths(dir).toSeq),
- site.addMappingsToSiteDir(mappings in sxr, "sxr")
+ def ghPagesSettings = ghpages.settings ++ Seq(
+ git.remoteRepo := "git@github.com:sbt/sbt.github.com.git",
+ ghkeys.synchLocal <<= synchLocalImpl,
+ cnameFile <<= (sourceDirectory in SphinxSupport.Sphinx) / "CNAME",
+ GitKeys.gitBranch in ghkeys.updatedRepository := Some("master")
)
- def sitePrefixVersion =
- siteMappings <<= (siteMappings, version) map { (ms, v) =>
- ms.map { case (src, path) => (src, v + "/" + path) }
- }
+ def siteIncludeSxr(prefix: String) = Seq(
+ mappings in sxr <<= sxr.map(dir => Path.allSubpaths(dir).toSeq),
+ site.addMappingsToSiteDir(mappings in sxr, prefix)
+ )
- def siteLinkLatest =
- makeSite <<= (makeSite, version, streams, isSnapshot) map { (dir, v, s, snap) =>
- linkSite(dir, v, if(snap) "snapshot" else "stable", s.log)
- dir
- }
+ def synchLocalImpl = (ghkeys.privateMappings, ghkeys.updatedRepository, version, isSnapshot, streams, cnameFile) map { (mappings, repo, v, snap, s, cname) =>
+ val versioned = repo / v
+ if(snap)
+ IO.delete(versioned)
+ else if(versioned.exists)
+ error("Site for " + v + " already exists: " + versioned.getAbsolutePath)
+ IO.copy(mappings map { case (file, target) => (file, versioned / target) })
+ IO.copyFile(cname, repo / cname.getName)
+ IO.touch(repo / ".nojekyll")
+ linkSite(repo, v, if(snap) "snapshot" else "release", s.log)
+ s.log.info("Copied site to " + versioned)
+ repo
+ }
def linkSite(base: File, to: String, from: String, log: Logger) {
val current = base / to
assert(current.isDirectory, "Versioned site not present at " + current.getAbsolutePath)
- val symlinkFile = base / from
- symlinkFile.delete()
- symlink(to = current, from = symlinkFile, log = log)
+ val symlinkDir = base / from
+ symlinkDir.delete()
+ symlink(path = to, file = symlinkDir, log = log)
}
// TODO: platform independence/use symlink from Java 7
- def symlink(to: File, from: File, log: Logger): Unit =
- "ln" :: "-s" :: to.getAbsolutePath :: from.getAbsolutePath :: Nil ! log match {
+ def symlink(path: String, file: File, log: Logger): Unit =
+ "ln" :: "-s" :: path :: file.getAbsolutePath :: Nil ! log match {
case 0 => ()
- case code => error("Could not create symbolic link from " + from + " to " + " to.")
+ case code => error("Could not create symbolic link '" + file.getAbsolutePath + "' with path " + path)
}
}
View
@@ -22,11 +22,17 @@ object Sxr
sxr in taskGlobal <<= sxrTask
)
def taskGlobal = ThisScope.copy(task = Global)
- def sxrTask = (sources, target, scalacOptions, classpathOptions, scalaInstance, fullClasspath in sxr, streams) map { (srcs, out, opts, cpOpts, si, cp, s) =>
- IO.delete(out)
- IO.createDirectory(out)
- val comp = new compiler.RawCompiler(si, cpOpts, s.log)
- comp(srcs, cp.files, out, opts)
- out.getParentFile / (out.getName + ".sxr")
+ def sxrTask = (sources, cacheDirectory, target, scalacOptions, classpathOptions, scalaInstance, fullClasspath in sxr, streams) map { (srcs, cache, out, opts, cpOpts, si, cp, s) =>
+ val outputDir = out.getParentFile / (out.getName + ".sxr")
+ val f = FileFunction.cached(cache / "sxr", FilesInfo.hash) { in =>
+ s.log.info("Generating sxr output in " + outputDir.getAbsolutePath + "...")
+ IO.delete(out)
+ IO.createDirectory(out)
+ val comp = new compiler.RawCompiler(si, cpOpts, s.log)
+ comp(in.toSeq.sorted, cp.files, out, opts)
+ Set(outputDir)
+ }
+ f(srcs.toSet)
+ outputDir
}
}
View
@@ -1,3 +1,7 @@
libraryDependencies += "net.databinder" %% "dispatch-http" % "0.8.8"
-addSbtPlugin("com.jsuereth" % "sbt-site-plugin" % "0.5.0")
+addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "0.6.0")
+
+resolvers += "jgit-repo" at "http://download.eclipse.org/jgit/maven"
+
+addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.5.0")
View
@@ -1,5 +0,0 @@
-pygments: true
-name: Simple Build Tool
-description: Homepage for the Simple Build Tool
-url: http://scala-sbt.org
-markdown: rdiscount
@@ -1,31 +0,0 @@
-
-<script type="text/javascript" src="/jquery.scrollto.min.js"></script>
-<script type="text/javascript">
- (function($){ $(function(){
- $("#top").click(function(){ $("#intro").ScrollTo(); })
-
- var applyH = function() {
- $("#intro, .feature").each(function (i, elt) {
- if ($(elt).height() < $(window).height()) {
- $(elt).height($(window).height());
- }
- });
- };
- $(window).bind('resize', function() { applyH(); });
- applyH();
-
- $('#features a, .st').click(function(e){
- var h = $(this).attr('href');
- if(h && h[0] && h[0] == '#') {
- e.preventDefault();
-
- $(h).ScrollTo({
- callback:function(){ window.location.hash = h;}
- });
- }
- });
- });})(jQuery);
-</script>
-
-</body>
-</html>
@@ -1,13 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
-<head>
- <title>{% if page.title %}{{ page.title }} - {% endif %}{{ site.title }}</title>
- <link href='http://fonts.googleapis.com/css?family=Copse' rel='stylesheet' type='text/css'>
- <link href='/resources/site.css' rel='stylesheet' type='text/css'>
- <link href='/resources/syntax.css' rel='stylesheet' type='text/css'>
- <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js">
- </script>
-</head>
-<body>
@@ -1,13 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
-<head>
- <title>{% if page.title %}{{ page.title }} - {% endif %}{{ site.title }}</title>
- <link href='http://fonts.googleapis.com/css?family=Copse' rel='stylesheet' type='text/css'>
- <link href='/resources/howto-site.css' rel='stylesheet' type='text/css'>
- <link href='/resources/syntax.css' rel='stylesheet' type='text/css'>
- <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js">
- </script>
-</head>
-<body>
@@ -1,15 +0,0 @@
- <!-- Topbar
- ================================================== -->
- <div class="cf" id="more" >
- <div id="top">
- <div class="container">
- <a class="brand" href="/">SBT</a>
- <ul class="nav">
- <li><a href="/learn.html">Learn</a>
- <li><a href="/download.html">Download</a>
- <li><a href="/community.html">Community</a></li>
- <li><a href="#top">Top</a></li>
- </ul>
- </div>
- </div>
- </div>
@@ -1,23 +0,0 @@
-{% include howto_header.txt %}
-
-{% include topbar.txt %}
-
-<div class="cf" id="container">
- <div class="span2 columns container-spacer"><p>&nbsp;</p></div>
- <div id="intro" class="span10 columns content">
- <div id="head" class="cf">
- <h2><span style="color:black;">sbt</span> {{page.title}}</h2>
- </div>
- <div id="pagecontent" class="cf">
- {{ content }}
- </div>
- </div>
- </div>
- <div class="span6 columns"><p>&nbsp;</p></div>
-</div>
-
-
-</body>
-</html>
-
-
@@ -1,65 +0,0 @@
-{% include header.txt %}
-
-{% include topbar.txt %}
-
-<div class="cf" id="container">
- <div class="span2 columns container-spacer"><p>&nbsp;</p></div>
- <div id="intro" class="span10 columns content">
- <div id="head" class="cf">
- <div id="name" class="left">
- <h1>sbt</h1>
- <h2>{{page.title}}</h2>
- <p id="what">{{page.tagline}}</p>
- </div>
- <div class="left page-description" id="vc">
- {{page.description | markdownify }}
- </div>
- </div>
- <div id="features" class="cf">
- <div id="feature-list">
- <ul class="left">
- {% for link in page.toplinks %}
- {% capture x %}{% cycle 'odd', 'even' %}{% endcapture %}
- {% if x == 'odd' %}
- {% if link.link %}
- <li><a href="{{link.link}}">{{link.name}}</a></li>
- {% else %}
- <li><a href="#{{link.id}}">{{link.name}}</a></li>
- {% endif %}
- {% endif %}
- {% endfor %}
- </ul>
- <ul class="left">
- {% for link in page.toplinks %}
- {% capture x %}{% cycle 'odd2', 'even2' %}{% endcapture %}
- {% if x == 'even2' %}
- {% if link.link %}
- <li><a href="{{link.link}}">{{link.name}}</a></li>
- {% else %}
- <li><a href="#{{link.id}}">{{link.name}}</a></li>
- {% endif %}
- {% endif %}
- {% endfor %}
- </ul>
- </div>
- </div>
- <div id="pagecontent" class="cf">
- {{ content }}
- </div>
- </div>
-
- <div id="extra">
- <ul id="examples">
- {% for link in page.toplinks %}{% if link.content %}
- {% if link.content %}
- <li id="{{link.id}}" class="feature contained">{{ link.content | markdownify }}</li>
- {% endif %}
- {% endif %}{% endfor %}
- </ul>
- </div>
- </div>
- <div class="span6 columns"><p>&nbsp;</p></div>
-</div>
-
-
-{% include footer.txt %}
@@ -1,25 +0,0 @@
-{% include howto_header.txt %}
-
-<div class="cf" id="container">
- <div class="span2 columns container-spacer"><p>&nbsp;</p></div>
- <div id="intro" class="span10 columns content">
- <div id="head" class="cf">
- <h2>{{page.title}}</h2>
- </div>
- <div class="cf"><div id="feature-list">
- <h3> How to ...</h3>
- <ul class="left" id="section-toc">
- {% for section in page.sections %}
- <li id="feature"><h5>... <a href="#{{section.id}}">{{section.name}}</a></h5></li>
- {% endfor %}
- </ul>
- </div></div>
- <div id="pagecontent" class="cf">
- {{ content }}
- </div>
- </div>
- </div>
-</div>
-
-
-{% include footer.txt %}
Oops, something went wrong.

0 comments on commit 839f9b6

Please sign in to comment.