-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document how to keep older api docs around #10
Comments
👍. I've been working around this same problem and came here to look for a better solution. |
👍 as well, and further, the current documentation lies:
Note the second sentence, which appears to expressly suggest that existing content will be left alone, but reading the plugin code As a guideline to help get people started, below is how I have set things up in hopes of generating (and retaining) versioned copies of Scaladoc. I'd be happy to work this into a contribution of plugin documentation, but as of now it falls short since // project/plugins.sbt
resolvers += "jgit-repo" at "http://download.eclipse.org/jgit/maven"
addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "1.0.0-RC3")
addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.5.4") // build.sbt
autoAPIMappings := true
scalacOptions in (Compile, doc) ++= Seq(
"-doc-title", "My Project",
"-doc-version", version.value,
"-groups"
)
enablePlugins(SiteScaladocPlugin)
siteSubdirName in SiteScaladoc := s"api/${version.value}"
// Builds static files in src/site-preprocess with variable substitution.
enablePlugins(PreprocessPlugin)
preprocessVars := Map("VERSION" -> version.value)
// Enables easy publishing to project's gh-pages.
ghpages.settings
git.remoteRepo := "[email protected]:ches/my-project.git" <!-- src/site-preprocess/index.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Project Documentation</title>
<script>
<!--
function doRedirect() {
window.location.replace("api/@VERSION@/org/mygroup/myproject/package.html");
}
doRedirect();
//-->
</script>
</head>
<body>
<a href="api/@VERSION@/org/mygroup/myproject/package.html">Go to the project documentation</a>
</body>
</html> |
I'm trying to accomplish the same task but with a different implementation. |
Doing it manually
This works it creates the correct content at Github Pages. Trying to automate it
So the missing step is how to create the correct symlink inside |
When I use sbt-site and sbt-ghpages plugin to publish Scala docs, I mostly never want it to wipe out the older pages. Could we either document how now to do that, or have some settings for a pattern of pages that it doesn't wipe out?
The text was updated successfully, but these errors were encountered: