[site] finetune index style
1 file changed
tree: c4000c141976623f4372a90f67a77ce1050f125c
  1. docs/
  2. website/
  3. .editorconfig
  4. .eslintignore
  5. .eslintrc
  6. .gitattributes
  7. .gitignore
  8. .prettierignore
  9. .prettierrc
  10. package.json
  11. README.md
  12. yarn.lock
README.md

Apache SINGA docs-site (README still work in progress)

Docusaurus Website Local Set Up

This website was created with Docusaurus.

You need at least node and yarn to get started with setting up a local development environment.

  1. Start from the SINGA root directory, install any website specific dependencies by yarn install.
# Install dependencies
$ yarn install
  1. Run a development server with hot-reloading to check changes by running yarn start in the website directory.
# Start the site
$ yarn run start:website

Docs for the Docusaurus Site

All the docs are located in the SINGA_ROOT/docs-site/docs/ folder.

documentation for older versions of Apache SINGA, which you can edit in website/versioned_docs

News for the Docusaurus Site

All the news are located in the SINGA_ROOT/docs-site/website/blog/ folder.

refer to this page for writing this README: https://github.com/apache/pulsar/tree/master/site2

Editing Content

Static assets

Static assets used in documents and blog/news should go into docs/assets and website/blog/assets

Editing an existing docs page

Edit docs by navigating to docs/ and editing the corresponding document:

docs/doc-to-be-edited.md

---
id: page-needs-edit
title: This Doc Needs To Be Edited
---

Edit me...

For more information about docs, click here

Editing an existing news post

Edit blog posts by navigating to website/blog and editing the corresponding post:

website/blog/post-to-be-edited.md

---
id: post-needs-edit
title: This Blog Post Needs To Be Edited
---

Edit me...

For more information about blog posts, click here

Adding Content

Adding a new docs page to an existing sidebar

  1. Create the doc as a new markdown file in /docs, example docs/newly-created-doc.md:
---
id: newly-created-doc
title: This Doc Needs To Be Edited
---

My new content here..
  1. Refer to that doc's ID in an existing sidebar in website/sidebar.json:
// Add newly-created-doc to the Getting Started category of docs
{
  "docs": {
    "Getting Started": [
      "quick-start",
      "newly-created-doc" // new doc here
    ],
    ...
  },
  ...
}

For more information about adding new docs, click here

Adding a new blog/news post

  1. Make sure there is a header link to your blog in website/siteConfig.js:

website/siteConfig.js

headerLinks: [
    ...
    { blog: true, label: 'Blog' },
    ...
]
  1. Create the blog post with the format YYYY-MM-DD-My-Blog-Post-Title.md in website/blog:

website/blog/2018-05-21-New-Blog-Post.md

---
author: Frank Li
authorURL: https://twitter.com/foobarbaz
authorFBID: 503283835
title: New Blog Post
---

Lorem Ipsum...

For more information about blog posts, click here

Adding items to your site's top navigation bar

  1. Add links to docs, custom pages or external links by editing the headerLinks field of website/siteConfig.js:

website/siteConfig.js

{
  headerLinks: [
    ...
    /* you can add docs */
    { doc: 'my-examples', label: 'Examples' },
    /* you can add custom pages */
    { page: 'help', label: 'Help' },
    /* you can add external links */
    { href: 'https://github.com/facebook/docusaurus', label: 'GitHub' },
    ...
  ],
  ...
}

For more information about the navigation bar, click here

Adding custom pages

  1. Docusaurus uses React components to build pages. The components are saved as .js files in website/pages/en:
  2. If you want your page to show up in your navigation header, you will need to update website/siteConfig.js to add to the headerLinks element:

website/siteConfig.js

{
  headerLinks: [
    ...
    { page: 'my-new-custom-page', label: 'My New Custom Page' },
    ...
  ],
  ...
}

For more information about custom pages, click here.

Deploy

cd to /website/build/singa/ to serve