#schema in starlight

7 messages · Page 1 of 1 (latest)

stark pier
#

How would I create a separate instance for example a blog instance besides the docs instance for people to access?

opaque windBOT
#

Hi @stark pier. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

To create a separate instance such as a blog in your Astro project, you can follow these steps:

  1. Create a new directory in your src/pages/ directory for your blog. For example, you could create a src/pages/blog/ directory.

  2. Inside this directory, you can create individual .astro or .md files for each blog post. For example, you could create a post-1.astro file for your first blog post.

Here's an example of how you might structure your project:

  • Directorysrc/
    • Directorypages/
      • Directoryblog/
        • post-1.astro
      • index.astro
  • astro.config.mjs
  • package.json

Each .astro or .md file in the src/pages/blog/ directory will be a separate page on your site. For example, post-1.astro would be accessible at www.yoursite.com/blog/post-1.

You can also integrate your Astro project with a CMS like Kontent.ai (https://docs.astro.build/en/guides/cms/kontent-ai/), Ghost (https://docs.astro.build/en/guides/cms/ghost/), Storyblok (https://docs.astro.build/en/guides/cms/storyblok/), Builder.io (https://docs.astro.build/en/guides/cms/builderio/), DatoCMS (https://docs.astro.build/en/guides/cms/datocms/), Contentful (https://docs.astro.build/en/guides/cms/contentful/) or WordPress (https://docs.astro.build/en/guides/migrate-to-astro/from-wordpress/) to manage your blog posts.

Remember to link to your blog posts from your main pages so that users can find them. For example, you could add a link to post-1.astro in your index.astro file like this:

<a href="/blog/post-1/">Read our first blog post</a>

This will create a link on your homepage that users can click to read your first blog post.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:

#

@stark pier kapa.ai is still learning and improving, please let us know how it did by reacting below

stark pier
#

@opaque wind how would I keep the starlight theme for the /wikis directory?

my structure:

├───content
│ └───docs
│ ├───extensions
│ ├───functions
│ │ ├───array-related
│ │ ├───awaited-related
│ │ ├───client-related
│ │ ├───event-related
│ │ ├───guild-related
│ │ ├───info-related
│ │ ├───interaction-related
│ │ ├───invite-related
│ │ ├───math-related
│ │ ├───message-related
│ │ ├───misc-related
│ │ ├───user-related
│ │ ├───util-related
│ │ └───variables-related
│ └───guides
│ ├───application-cmds
│ ├───client
│ └───other
├───pages
│ └───wikis
│ └───Fafa
└───styles

opaque windBOT
#

Let me check the knowledge base for you. One moment! :books:

#

To keep the Starlight theme for the /wikis directory, you can follow these steps:

  1. Create a new directory in your src/pages/ directory for your wikis. For example, you could create a src/pages/wikis/ directory.

  2. Inside this directory, you can create individual .astro or .md files for each wiki page. For example, you could create a Fafa.astro file for your Fafa wiki page.

Here's an example of how you might structure your project:

  • Directorysrc/
    • Directorypages/
      • Directorywikis/
        • Fafa.astro
      • index.astro
  • astro.config.mjs
  • package.json

Each .astro or .md file in the src/pages/wikis/ directory will be a separate page on your site. For example, Fafa.astro would be accessible at www.yoursite.com/wikis/Fafa.

To apply the Starlight theme to these pages, you can import the Starlight CSS file in each .astro file in the src/pages/wikis/ directory. For example, in Fafa.astro, you could add this line to the top of the file:

<link rel="stylesheet" href="/path/to/starlight.css">

Replace /path/to/starlight.css with the actual path to the Starlight CSS file in your project.

This will apply the Starlight theme to the Fafa wiki page. You can repeat this process for each wiki page in the src/pages/wikis/ directory.

Remember to link to your wiki pages from your main pages so that users can find them. For example, you could add a link to Fafa.astro in your index.astro file like this:

<a href="/wikis/Fafa/">Read the Fafa wiki</a>

This will create a link on your homepage that users can click to read the Fafa wiki.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: