mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-02 16:29:47 +02:00
Add About Slash page (#282)
It will show up in the header as "About/" :)
This commit is contained in:
parent
8481791221
commit
be1ea72237
4 changed files with 48 additions and 1 deletions
|
@ -3,7 +3,7 @@ id: custom-pages
|
|||
title: Custom Pages
|
||||
---
|
||||
|
||||
You can add pages to your site that are not part of the standard docs or blog markdown files. You can do this by adding `.js` files to the `website/pages` directory. These files are React components and the `render()` is called to create them, backed by CSS classes, etc.
|
||||
You can add pages to your site that are not part of the standard docs or blog markdown files. You can do this by adding `.js` files to the `website/pages` directory. These files are [React](https://facebook.github.io/react) components and the `render()` is called to create them, backed by CSS classes, etc.
|
||||
|
||||
## Customizing Your Home Page
|
||||
|
||||
|
@ -35,6 +35,8 @@ root-of-repo
|
|||
|
||||
Of course, you are also free to write your own pages. It is strongly suggested that you at least have an index page, but none of the pages provided are mandatory to include in your site. More information on how to use the provided components or include your own can be found [here](api-pages.md). Information on how to link to your different pages in the header navigation bar can be found [here](guides-navigation.md).
|
||||
|
||||
> If you want your page to show up in your navigation header, you will need to update `siteConfig.js` to add to the `headerLinks` element. e.g., `{ page: "about-slash", label: "About/"}`,
|
||||
|
||||
## Adding Static Pages
|
||||
|
||||
Static `.html` files can also be used, but they will not include Docusaurus's header, footer, or styles by default. These can be added to the `static` folder in the same way as other [static assets](api-pages.md#using-static-assets). Alternatively, they can be placed in the `pages` folder and would be served as-is instead of being rendered from React.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue