Skip to content

Commit

Permalink
docs(v2): nudge users to add site to showcase (#3977)
Browse files Browse the repository at this point in the history
- Add a "Add your site!" button
- Add instructions to add a Docusaurus site to showcase
- ignore prettier formatting errors (as edits are often done through Github interface)
  • Loading branch information
slorber authored Dec 30, 2020
1 parent d99d53a commit cf086ab
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
21 changes: 20 additions & 1 deletion website/src/data/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,27 @@
* LICENSE file in the root directory of this source tree.
*/

/*
* ADD YOUR SITE TO DOCUSAURUS SHOWCASE:
*
* Instructions
* - add your site in the json array below, in alphabetical order of title
* - add a local image preview (decent screenshot of your Docusaurus site)
*
* The image must be added to the Github repository, and use require("image")
*
* Example PR: https://github.com/facebook/docusaurus/pull/3976
*
* If you edit this file through the Github interface, you can:
* - Submit first your users.js edit PR
* - This will create a branch on your Docusaurus fork (usually "patch-1")
* - Go to https://github.com/<username>/docusaurus/tree/<branch>/website/src/data/showcase
* - Drag-and-drop an image here to add it to your existing PR
*
*/

// prettier-ignore
const users = [
// Please add in alphabetical order of title.
{
title: 'AI-Speaker',
description: 'Local, reliable, fast and private Audio and IoT gate.',
Expand Down
10 changes: 10 additions & 0 deletions website/src/pages/showcase/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ import users from '../../data/users';
const TITLE = 'Showcase';
const DESCRIPTION =
'See the awesome websites people are building with Docusaurus';
const EDIT_URL =
'https://github.com/facebook/docusaurus/edit/master/website/src/data/users.js';

function Showcase() {
return (
Expand All @@ -25,6 +27,14 @@ function Showcase() {
<div className="text--center margin-bottom--xl">
<h1>{TITLE}</h1>
<p>{DESCRIPTION}</p>
<p>
<a
className={'button button--primary'}
href={EDIT_URL}
target={'_blank'}>
Add your site!
</a>
</p>
</div>
<div className="row">
{users.map((user) => (
Expand Down

0 comments on commit cf086ab

Please sign in to comment.