Blog example? (display posts from markdown)

Does anyone have an example of a blog? I looked in Examples and Demos, but didn’t see anything. I guess it’s not the typical business app that Vaadin specializes in, but it does seem like something that many people must have done already. It seems pretty straight forward, but I thought I would check before reinventing the wheel.

I guess it depends heavily on what the app behind the blog shall be capable of. Is it just a simple “show the text I have written”? Then I think it is nothing more than a “simple” CRUD for creating blog entries, using a rich text editor and another view showing those blogs (including the usual things like security setup and a database).

1 Like

If one just wants to show markdown, check RichText component from Viritin. Depending on needs an earlier version might be also more valuable (did MD->HTML in server, latest version uses JS library as I wanted to get rid of an extra dependency, nothing wrong with it, but less might be more in some cases).

In one “blog” (or more like a tiny CMS) I wrote with Vaadin, only the admin/editing part was Vaadin based. Depending on your needs (e.g. if SEO is a top priority), something non-SPA might be a better option for the public parts. I used Spring MVC + Thymeleaf for the “public parts”, which were still technically embedded to other html pages with SSIs in nginx (legacy website) :nerd_face:

2 Likes

Blog posts are written in markdown so it’s just the display pages for posts, single post, post by tags, archive. I know it probably seems trivial to most people. I can definitely throw it together. Just thought it would be helpful to see what a professional design would be like.

Thanks for the advice, Matti! I appreciate you sharing your experience. I wasn’t fully considering the SEO implications of using Vaadin for the public-facing blog pages. Since SEO is indeed a priority for this blog project, I’ll follow your suggestion and go with Spring MVC + Thymeleaf for the public parts. I actually have more experience with those technologies anyway. For now, I don’t even need an admin interface, but if I build one in the future, I’ll use Vaadin for that part. This hybrid approach makes a lot of sense - using the right tool for each specific need. Thanks again for helping me avoid a potential SEO pitfall!

1 Like

It is my duty and pleasure to tell people they should use Vaadin, but I’m also happy to tell when it might not be the best choice :sunglasses: For this simple case, a simpler tool gets the job done as well.

3 Likes

I wouldn’t use Thymeleaf anymore as it is slow. Have a look at JTE instead https://jte.gg

1 Like