From 59f8af578a9e00c0dd7a16c78aabee852432537b Mon Sep 17 00:00:00 2001 From: Chris Salzberg Date: Mon, 21 Dec 2020 15:31:02 +0900 Subject: [PATCH] Make some real pages --- website/docs/backends.md | 4 + website/docs/column.md | 4 + website/docs/configuration.md | 4 + website/docs/dirty_tracking.md | 4 + website/docs/doc1.md | 203 ------------------------- website/docs/doc2.md | 6 - website/docs/doc3.md | 14 -- website/docs/fallbacks.md | 4 + website/docs/fallthrough_accessors.md | 4 + website/docs/getting_started.md | 4 + website/docs/installation.md | 4 + website/docs/intro.md | 5 + website/docs/json.md | 4 + website/docs/key_value.md | 4 + website/docs/locale_accessors.md | 4 + website/docs/plugins.md | 4 + website/docs/table.md | 4 + website/docs/upgrading_to_version_1.md | 5 + website/docusaurus.config.js | 8 +- website/sidebars.js | 6 +- website/src/css/custom.css | 8 + website/src/pages/index.js | 4 +- 22 files changed, 78 insertions(+), 233 deletions(-) create mode 100644 website/docs/backends.md create mode 100644 website/docs/column.md create mode 100644 website/docs/configuration.md create mode 100644 website/docs/dirty_tracking.md delete mode 100644 website/docs/doc1.md delete mode 100644 website/docs/doc2.md delete mode 100644 website/docs/doc3.md create mode 100644 website/docs/fallbacks.md create mode 100644 website/docs/fallthrough_accessors.md create mode 100644 website/docs/getting_started.md create mode 100644 website/docs/installation.md create mode 100644 website/docs/intro.md create mode 100644 website/docs/json.md create mode 100644 website/docs/key_value.md create mode 100644 website/docs/locale_accessors.md create mode 100644 website/docs/plugins.md create mode 100644 website/docs/table.md create mode 100644 website/docs/upgrading_to_version_1.md diff --git a/website/docs/backends.md b/website/docs/backends.md new file mode 100644 index 000000000..5cff642e5 --- /dev/null +++ b/website/docs/backends.md @@ -0,0 +1,4 @@ +--- +id: backends +title: Backends +--- diff --git a/website/docs/column.md b/website/docs/column.md new file mode 100644 index 000000000..5890b9642 --- /dev/null +++ b/website/docs/column.md @@ -0,0 +1,4 @@ +--- +id: column +title: Column Backend +--- diff --git a/website/docs/configuration.md b/website/docs/configuration.md new file mode 100644 index 000000000..0487930f5 --- /dev/null +++ b/website/docs/configuration.md @@ -0,0 +1,4 @@ +--- +id: configuration +title: Configuration +--- diff --git a/website/docs/dirty_tracking.md b/website/docs/dirty_tracking.md new file mode 100644 index 000000000..2ce5e2656 --- /dev/null +++ b/website/docs/dirty_tracking.md @@ -0,0 +1,4 @@ +--- +id: dirty_tracking +title: Dirty Tracking +--- diff --git a/website/docs/doc1.md b/website/docs/doc1.md deleted file mode 100644 index 28286ecc7..000000000 --- a/website/docs/doc1.md +++ /dev/null @@ -1,203 +0,0 @@ ---- -id: doc1 -title: Style Guide -sidebar_label: Style Guide -slug: / ---- - -You can write content using [GitHub-flavored Markdown syntax](https://github.github.com/gfm/). - -## Markdown Syntax - -To serve as an example page when styling markdown based Docusaurus sites. - -## Headers - -# H1 - Create the best documentation - -## H2 - Create the best documentation - -### H3 - Create the best documentation - -#### H4 - Create the best documentation - -##### H5 - Create the best documentation - -###### H6 - Create the best documentation - ---- - -## Emphasis - -Emphasis, aka italics, with *asterisks* or _underscores_. - -Strong emphasis, aka bold, with **asterisks** or __underscores__. - -Combined emphasis with **asterisks and _underscores_**. - -Strikethrough uses two tildes. ~~Scratch this.~~ - ---- - -## Lists - -1. First ordered list item -1. Another item - - Unordered sub-list. -1. Actual numbers don't matter, just that it's a number - 1. Ordered sub-list -1. And another item. - -* Unordered list can use asterisks - -- Or minuses - -+ Or pluses - ---- - -## Links - -[I'm an inline-style link](https://www.google.com/) - -[I'm an inline-style link with title](https://www.google.com/ "Google's Homepage") - -[I'm a reference-style link][arbitrary case-insensitive reference text] - -[You can use numbers for reference-style link definitions][1] - -Or leave it empty and use the [link text itself]. - -URLs and URLs in angle brackets will automatically get turned into links. http://www.example.com/ or and sometimes example.com (but not on GitHub, for example). - -Some text to show that the reference links can follow later. - -[arbitrary case-insensitive reference text]: https://www.mozilla.org/ -[1]: http://slashdot.org/ -[link text itself]: http://www.reddit.com/ - ---- - -## Images - -Here's our logo (hover to see the title text): - -Inline-style: ![alt text](https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png 'Logo Title Text 1') - -Reference-style: ![alt text][logo] - -[logo]: https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png 'Logo Title Text 2' - -Images from any folder can be used by providing path to file. Path should be relative to markdown file. - -![img](../static/img/logo.svg) - ---- - -## Code - -```javascript -var s = 'JavaScript syntax highlighting'; -alert(s); -``` - -```python -s = "Python syntax highlighting" -print(s) -``` - -``` -No language indicated, so no syntax highlighting. -But let's throw in a tag. -``` - -```js {2} -function highlightMe() { - console.log('This line can be highlighted!'); -} -``` - ---- - -## Tables - -Colons can be used to align columns. - -| Tables | Are | Cool | -| ------------- | :-----------: | -----: | -| col 3 is | right-aligned | \$1600 | -| col 2 is | centered | \$12 | -| zebra stripes | are neat | \$1 | - -There must be at least 3 dashes separating each header cell. The outer pipes (|) are optional, and you don't need to make the raw Markdown line up prettily. You can also use inline Markdown. - -| Markdown | Less | Pretty | -| -------- | --------- | ---------- | -| _Still_ | `renders` | **nicely** | -| 1 | 2 | 3 | - ---- - -## Blockquotes - -> Blockquotes are very handy in email to emulate reply text. This line is part of the same quote. - -Quote break. - -> This is a very long line that will still be quoted properly when it wraps. Oh boy let's keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can _put_ **Markdown** into a blockquote. - ---- - -## Inline HTML - -
-
Definition list
-
Is something people use sometimes.
- -
Markdown in HTML
-
Does *not* work **very** well. Use HTML tags.
-
- ---- - -## Line Breaks - -Here's a line for us to start with. - -This line is separated from the one above by two newlines, so it will be a _separate paragraph_. - -This line is also a separate paragraph, but... This line is only separated by a single newline, so it's a separate line in the _same paragraph_. - ---- - -## Admonitions - -:::note - -This is a note - -::: - -:::tip - -This is a tip - -::: - -:::important - -This is important - -::: - -:::caution - -This is a caution - -::: - -:::warning - -This is a warning - -::: diff --git a/website/docs/doc2.md b/website/docs/doc2.md deleted file mode 100644 index 16cfce408..000000000 --- a/website/docs/doc2.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -id: doc2 -title: Document Number 2 ---- - -This is a link to [another document.](doc3.md) This is a link to an [external page.](http://www.example.com/) diff --git a/website/docs/doc3.md b/website/docs/doc3.md deleted file mode 100644 index 2c40cc680..000000000 --- a/website/docs/doc3.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -id: doc3 -title: This is Document Number 3 ---- - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. In ac euismod odio, eu consequat dui. Nullam molestie consectetur risus id imperdiet. Proin sodales ornare turpis, non mollis massa ultricies id. Nam at nibh scelerisque, feugiat ante non, dapibus tortor. Vivamus volutpat diam quis tellus elementum bibendum. Praesent semper gravida velit quis aliquam. Etiam in cursus neque. Nam lectus ligula, malesuada et mauris a, bibendum faucibus mi. Phasellus ut interdum felis. Phasellus in odio pulvinar, porttitor urna eget, fringilla lectus. Aliquam sollicitudin est eros. Mauris consectetur quam vitae mauris interdum hendrerit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. - -Duis et egestas libero, imperdiet faucibus ipsum. Sed posuere eget urna vel feugiat. Vivamus a arcu sagittis, fermentum urna dapibus, congue lectus. Fusce vulputate porttitor nisl, ac cursus elit volutpat vitae. Nullam vitae ipsum egestas, convallis quam non, porta nibh. Morbi gravida erat nec neque bibendum, eu pellentesque velit posuere. Fusce aliquam erat eu massa eleifend tristique. - -Sed consequat sollicitudin ipsum eget tempus. Integer a aliquet velit. In justo nibh, pellentesque non suscipit eget, gravida vel lacus. Donec odio ante, malesuada in massa quis, pharetra tristique ligula. Donec eros est, tristique eget finibus quis, semper non nisl. Vivamus et elit nec enim ornare placerat. Sed posuere odio a elit cursus sagittis. - -Phasellus feugiat purus eu tortor ultrices finibus. Ut libero nibh, lobortis et libero nec, dapibus posuere eros. Sed sagittis euismod justo at consectetur. Nulla finibus libero placerat, cursus sapien at, eleifend ligula. Vivamus elit nisl, hendrerit ac nibh eu, ultrices tempus dui. Nam tellus neque, commodo non rhoncus eu, gravida in risus. Nullam id iaculis tortor. - -Nullam at odio in sem varius tempor sit amet vel lorem. Etiam eu hendrerit nisl. Fusce nibh mauris, vulputate sit amet ex vitae, congue rhoncus nisl. Sed eget tellus purus. Nullam tempus commodo erat ut tristique. Cras accumsan massa sit amet justo consequat eleifend. Integer scelerisque vitae tellus id consectetur. diff --git a/website/docs/fallbacks.md b/website/docs/fallbacks.md new file mode 100644 index 000000000..d1954ebed --- /dev/null +++ b/website/docs/fallbacks.md @@ -0,0 +1,4 @@ +--- +id: fallbacks +title: Fallbacks +--- diff --git a/website/docs/fallthrough_accessors.md b/website/docs/fallthrough_accessors.md new file mode 100644 index 000000000..6923534b5 --- /dev/null +++ b/website/docs/fallthrough_accessors.md @@ -0,0 +1,4 @@ +--- +id: fallthrough_accessors +title: Fallthrough Accessors +--- diff --git a/website/docs/getting_started.md b/website/docs/getting_started.md new file mode 100644 index 000000000..6d2b9a1d2 --- /dev/null +++ b/website/docs/getting_started.md @@ -0,0 +1,4 @@ +--- +id: getting_started +title: Getting Started +--- diff --git a/website/docs/installation.md b/website/docs/installation.md new file mode 100644 index 000000000..2c4356391 --- /dev/null +++ b/website/docs/installation.md @@ -0,0 +1,4 @@ +--- +id: installation +title: Installation +--- diff --git a/website/docs/intro.md b/website/docs/intro.md new file mode 100644 index 000000000..fee29f5df --- /dev/null +++ b/website/docs/intro.md @@ -0,0 +1,5 @@ +--- +id: intro +title: Introduction +slug: / +--- diff --git a/website/docs/json.md b/website/docs/json.md new file mode 100644 index 000000000..6cba039db --- /dev/null +++ b/website/docs/json.md @@ -0,0 +1,4 @@ +--- +id: json +title: JSON/JSONB Backends +--- diff --git a/website/docs/key_value.md b/website/docs/key_value.md new file mode 100644 index 000000000..d173e630e --- /dev/null +++ b/website/docs/key_value.md @@ -0,0 +1,4 @@ +--- +id: key_value +title: KeyValue Backend +--- diff --git a/website/docs/locale_accessors.md b/website/docs/locale_accessors.md new file mode 100644 index 000000000..d235da305 --- /dev/null +++ b/website/docs/locale_accessors.md @@ -0,0 +1,4 @@ +--- +id: locale_accessors +title: Locale Accessors +--- diff --git a/website/docs/plugins.md b/website/docs/plugins.md new file mode 100644 index 000000000..cd6af7748 --- /dev/null +++ b/website/docs/plugins.md @@ -0,0 +1,4 @@ +--- +id: plugins +title: Plugins +--- diff --git a/website/docs/table.md b/website/docs/table.md new file mode 100644 index 000000000..e5d556ab7 --- /dev/null +++ b/website/docs/table.md @@ -0,0 +1,4 @@ +--- +id: table +title: Table Backend +--- diff --git a/website/docs/upgrading_to_version_1.md b/website/docs/upgrading_to_version_1.md new file mode 100644 index 000000000..5842fd4a3 --- /dev/null +++ b/website/docs/upgrading_to_version_1.md @@ -0,0 +1,5 @@ +--- +id: upgrading_to_version_1 +title: Upgrading to 1.0 +slug: /upgrading-to-version-1 +--- diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index f5a19befc..6760eea45 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -33,12 +33,8 @@ module.exports = { title: 'Docs', items: [ { - label: 'Style Guide', - to: 'docs/', - }, - { - label: 'Second Doc', - to: 'docs/doc2/', + label: 'Getting Started', + to: 'docs/getting-started', }, ], }, diff --git a/website/sidebars.js b/website/sidebars.js index 8765a2edf..60cbe55f7 100644 --- a/website/sidebars.js +++ b/website/sidebars.js @@ -1,6 +1,8 @@ module.exports = { someSidebar: { - Docusaurus: ['doc1', 'doc2', 'doc3'], - Features: ['mdx'], + 'Getting Started': ['intro', 'installation', 'configuration', 'upgrading_to_version_1'], + Design: ['plugins', 'backends'], + Backends: ['key_value', 'table', 'column', 'json'], + Plugins: ['locale_accessors', 'fallthrough_accessors', 'dirty_tracking', 'fallbacks'], }, }; diff --git a/website/src/css/custom.css b/website/src/css/custom.css index 284c9750a..8fe959646 100644 --- a/website/src/css/custom.css +++ b/website/src/css/custom.css @@ -45,3 +45,11 @@ h2 { section { margin-bottom: 50px; } + +.hero { + padding-bottom: 1.5rem; +} + +.main-wrapper { + margin-bottom: 2rem; +} diff --git a/website/src/pages/index.js b/website/src/pages/index.js index 5929240a0..1c85ac1e9 100644 --- a/website/src/pages/index.js +++ b/website/src/pages/index.js @@ -131,7 +131,7 @@ function Hero() { const context = useDocusaurusContext(); const { siteConfig = {} } = context; return ( -
+

{siteConfig.title}

{siteConfig.tagline}

@@ -140,7 +140,7 @@ function Hero() { 'button button--outline button--primary button--lg', styles.getStarted, )} - to={useBaseUrl('docs/getting-started')}> + to={useBaseUrl('docs/installation')}> Get Started