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

Adds videos (community only) #144

Merged
merged 1 commit into from
May 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,18 @@ object DocumentationGenerator extends App {
"jaxenter")
)

val videos = Seq(
// VideoLink(description, href),
VideoLink("Begin Event Sourcing with Lagom", "https://youtube.com/watch?v=Sx8ctqLxDf0"),
VideoLink("EventSourcing and CQRS with Lagom Microservice Framework", "https://youtube.com/watch?v=BuyXxw79fKk"),
VideoLink("CQRS and Event Sourcing with Lagom by Miel Donkers", "https://youtube.com/watch?v=1VOfcuWOuy8"),
VideoLink("Event Sourcing and CQRS by Lutz Huehnken", "https://youtube.com/watch?v=Z6_Nd7lu2PI"),
VideoLink("Events-First Microservices with Lagom by Gideon de Kok", "https://youtube.com/watch?v=f1YSSaI_J-c"),
VideoLink("Lagom in Practice by Yannick De Turck", "https://youtube.com/watch?v=JOGlZzY6ycI")
)



// Set this to Some("your-github-account-name") if you want to deploy the docs to the gh-pages of your own fork
// of the repo
val gitHubAccount: Option[String] = None
Expand Down Expand Up @@ -305,7 +317,7 @@ object DocumentationGenerator extends App {
}

val generated = templatePages.map((generatePage _).tupled) ++
Seq(savePage("documentation/index.html", html.documentationIndex(stableVersions, previewVersions, oldVersions, versions, communityContents))) ++
Seq(savePage("documentation/index.html", html.documentationIndex(stableVersions, previewVersions, oldVersions, versions, communityContents, videos))) ++
versions.map { version =>
savePage(s"documentation/${version.name}/index.html", html.documentationVersionIndex(version), includeInSitemap = false)
} ++
Expand Down Expand Up @@ -360,6 +372,8 @@ case class VersionSummary(name: String, title: String)

case class CommunityContent(description:String, href:String, hrefTitle:String)

case class VideoLink(description:String, href:String)

case class Version(name: String, languages: Seq[LanguageVersion]) {
def versionFor(language: String): Option[LanguageVersion] = languages.find(_.language == language)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
@import com.lightbend.lagom.docs.VersionSummary
@import com.lightbend.lagom.docs.CommunityContent
@import com.lightbend.lagom.docs.VideoLink
@import com.lightbend.lagom.docs.Version
@import com.lightbend.lagom.docs.LagomContext

@(stableVersions: Seq[VersionSummary], previewVersions: Seq[VersionSummary], oldVersions: Seq[VersionSummary], versions: Seq[Version], communityContents: Seq[CommunityContent])(implicit ctx: LagomContext)
@(stableVersions: Seq[VersionSummary], previewVersions: Seq[VersionSummary], oldVersions: Seq[VersionSummary], versions: Seq[Version], communityContents: Seq[CommunityContent], videos: Seq[VideoLink])(implicit ctx: LagomContext)

@toTitleCase(s: String) = {@[email protected]}

Expand All @@ -18,14 +19,22 @@ <h3>@summary.title</h3>
}
}

@renderContent(communityContents: Seq[CommunityContent]) = {
@renderContent(ccs: Seq[CommunityContent]) = {
<ul>
@for(cc <- communityContents) {
@for(cc <- ccs) {
<li>@{cc.description} (<a href="@cc.href">@cc.hrefTitle</a>)</li>
}
</ul>
}

@renderVideo(vds: Seq[VideoLink]) = {
<ul>
@for(video <- vds) {
<li><a href="@video.href">@{video.description}</a></li>
}
</ul>
}

@page("Documentation") {
<h1>Release versions</h1>

Expand Down Expand Up @@ -69,8 +78,14 @@ <h1>Community Content</h1>
Blog posts, webinars, tutorials and other content provided by the community.
</p>

<h3>Blog posts</h3>

@renderContent(communityContents)

<h3>Videos</h3>

@renderVideo(videos)

}


Expand Down