Pages and Sections
Learn how to reorder page sections, add your own Astro section, choose a different homepage, and create or replace routes in your project.
Reorder a designed page
Section titled “Reorder a designed page”Open src/pages/index.astro. Its frontmatter loads Home I data:
const { page, site } = await designedPage('home-1', 'HomeOne');The calls inside <SiteLayout page={page} site={site}> determine section order. Move the complete <FeatureGridSection items={page.features} /> call above or below another section, or remove it. Keep imports for sections you still use.
Nineteen supplied pages expose section composition: Home I–IX, About I–II, Services, Team, Contact I–III, FAQ and two custom shop pages. Other customer routes use blog, product, portfolio or commerce layouts, or element examples. Their route ownership does not expose every internal section as a separate customer file.
Add a local section
Section titled “Add a local section”Create src/components/MySection.astro:
<section class="container py-12"> <h2>Your own section</h2> <p>Your content.</p></section>Add this import to the page’s existing frontmatter:
import MySection from '../components/MySection.astro';Place <MySection /> between the page’s section calls. Preview both desktop and mobile layouts. If you need to edit the supplied component’s HTML instead, see Components and Custom Code.
Choose another homepage
Section titled “Choose another homepage”To use Home V at /, copy the whole contents of src/pages/home-page-v.astro into src/pages/index.astro. Both files have the same folder depth, so the relative imports remain correct. Keep designedPage('home-5', 'HomeFive') and its corresponding section props together; edit src/content/pages/home-5.json for its content.
The same method works for Home II–IX. Keep the original route file if you also want its separate demo URL. Do not combine HomeOne data with HomeFive sections or create another route at /.
Add or replace a route
Section titled “Add or replace a route”Create a customer Astro file under src/pages/ for a custom designed page. Use the appropriate page data and shared layout. For an ordinary text page, use document MDX.
Each URL must have one owner. The supplied integration uses pages: [] because its routes already live in your project. Do not add an injected route for an existing customer URL. Remove or rename the existing owner before replacing it, and plan redirects for published URLs.
Get all RT-Themes designs, updates and support with a single Club license.
Join the Club