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

User configurable footer #220

Merged
merged 2 commits into from
Sep 6, 2017
Merged

User configurable footer #220

merged 2 commits into from
Sep 6, 2017

Conversation

suhasgaddam
Copy link
Contributor

Closes #218

I'm not completely fond of micrositeFooterText as a setting key name because there are 2 lines in the footer. This setting only allows modifying the second the second line.

test("globalFooter TypeTag should have the appropriate content") {

val property = forAll { implicit settings: MicrositeSettings ⇒
(settings.templateTexts.footer.isDefined) ==> {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is there a ligature for ==>?

Copy link
Contributor

Choose a reason for hiding this comment

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

Not that I'm aware of but AFAIK we don't use special symbols anywhere since many fonts already display ligatures for those

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Only reason I ask is this project has explicitly on Line 84 and 47deg/fetch has scalafmt rewrite rules to remove them(https://github.com/47deg/fetch/blob/master/.scalafmt.conf#L24). I was curious if we are requiring/maintaining consistency.

@@ -133,6 +133,10 @@ trait MicrositeKeys {
"Optional. Add custom Gitter sidecar Chat URL. By default is owner/repository."
)

val micrositeFooterText: SettingKey[Option[String]] = SettingKey[Option[String]](
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Would this make more sense as Option[TypedTag[String]] for more type safety?

Copy link
Contributor

Choose a reason for hiding this comment

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

you mean as as scalatags tag? I think is fine like that but if scalatags types make sense here then sure.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup, scalatags. My only apprehension is would the user need to add another dependency? Or does the scalatags dependency come for "free" when a user adds sbt-microsites?

The current String allows one to always {blah: TypedTag[String]}.toString.

@@ -133,6 +133,10 @@ trait MicrositeKeys {
"Optional. Add custom Gitter sidecar Chat URL. By default is owner/repository."
)

val micrositeFooterText: SettingKey[Option[String]] = SettingKey[Option[String]](
Copy link
Contributor

Choose a reason for hiding this comment

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

you mean as as scalatags tag? I think is fine like that but if scalatags types make sense here then sure.

test("globalFooter TypeTag should have the appropriate content") {

val property = forAll { implicit settings: MicrositeSettings ⇒
(settings.templateTexts.footer.isDefined) ==> {
Copy link
Contributor

Choose a reason for hiding this comment

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

Not that I'm aware of but AFAIK we don't use special symbols anywhere since many fonts already display ligatures for those

@raulraja raulraja merged commit 4dca0da into master Sep 6, 2017
@raulraja raulraja deleted the user-configurable-footer branch September 6, 2017 13:39
@raulraja
Copy link
Contributor

raulraja commented Sep 6, 2017

@suhasgaddam @juanpedromoreno when the release is ready can you let @kailuowang and @BennyHill know? They were the ones that originally requested this to be configurable for cats.

@suhasgaddam
Copy link
Contributor Author

It looks like @dominv bumped sbt-microsites to 0.6.3 in #219 which is already closed.

@BennyHill @kailuowang sbt-microsites:0.6.3 has the configurability requested in micrositeFooterText

For documentation on the setting: https://github.com/47deg/sbt-microsites/blob/master/docs/src/main/tut/docs/settings.md

@kailuowang
Copy link

thanks very much!

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.

4 participants