Skip to content

Instantly share code, notes, and snippets.

@kilmajster
Created July 9, 2020 16:53
Show Gist options
  • Save kilmajster/ad774c11c47ab5b45e9e36c8b8baabef to your computer and use it in GitHub Desktop.
Save kilmajster/ad774c11c47ab5b45e9e36c8b8baabef to your computer and use it in GitHub Desktop.
@SpringBootApplication
public class MinimalBlogDemo {
public static void main(String[] args) { SpringApplication.run(MinimalBlogDemo.class, args); }
@Bean
public MinimalBlog configureBlog() {
return new MinimalBlog()
.withBlogName("Minimal blog spring boot starter 💡")
.withAuthor("Łukasz Włódarczyk")
.withResourcesRootDir("blog")
.withPostsOnPage(1)
.withAboutContent(// @formatter:off
"This is example content of about section, about is great for not too " +
"long but also not too short texts quotes, it will be show every time " +
"on the main page. This one contain (190) characters! 🎉" // @formatter:on
).withElsewhereLinks(Arrays.asList(
new ElsewhereLink()
.withName("Project github page")
.withLink("https://github.com/kilmajster/minimal-blog-spring-boot-starter"),
new ElsewhereLink()
.withName("Cool link 🌵")
.withLink("http://www.google.com")
)).withHideTemplateInfo(false)
.withTemplateInfoOverride(// @formatter:off
"<code>Developed with 🍀 for <a href=\"https://spring.io/projects/spring-boot\">spring-boot</a> " +
"by <a href=\"https://github.com/kilmajster\">@kilmajster</a></code>"); // @formatter:on
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment