Docusaurus: Improve SEO

Created on 10 Jan 2018  路  4Comments  路  Source: facebook/docusaurus

Is this a bug report?

enhancement.

Have you read the Contributing Guidelines?

馃憤

Issue

Google search results for Prettier could do with some improvement.

Short listing

image

Long listing (Requires searching for "prettier.io")

image

I'm not an expert on SEO, but I think there should be an option to set:

  • <meta name="description" content="...">
  • Sitemap (maybe using https://github.com/algolia/algolia-sitemap?)

Reproducible Demo

Search: https://google.com/search?q=prettier.io
Repo: https://github.com/prettier/prettier
Site: https://prettier.io

starter feature claimed

Most helpful comment

let num = Math.floor (Math.random() * 1E+7).toString().replace ...

That鈥檚 definitely not what we鈥檙e looking for to describe the playground.

All 4 comments

let num = Math.floor (Math.random() * 1E+7).toString().replace ...

That鈥檚 definitely not what we鈥檙e looking for to describe the playground.

Ok, I am convinced that we need to do a bit better given the random code snippet for the playground 馃槃

I'll work on this with @jason-maier. He's new to Docusaurus, but has some SEO experience from his past career!

I think this has been fixed 馃槃

You can set your own description meta
<meta name="description" content="...">

Refer to https://docusaurus.io/docs/en/api-pages#description-for-pages

Example:

// pages/index.js

const React = require('react');

class Index extends React.Component {
  render() {
    // ... your rendering code
  }
}

Index.description = 'Endilie is an undergraduate student at Nanyang Technological University (2019). He likes to write & code in his free time';
module.exports = Index;

Google's result:

google-test

I'm closing this. Feel free to re-open / create a new issue if needed

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cheercroaker picture cheercroaker  路  3Comments

microbouji picture microbouji  路  3Comments

lex111 picture lex111  路  3Comments

endiliey picture endiliey  路  3Comments

JoelMarcey picture JoelMarcey  路  3Comments