<!doctype html><htmllang=en-audir=ltrclass=scroll-smoothdata-default-appearance=lightdata-auto-appearance=true><head><metacharset=utf-8><metahttp-equiv=content-languagecontent="en-au"><metaname=viewportcontent="width=device-width,initial-scale=1"><metahttp-equiv=x-ua-compatiblecontent="ie=edge"><title>Homepage Layout · Congo</title><metaname=titlecontent="Homepage Layout · Congo"><metaname=descriptioncontent="A powerful, lightweight theme for Hugo built with Tailwind CSS."><linkrel=canonicalhref=https://jpanther.github.io/congo/docs/homepage-layout/><linktype=text/cssrel=stylesheethref=/congo/css/main.bundle.min.fe92cefeb86e1cd65b82d4143fbb9f1dd28e4e3cd5990d2ed6dff3db6bd5253228486521e25088b229d2457d24c5c9337e29093b8d10d3c3f9cd6174596f8042.cssintegrity="sha512-/pLO/rhuHNZbgtQUP7ufHdKOTjzVmQ0u1t/z22vVJTIoSGUh4lCIsinSRX0kxckzfikJO40Q08P5zWF0WW+AQg=="><scripttype=text/javascriptsrc=/congo/js/appearance.min.12e98742cd283574d030a7fe55f29597df4ee214f7ff7075b4d19a64d046a602753c715295550be7899b661619cec89c679049d36c624681671a8013c1249896.jsintegrity="sha512-EumHQs0oNXTQMKf+VfKVl99O4hT3/3B1tNGaZNBGpgJ1PHFSlVUL54mbZhYZzsicZ5BJ02xiRoFnGoATwSSYlg=="></script>
<spanclass=mb-[2px]><ahref=https://github.com/jpanther/congo/tree/dev/exampleSite/content/docs/homepage-layout/index.mdclass="text-lg hover:text-primary-500"rel="noopener noreferrer"target=_blanktitle="Edit content"><spanclass="relative inline-block align-text-bottom icon"><svgxmlns="http://www.w3.org/2000/svg"viewBox="0 0 512 512"><pathfill="currentcolor"d="M490.3 40.4c21.9 21.87 21.9 57.33.0 79.2l-30 30.1-98-97.98 30.1-30.06C414.3-.2135 449.7-.2135 471.6 21.66L490.3 40.4zM172.4 241.7 339.7 74.34l98 97.96L270.3 339.6C264.2 345.8 256.7 350.4 248.4 353.2l-88.8 29.6C150.1 385.6 141.5 383.4 135 376.1 128.6 370.5 126.4 361 129.2 352.4l29.6-88.8C161.6 255.3 166.2 247.8 172.4 241.7v0zM192 63.1c17.7.0 32 15.23 32 32 0 18.6-14.3 32-32 32H96c-17.67.0-32 15.2-32 32V416c0 17.7 14.33 32 32 32H352c17.7.0 32-14.3 32-32V319.1c0-16.8 14.3-32 32-32s32 15.2 32 32V416c0 53-43 96-96 96H96c-53.02.0-96-43-96-96V159.1c0-53 42.98-96 96-96h96z"/></svg></span></a></span></div></div></header><sectionclass="flex flex-col max-w-full mt-0 prose lg:flex-row dark:prose-invert"><divclass="order-first px-0 lg:max-w-xs ltr:lg:pl-8 rtl:lg:pr-8 lg:order-last"><divclass="ltr:pl-5 rtl:pr-5 toc lg:sticky lg:top-10 print:hidden"><detailsopenclass="mt-0 overflow-hidden rounded-lg rtl:pr-5 ltr:pl-5 ltr:-ml-5 rtl:-mr-5 lg:mt-3"><summaryclass="block py-1 text-lg font-semibold cursor-pointer rtl:pr-5 ltr:pl-5 ltr:-ml-5 rtl:-mr-5 text-neutral-800 dark:text-neutral-100 lg:hidden bg-neutral-100 dark:bg-neutral-700">Table of Contents</summary><divclass="py-2 border-dotted ltr:border-l rtl:border-r rtl:pr-5 ltr:pl-5 ltr:-ml-5 rtl:-mr-5 border-neutral-300 dark:border-neutral-600"><navid=TableOfContents><ul><li><ahref=#page-layout>Page layout</a></li><li><ahref=#profile-layout>Profile layout</a></li><li><ahref=#custom-layout>Custom layout</a></li><li><ahref=#recent-articles>Recent articles</a></li></ul></nav></div></details></div></div><divclass="min-w-0 min-h-0 max-w-prose"><p>Congo provides a fully flexible homepage layout. There are two main templates to choose from with additional settings to adjust the design. Alternatively, you can also provide your own template and have complete control over the homepage content.</p><p>The layout of the homepage is controlled by the <code>homepage.layout</code> setting in the <code>params.toml</code> configuration file. Additionally, all layouts have the option to include a listing of <ahref=#recent-articles>recent articles</a>.</p><h2id=page-layoutclass="relative group">Page layout <spanclass="absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100"><aclass="group-hover:text-primary-300 dark:group-hover:text-neutral-700"style=text-decoration-line:none!importanthref=#page-layoutaria-label=Anchor>#</a></span></h2><p>The default layout is the page layout. It’s simply a normal content page that displays your Markdown content. It’s great for static websites and provides a lot of flexibility.</p><p><figure><imgclass="my-0 rounded-md"srcset="/congo/docs/homepage-layout/home-page_hu9ebf2dc0eb5e596beb284e744e4eca5b_246440_330x0_resize_q75_box.jpg330w,
/congo/docs/homepage-layout/home-page_hu9ebf2dc0eb5e596beb284e744e4eca5b_246440_1320x0_resize_q75_box.jpg 2x" src=/congo/docs/homepage-layout/home-page_hu9ebf2dc0eb5e596beb284e744e4eca5b_246440_660x0_resize_q75_box.jpg alt="Screenshot of homepage layout"></figure></p><p>To enable the page layout, set <code>homepage.layout = "page"</code> in the <code>params.toml</code> configuration file.</p><h2id=profile-layoutclass="relative group">Profile layout <spanclass="absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100"><aclass="group-hover:text-primary-300 dark:group-hover:text-neutral-700"style=text-decoration-line:none!importanthref=#profile-layoutaria-label=Anchor>#</a></span></h2><p>The profile layout is great for personal websites and blogs. It puts the author’s details front and centre by providing an image and links to social profiles.</p><p><figure><imgclass="my-0 rounded-md"srcset="/congo/docs/homepage-layout/home-profile_hueedbd6540c5e7a1ab659695612c95805_79548_330x0_resize_q75_box.jpg330w,
/congo/docs/homepage-layout/home-profile_hueedbd6540c5e7a1ab659695612c95805_79548_1320x0_resize_q75_box.jpg 2x" src=/congo/docs/homepage-layout/home-profile_hueedbd6540c5e7a1ab659695612c95805_79548_660x0_resize_q75_box.jpg alt="Screenshot of profile layout"></figure></p><p>The author information is provided in the languages configuration file. Refer to the <ahref=https://jpanther.github.io/congo/docs/getting-started/>Getting Started</a> and <ahref=https://jpanther.github.io/congo/docs/configuration/##language-and-i18n>Language Configuration</a> sections for parameter details.</p><p>Additionally, any Markdown content that is provided in the homepage content will be placed below the author profile. This allows extra flexibility for displaying a bio or other custom content using shortcodes.</p><p>To enable the profile layout, set <code>homepage.layout = "profile"</code> in the <code>params.toml</code> configuration file.</p><h2id=custom-layoutclass="relative group">Custom layout <spanclass="absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100"><aclass="group-hover:text-primary-300 dark:group-hover:text-neutral-700"style=text-decoration-line:none!importanthref=#custom-layoutaria-label=Anchor>#</a></span></h2><p>If the built-in homepage layouts aren’t sufficient for your needs, you have the option to provide your own custom layout. This allows you to have total control over the page content and essentially gives you a blank slate to work with.</p><p>To enable the custom layout, set <code>homepage.layout = "custom"</code> in the <code>params.toml</code> configuration file.</p><p>With the configuration value set, create a new <code>custom.html</code> file and place it in <code>layouts/partials/home/custom.html</code>. Now whatever is in the <code>custom.html</code> file will be placed in the content area of the site homepage. You may use whatever HTML, Tailwind, or Hugo templating functions you wish to define your layout.</p><p>To include <ahref=#recent-articles>recent articles</a> on the custom layout, use the <code>recent-articles.html</code> partial.</p><p>As an example, the <ahref=https://jpanther.github.io/congo/>homepage</a> on this site uses the custom layout to allow toggling between the profile and page layouts. Visit the <ahref=https://github.com/jpanther/congo/blob/dev/exampleSite/layouts/partials/home/custom.html>GitHub repo</a> to see how it works.</p><h2id=recent-articlesclass="relative group">Recent articles <spanclass="absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100"><aclass="group-hover:text-primary-300 dark:group-hover:text-neutral-700"style=text-decoration-line:none!importanthref=#recent-articlesaria-label=Anchor>#</a></span></h2><p>All homepage layouts have the option of displaying recent articles below the main page content. To enable this, simply set the <code>homepage.showRecent</code> setting to <code>true</code> in the <code>params.toml</code> configuration file.</p><p><figure><imgclass="my-0 rounded-md"srcset="/congo/docs/homepage-layout/home-profile-list_huf797f5adbd488711c27909ebe8ed8db6_105595_330x0_resize_q75_box.jpg330w,
/congo/docs/homepage-layout/home-profile-list_huf797f5adbd488711c27909ebe8ed8db6_105595_1320x0_resize_q75_box.jpg 2x" src=/congo/docs/homepage-layout/home-profile-list_huf797f5adbd488711c27909ebe8ed8db6_105595_660x0_resize_q75_box.jpg alt="Profile layout with recent articles"></figure></p><p>The articles listed in this section are derived from the <code>homepage.mainSections</code> setting which allows for whatever content types you are using on your website. For instance, if you had content sections for <em>posts</em> and <em>projects</em> you could set this setting to <code>["posts", "projects"]</code> and all the articles in these two sections would be used to populate the recent list. The theme expects this setting to be an array so if you only use one section for all your content, you should set this accordingly: <code>["blog"]</code>.</p></div></section><footerclass="pt-8 max-w-prose print:hidden"><divclass=pt-8><hrclass="border-dotted border-neutral-300 dark:border-neutral-600"><divclass="flex justify-between pt-3"><span><aclass="flex group"href=/congo/docs/configuration/><spanclass="mr-3 ltr:inline rtl:hidden text-neutral-700 dark:text-neutral group-hover:text-primary-600 dark:group-hover:text-primary-400">←</span>