From b2f155fab6c24772c039c8101564dc07124152ee Mon Sep 17 00:00:00 2001 From: Mark Harrah Date: Thu, 8 Nov 2012 22:40:24 -0500 Subject: [PATCH] update to latest sbt-site plugin, generate pdf --- project/Docs.scala | 7 ++++++- project/p.sbt | 2 +- src/sphinx/conf.py | 7 +++++++ src/sphinx/index.rst | 1 + src/sphinx/pdf_index.rst | 29 +++++++++++++++++++++++++++++ 5 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 src/sphinx/pdf_index.rst diff --git a/project/Docs.scala b/project/Docs.scala index 68e459f8b..bd77f0c74 100644 --- a/project/Docs.scala +++ b/project/Docs.scala @@ -12,6 +12,7 @@ object Docs { val cnameFile = SettingKey[File]("cname-file", "Location of the CNAME file for the website.") + val SnapshotPath = "snapshot" val ReleasePath = "release" val DocsPath = "docs" @@ -24,7 +25,11 @@ object Docs site.sphinxSupport(DocsPath) ++ site.includeScaladoc("api") ++ siteIncludeSxr("sxr") ++ - ghPagesSettings + ghPagesSettings ++ + Seq( + SphinxSupport.sphinxIncremental in SphinxSupport.Sphinx := true, + SphinxSupport.enableOutput in SphinxSupport.generatePdf := true + ) def ghPagesSettings = ghpages.settings ++ Seq( git.remoteRepo := "git@github.com:sbt/sbt.github.com.git", diff --git a/project/p.sbt b/project/p.sbt index 7e437e8f5..ce154aae1 100644 --- a/project/p.sbt +++ b/project/p.sbt @@ -3,7 +3,7 @@ libraryDependencies ++= Seq( "org.jsoup" % "jsoup" % "1.7.1" ) -addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "0.6.0") +addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "0.7.0-M1") resolvers += "jgit-repo" at "http://download.eclipse.org/jgit/maven" diff --git a/src/sphinx/conf.py b/src/sphinx/conf.py index ab92190e8..44bd5e2fb 100644 --- a/src/sphinx/conf.py +++ b/src/sphinx/conf.py @@ -46,6 +46,13 @@ site_search_base = 'http://www.scala-sbt.org/release/docs' # passes variables to the template html_context = {'home_site': home_site, 'site_search_base': site_search_base} +# Latex (PDF) + +pdf_index = 'pdf_index' +latex_documents = [ + (pdf_index, 'sbt.tex', html_title, '', 'manual', True), +] + # Issues role issuetracker = 'github' diff --git a/src/sphinx/index.rst b/src/sphinx/index.rst index 1bea35f42..9ff3d5038 100644 --- a/src/sphinx/index.rst +++ b/src/sphinx/index.rst @@ -34,3 +34,4 @@ the :doc:`index of names and types `. Dormant/Dormant Community/ChangeSummary_0.12.0 Community/Repository-Rules + pdf_index diff --git a/src/sphinx/pdf_index.rst b/src/sphinx/pdf_index.rst new file mode 100644 index 000000000..5b3d8a41f --- /dev/null +++ b/src/sphinx/pdf_index.rst @@ -0,0 +1,29 @@ +To get started, read the :doc:`Getting Started Guide `. +Further topics are presented in detail in the :doc:`Detailed Topics `, +:doc:`Howto `, and :doc:`Extending sbt ` sections. + +See also the :doc:`index of names and types `. + +.. toctree:: + :maxdepth: 2 + + Getting-Started/index + Detailed-Topics/index + Examples/index + Howto/index + faq + Community/index + Extending/index + Name-Index + + +.. The following includes documents that are not important enough to be in a visible toctree + They are linked from other documents, which is enough. + +.. toctree:: + :maxdepth: 0 + :hidden: + + Dormant/Dormant + Community/ChangeSummary_0.12.0 + Community/Repository-Rules