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

Allows customizing Jekyll _config.yml file #110

Merged

Conversation

juanpedromoreno
Copy link
Member

In three different ways (not exclusive each other):

  • Specifying a provided _config.yml
  • Specifying a YAML string inline in the sbt configuration
  • Through custom liquid variables

These three ways will be merged in order to generate the final and single _config.yml file.
This is possible thanks to the ConfigYml case class and the sbt setting named as micrositeConfigYaml, which looks like follows:

case class ConfigYml(
      yamlCustomProperties: Map[String, Any] = Map.empty,
      yamlPath: Option[File] = None,
      yamlInline: String = ""
  )

For instance:

micrositeConfigYaml := ConfigYml(
  yamlCustomProperties = Map("org" -> "My Org"),
  yamlInline = """exclude: [package.json, grunt.js, Gruntfile.js, node_modules]
|""".stripMargin,
  yamlPath = Some((resourceDirectory in Compile).value / "microsite" / "myconfig.yml")
)

This PR fixes #72 and #43.

Please, @raulraja @jdesiloniz could you review? Thanks!

Copy link

@jdesiloniz jdesiloniz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!!

@juanpedromoreno juanpedromoreno merged commit 49aa11c into master Dec 14, 2016
@juanpedromoreno juanpedromoreno deleted the sbtm-72-allows-liquid-variables-via-sbt-config branch December 14, 2016 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow user to provide Liquid variables via sbt
2 participants