Create an About Page
The about page is a common page that provides information about your ministry or community. This chapter guides you in creating the about page but can also be used to create any text-based pages.
-
Create Files: Start by creating a markdown file for each locale. For example, if your site supports English and German, you would create the following files:
Directorysrc
Directorypages
Directoryen
- about.md
Directoryde
- about.md
-
Add File Content: Use Markdown Syntax to write your content. The content of the
/en/about.md
file could look like this:src/pages/en/about.md ---layout: "lightnet/layouts/MarkdownPage.astro"---# AboutSome text about your ministry or community.Set the layout to be
lightnet/layouts/MarkdownPage.astro
. This makes sure your page includes the header and looks good on all screen sizes. You can also create your own layout if you want to customize the look of the page. Astro takes care of optimizing your images that are referenced in the markdown file. -
Add About to Main Menu: Add the following code to the
astro.config.mjs
file:astro.config.mjs export default defineConfig({integrations: [lightnet({mainMenu: [{href: "/about",label: "x.navigation.about",},],}),],}); -
Add translations for Menu Entry: For each locale add a translation for the translation key (
x.navigation.about
) that has been used in the step before. For example add this to the English translation file:src/translations/en.yml x.navigation.about: About