Skip to content
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

microsite dir being copied when using sbt-microsites in main sbt module #335

Closed
calvellido opened this issue Sep 19, 2019 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@calvellido
Copy link
Contributor

In a simple project using sbt-microsites:

  • src
    • main
      • resources
        • microsite
          • data
            • menu.yml
      • scala
        • HelloWorld.scala
      • tut
        • docs
        • index.md
// build.sbt
micrositeName := "ACME sbt-microsites"
micrositeDescription := "ACME sbt-microsites"
micrositeAuthor := "ACME"

enablePlugins(MicrositesPlugin)

With these settings, when we run makeMicrosite, the generated target/site will include the whole microsite directory:

  • css
  • docs
  • highlight
  • img
  • js
  • microsite
    • data
      • menu.yml
  • _config.yml
  • index.html

This won't happen if the MicrositePlugin is being used as part of another module, say docs:

  • docs
    • src
      • main
        • resources
          • microsite
            • data
              • menu.yml
        • tut
          • docs
          • index.md
  • src
    • main
      • scala
        • HelloWorld.scala
// build.sbt
lazy val commonSettings = Seq(
  micrositeName := "ACME sbt-microsites",
  micrositeDescription := "ACME sbt-microsites",
  micrositeAuthor := "ACME",
)

lazy val root = (project in file("."))
  .aggregate(docs)
  .dependsOn(docs)

lazy val docs = (project in file("docs"))
  .settings(commonSettings: _*)
  .enablePlugins(MicrositesPlugin)

Then, the generated docs/target/site would be:

  • css
  • docs
  • highlight
  • img
  • js
  • _config.yml
  • index.html

The correct behaviour should always be the second one, as that directory is not needed on the deployed website, and can cause problems when commiting files (47degrees/github4s#259), etc.

@calvellido calvellido added the bug Something isn't working label Sep 19, 2019
@calvellido calvellido changed the title microsite dir being copied when sbt-microsites used in main sbt module microsite dir being copied when using sbt-microsites in main sbt module Sep 19, 2019
@calvellido
Copy link
Contributor Author

This has been solved through #373

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant