HugoBlox / hugo-blox-builder

🚨 GROW YOUR AUDIENCE WITH HUGOBLOX! 🚀 HugoBlox is an easy, fast no-code website builder for researchers, entrepreneurs, data scientists, and developers. Build stunning sites in minutes. 适合研究人员、企业家、数据科学家和开发者的简单快速无代码网站构建器。用拖放功能、可定制模板和内置SEO工具快速创建精美网站!
https://hugoblox.com/templates/
MIT License
8.2k stars 2.9k forks source link

Short news section #1677

Closed apetros closed 4 years ago

apetros commented 4 years ago

First off, great theme, thanks for all the hard work building the theme and a community around it. This is not a request, but a modification I put here like a "wiki" input.

I wanted to have a News section with the last 3-4 news shown on the homepage and the rest in a separate page with a link from the main page "see all news". I could have used the posts module but I wanted to have links in the news directly to some new articles etc. While the posts were kind of an overkill for me.

newsfiles.zip recent_news.md --> goes in content/home news.md and newslist.dat --> goes in content/ readfromfile.html --> goes in themes/academic/layouts/shortcodes

It looks like this.

kanishkamisra commented 4 years ago

Hey @apetros I wanted to add a news section to my personal website, should I just paste the files you've created to the locations specified in your issue?

felicitia commented 4 years ago

This is amazing! Exactly what I wanted! Your instruction is also clear and super easy to follow. Thank you very much for sharing! :)

AlCorreia commented 4 years ago

This is a nice feature! Thanks for that!

To avoid conflicts with the Academic theme, I think it is probably best to add the shortcode to a new directory layouts/shortcodes instead of themes/academic/layouts/shortcodes, as suggested in the hugo documentation.