Commit graph

1981 commits

Author SHA1 Message Date
Endi
3048942aef fix(v2): hash-link should not be cut-off in doc container (#1942)
* fix(v2): hash-link should not be cut-off in doc container

* nits
2019-11-06 23:54:09 +08:00
Endi
baa884fe2e fix(v2): fix chokidar/watcher does not trigger reload on windows (#1943)
* fix(v2): fix chokidar/watcher does not trigger reload on windows

* nits

* nits

* stronger test
2019-11-06 23:52:40 +08:00
Pawel Kadluczka
ff83e6f8bc feat(v2): Implement plugin creating feed for blog posts (#1916)
* feat(v2): Implement feed for blog posts

Fixes: #1698

Test plan:
- added tests

Ran `yarn build` on website with the following config (and disabled blog
from preset-classic):

```js
[
'@docusaurus/plugin-content-blog',
  {
    path: '../website-1.x/blog',
    feedOptions: {
      copyright: 'Copy',
      type: 'atom',
    },
  },
],
```
which genereted the following feed:
```xml
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <id>https://v2.docusaurus.io/blog</id>
    <title>Docusaurus Blog</title>
    <updated>2018-12-14T00:00:00.000Z</updated>
    <generator>https://github.com/jpmonette/feed</generator>
    <link rel="alternate" href="https://v2.docusaurus.io/blog"/>
    <subtitle>Docusaurus Blog</subtitle>
    <icon>https://v2.docusaurus.io/img/docusaurus.ico</icon>
    <rights>Copy</rights>
    <entry>
        <title type="html"><![CDATA[Happy 1st Birthday Slash!]]></title>
        <id>Happy 1st Birthday Slash!</id>
        <link href="https://v2.docusaurus.io/blog/2018/12/14/Happy-First-Birthday-Slash"/>
        <updated>2018-12-14T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[![First Birthday Slash](/img/docusaurus-slash-first-birthday.svg)]]></summary>
    </entry>
    <entry>
        <title type="html"><![CDATA[Towards Docusaurus 2]]></title>
        <id>Towards Docusaurus 2</id>
        <link href="https://v2.docusaurus.io/blog/2018/09/11/Towards-Docusaurus-2"/>
        <updated>2018-09-11T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[Docusaurus was [officially announced](https://docusaurus.io/blog/2017/12/14/introducing-docusaurus) over nine months ago as a way to easily build open source documentation websites. Since then, it has amassed over 8,600 GitHub Stars, and is used by many popular open source projects such as [React Native](https://facebook.github.io/react-native/), [Babel](https://babeljs.io/), [Jest](https://jestjs.io/), [Reason](https://reasonml.github.io/) and [Prettier](https://prettier.io/).]]></summary>
    </entry>
    <entry>
        <title type="html"><![CDATA[How I Converted Profilo to Docusaurus in Under 2 Hours]]></title>
        <id>How I Converted Profilo to Docusaurus in Under 2 Hours</id>
        <link href="https://v2.docusaurus.io/blog/2018/04/30/How-I-Converted-Profilo-To-Docusaurus"/>
        <updated>2018-04-30T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[> _“Joel and I were discussing having a website and how it would have been great to launch with it. So I challenged myself to add Docusaurus support. It took just over an hour and a half. I'm going to send you a PR with the addition so you can take a look and see if you like it. Your workflow for adding docs wouldn't be much different from editing those markdown files.”_]]></summary>
    </entry>
    <entry>
        <title type="html"><![CDATA[Introducing Docusaurus]]></title>
        <id>Introducing Docusaurus</id>
        <link href="https://v2.docusaurus.io/blog/2017/12/14/introducing-docusaurus"/>
        <updated>2017-12-14T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[![Introducing Slash](/img/slash-introducing.svg)]]></summary>
    </entry>
</feed>
```

* new feedOptions type 'all' and use correct path
2019-11-06 14:45:31 +07:00
Alexey Pyltsyn
c507028cb0
feat(v2): add ability default lang for code blocks (#1910)
* feat(v2): add ability default lang for code blocks

* Add support for CodeBlock

* changelog

* more changelog

* Add checks

* docs

* docs

* Fix changelog

* revert config

* Update theme-classic.md

* Update packages/docusaurus-theme-classic/src/theme/CodeBlock/index.js

Co-Authored-By: Endi <endiliey@gmail.com>
2019-11-05 10:36:22 +03:00
Alexey Pyltsyn
3b9309fa87 fix(v2): fix build caused when one tab item (#1938)
* fix(v2): fix build caused when one tab item

* Use React method
2019-11-05 09:30:44 +08:00
Santiago García da Rosa
3e58062b91 feat(v2): highlight items in the table of content (#1896)
* feat(v2): highlight items in the table of content

* refactor: move string to const

* refactor(v2): Convert sitemap plugin to TypeScript (#1894)

* Convert sitemap plugin to TypeScript

Test - enabled the sitemap plugin in the v2 website and verified that
the sitemap is created after running `docusaurus build`.

* Addressing review comments

* perf(v2): significantly reduce bundle size & initial html payload (#1898)

* perf(v2): reduce bundle size significantly with super short chunk name and registry

* changelog

* use hash:8 as id for better long term caching

* even shorter filename. slice contenthash

* fix(v2): align search icon on small width device (#1893)

* fix(v2): align search icon on small width device

* nits

* nits

* refactor(v2): refactor dark toggle into a hook (#1899)

* change(v2): refactor dark toggle into a theme

* follow how themes resolve files

* let theme hook to pick up default theme by itself

* perf(v2): reduce memory usage consumption (#1900)

* misc(v1): use primary color for hovered items in table of contents (#1871)

* fix issue#1752

when element in side nav is hovered over the color changes.

* Update main.css

* fix(v1): mobile safari search input misalignment in header (#1895)

* misc(v2): v1 backward compatibility for USE_SSH env var (#1880)

* misc(v2): address comments

* misc(v2): update CHANGELOG

* feat(v2): allow line highlighting (#1860)

* feat(v2): allow line highlighting

* Refactor: use parse-numeric-range for parsing

* Add line highlighting for live code blocks

* feat(v2): add sticky footer (#1855)

* feat(v2): add sticky footer

* Update CHANGELOG-2.x.md

* Update CHANGELOG-2.x.md

* fix(v2): remove empty doc sidebar container (#1870)

* docs: showcase user Amphora (#1873)

* Add Amphora Data link to users

Adds Amphora Data to the list of users

* Add Amphora Data logo

* fix case of image path

* Move Image into users directory

* use black amphora image

* fix(v2): fix search input blur on desktop (#1874)

* docs(v2): showcase user mbt-bundle (#1875)

* feat(v2): postcss should only use stage 3 features instead of stage 2 (#1872)

* feat(v2): add ability expand all items in doc sidebar (#1876)

* feat(v2): add ability expand all items in doc sidebar

* Fix tests

* Refactor: use themeConfig

* Improve docs

* Revert unnecessary  changes

* Refactor: better consistency

* Revert extra change

* Refactor: use useDocusaurusContext to get config value

* chore(v2): update changelog

* chore(v2): update showcase and broken link

* perf(v2): disable hash for css modules localident in dev (#1882)

* perf(v2): disable hash for css modules localident in dev

* changelog

* feat(v2): display footer in docs page for consistency (#1883)

* feat(v2): display footer in docs page

* nits

* address review

* nits

* docs(v2): fix format inline code (#1888)

* docs(v2): add docs on useful client api (#1890)

* docs(v2): add docs on useful client api

* Update docusaurus-core.md

* Update website/docs/docusaurus-core.md

* Update website/docs/docusaurus-core.md

* Update website/docs/docusaurus-core.md

* Update website/docs/docusaurus-core.md

* docs(v2): update config docs (#1885)

* fix(v2): do not show categories with empty items (#1891)

* styles(v2): update infima and fix styles (#1892)

* fix(v2): wrong css class

* v2.0.0-alpha.31

* chore(v2): update docs and changelog

* docs(v2): update plugins, presets and themes docs (#1889)

* docs(v2): update plugins, presets and themes docs

* ideal image plugin

* proof reading

* Merge master

* refactor(v2): Convert sitemap plugin to TypeScript (#1894)

* Convert sitemap plugin to TypeScript

Test - enabled the sitemap plugin in the v2 website and verified that
the sitemap is created after running `docusaurus build`.

* Addressing review comments

* perf(v2): significantly reduce bundle size & initial html payload (#1898)

* perf(v2): reduce bundle size significantly with super short chunk name and registry

* changelog

* use hash:8 as id for better long term caching

* even shorter filename. slice contenthash

* fix(v2): align search icon on small width device (#1893)

* fix(v2): align search icon on small width device

* nits

* nits

* refactor(v2): refactor dark toggle into a hook (#1899)

* change(v2): refactor dark toggle into a theme

* follow how themes resolve files

* let theme hook to pick up default theme by itself

* perf(v2): reduce memory usage consumption (#1900)

* misc(v1): use primary color for hovered items in table of contents (#1871)

* fix issue#1752

when element in side nav is hovered over the color changes.

* Update main.css

* fix(v1): mobile safari search input misalignment in header (#1895)

* misc(v2): v1 backward compatibility for USE_SSH env var (#1880)

* misc(v2): address comments

* misc(v2): update CHANGELOG

* docs(v1): remove user Vasern (#1901)

* misc: update URLs to non-HTML versions (#1902)

* Update README.md - Fix Broken Link

* misc: update URLs to non-HTML versions

* misc(v2): improve index page SEO score

* fix(v2): accessing /docs or /docs/xxxx should not be empty (#1903)

* fix(v2): nested routes should have wildcard/ not found page too

* better fix

* nits

* space

* docs(v2): code block line highlighting (#1904)

* docs(v2): code block line highlighting

* misc: update CHANGELOG

* misc: respond to review

* docs: add line highlighting to the template

* fix(v2): webpack modules resolve should prioritize @docusaurus/core own deps (#1907)

* fix(v2): webpack modules resolve should prioritize own deps

* nits

* feat(v2): simplify blog metadata to minimize number of request (#1908)

* feat(v2): simplify blog metadata to minimize number of request

* remove async

* feat(v2): add ability to set custom HTML in footer items (#1905)

* docs: update configcat user link (#1911)

* fix(v2): docs plugin stability improvement (100% test coverage) (#1912)

* update jest config

* add more tests on docs plugin

* fix(v2): docs plugin should not add routes if there are no docs

* fix

* rm -rf coverage

* nits

* update

* docs(v2): add windows batch instructions for publishing to gh pages (#1914)

* docs: add windows batch instructions for publishing to gh pages

* docs: add windows batch instructions on the v2 website

* fix(v2): custom searchbar should appear even if themeconfig.algolia is undefined (#1909)

* fix(v2): custom searchbar should appear even if themeconfig.algolia is undefined

* nits

* Docs docs

* inaccuracy

* changelog

* nits

* fix(v2): missing/hidden algolia search suggestion result (#1915)

* docs(v2): Redirect component for easy redirect (#1913)

* docs(v2): Redirect component for easy redirect

* typo

* docs

* Update website/docs/docusaurus-core.md

Co-Authored-By: Alexey Pyltsyn <lex61rus@gmail.com>

* Update docusaurus-core.md

* refactor: changes after comments (use custom hooks, code changes, fix bugs)

* fix(v2): regression from prioritizing core node_modules logic (#1917)

* fix(v2): regression from prioritizing core node_modules logic

* nits

* chore: changelog

* docs(v1): showcase user Reactive Interaction Gateway (#1918)

* chore: bump dependencies

* docs(v2): fix typo in advanced plugins (#1926)

* docs(v2): fix typos (#1930)

* docs(v1): fix links in CHANGELOG (#1931)

* fix(v2): @theme/heading should not create anchor if id is not defined (#1925)

* docs(v2): theme, plugin, and preset config (#1929)

* docs(v2): theme, plugin, and preset config

* change tabs to spaces

* change theme example

* misc: use /usr/bin/env bash to increase portability (#1923)

* misc(v1): use Node.js lts version (#1920)

This is much stable and more performant

* chore: downgrade imagemin (#1933)

* fix(v2): add missing key prop in footer items with HTML (#1935)

* fix(v2): fix browser window background (#1936)

* fix(v2): allows to create tabs with only one item (#1934)

* fix(v2): allow to create tabs with only one item

It was not possible to have tabs containing only one tab item, so the code below crashed

```
<Tabs
    defaultValue="SomeFile.js"
    values={[
        { label: "SomeFile.js", value: "SomeFile.js" }
    ]}
>
<TabItem value="SomeFile.js">
    Tab content
</TabItem>
</Tabs>
```

* Update index.js

* fix(v2): remove redundant npm script in classic template (#1937)

* v2.0.0-alpha.32

* chore(v2): changelog

* misc(v2): update TOC highlight

* misc(v2): update CHANGELOG
2019-11-05 09:26:07 +08:00
endiliey
5909b49915 chore(v2): changelog 2019-11-04 12:56:10 +07:00
endiliey
cd9e2f2346 v2.0.0-alpha.32 2019-11-04 12:45:05 +07:00
Alexey Pyltsyn
0d445fce77 fix(v2): remove redundant npm script in classic template (#1937) 2019-11-04 08:55:11 +08:00
Bohdan Shulha
9c34bb7688 fix(v2): allows to create tabs with only one item (#1934)
* fix(v2): allow to create tabs with only one item

It was not possible to have tabs containing only one tab item, so the code below crashed

```
<Tabs
    defaultValue="SomeFile.js"
    values={[
        { label: "SomeFile.js", value: "SomeFile.js" }
    ]}
>
<TabItem value="SomeFile.js">
    Tab content
</TabItem>
</Tabs>
```

* Update index.js
2019-11-04 08:54:36 +08:00
Alexey Pyltsyn
146a3019fb fix(v2): fix browser window background (#1936) 2019-11-04 08:35:54 +08:00
Alexey Pyltsyn
34a84a3240 fix(v2): add missing key prop in footer items with HTML (#1935) 2019-11-04 07:55:17 +08:00
Endi
2d13fe2e0f chore: downgrade imagemin (#1933) 2019-11-03 23:20:47 +08:00
Jiawen Geng
33718b6f8f misc(v1): use Node.js lts version (#1920)
This is much stable and more performant
2019-11-03 22:57:51 +08:00
Marc Jansen
82ece517f6 misc: use /usr/bin/env bash to increase portability (#1923) 2019-11-03 22:29:16 +08:00
Kate Bartolo
3f8cb78ba9 docs(v2): theme, plugin, and preset config (#1929)
* docs(v2): theme, plugin, and preset config

* change tabs to spaces

* change theme example
2019-11-03 17:59:39 +08:00
Endi
c41c19e10c
fix(v2): @theme/heading should not create anchor if id is not defined (#1925) 2019-11-02 17:40:51 +07:00
Glen Winters
0baaad3365 docs(v1): fix links in CHANGELOG (#1931) 2019-11-02 08:12:52 +08:00
Alexey Pyltsyn
b8335fe925 docs(v2): fix typos (#1930) 2019-11-02 08:12:04 +08:00
Joel Ibaceta
472c8fc176 docs(v2): fix typo in advanced plugins (#1926) 2019-11-01 08:54:41 +08:00
endiliey
ab1520548d chore: bump dependencies 2019-11-01 01:25:10 +07:00
Mario Macai
255584cf65 docs(v1): showcase user Reactive Interaction Gateway (#1918) 2019-10-31 06:13:26 +08:00
endiliey
c7ff07cf31 chore: changelog 2019-10-30 13:48:14 +07:00
Endi
ca4efb6428
fix(v2): regression from prioritizing core node_modules logic (#1917)
* fix(v2): regression from prioritizing core node_modules logic

* nits
2019-10-30 13:02:05 +07:00
Endi
16f10dd32a
docs(v2): Redirect component for easy redirect (#1913)
* docs(v2): Redirect component for easy redirect

* typo

* docs

* Update website/docs/docusaurus-core.md

Co-Authored-By: Alexey Pyltsyn <lex61rus@gmail.com>

* Update docusaurus-core.md
2019-10-30 10:19:30 +07:00
Endi
6fcee6dde4 fix(v2): missing/hidden algolia search suggestion result (#1915) 2019-10-30 08:52:36 +08:00
Endi
64871b76e4 fix(v2): custom searchbar should appear even if themeconfig.algolia is undefined (#1909)
* fix(v2): custom searchbar should appear even if themeconfig.algolia is undefined

* nits

* Docs docs

* inaccuracy

* changelog

* nits
2019-10-30 08:51:53 +08:00
Dylan Myers
f853171791 docs(v2): add windows batch instructions for publishing to gh pages (#1914)
* docs: add windows batch instructions for publishing to gh pages

* docs: add windows batch instructions on the v2 website
2019-10-29 23:49:01 +07:00
Endi
a8826b98b3 fix(v2): docs plugin stability improvement (100% test coverage) (#1912)
* update jest config

* add more tests on docs plugin

* fix(v2): docs plugin should not add routes if there are no docs

* fix

* rm -rf coverage

* nits

* update
2019-10-29 23:59:27 +08:00
sige
ad22c9fab4 docs: update configcat user link (#1911) 2019-10-29 21:41:38 +07:00
Alexey Pyltsyn
31d17c9d6b feat(v2): add ability to set custom HTML in footer items (#1905) 2019-10-29 16:57:10 +07:00
Endi
2e58e839ee
feat(v2): simplify blog metadata to minimize number of request (#1908)
* feat(v2): simplify blog metadata to minimize number of request

* remove async
2019-10-29 14:50:54 +07:00
Endi
e6444c0d4d
fix(v2): webpack modules resolve should prioritize @docusaurus/core own deps (#1907)
* fix(v2): webpack modules resolve should prioritize own deps

* nits
2019-10-29 14:43:27 +07:00
Yangshun Tay
f635f9aba2
docs(v2): code block line highlighting (#1904)
* docs(v2): code block line highlighting

* misc: update CHANGELOG

* misc: respond to review

* docs: add line highlighting to the template
2019-10-29 14:59:24 +08:00
Endi
7714afb00f fix(v2): accessing /docs or /docs/xxxx should not be empty (#1903)
* fix(v2): nested routes should have wildcard/ not found page too

* better fix

* nits

* space
2019-10-29 02:37:30 +08:00
Yangshun Tay
b6667a072c misc(v2): improve index page SEO score 2019-10-29 00:06:39 +08:00
Agus Fikri Suyuthi
3f4c805016 misc: update URLs to non-HTML versions (#1902)
* Update README.md - Fix Broken Link

* misc: update URLs to non-HTML versions
2019-10-27 20:06:11 -07:00
Agus Fikri Suyuthi
3172602201 docs(v1): remove user Vasern (#1901) 2019-10-27 19:09:14 -07:00
Alexey Pyltsyn
9c69dfd240 feat(v2): allow line highlighting (#1860)
* feat(v2): allow line highlighting

* Refactor: use parse-numeric-range for parsing

* Add line highlighting for live code blocks

* feat(v2): add sticky footer (#1855)

* feat(v2): add sticky footer

* Update CHANGELOG-2.x.md

* Update CHANGELOG-2.x.md

* fix(v2): remove empty doc sidebar container (#1870)

* docs: showcase user Amphora (#1873)

* Add Amphora Data link to users

Adds Amphora Data to the list of users

* Add Amphora Data logo

* fix case of image path

* Move Image into users directory

* use black amphora image

* fix(v2): fix search input blur on desktop (#1874)

* docs(v2): showcase user mbt-bundle (#1875)

* feat(v2): postcss should only use stage 3 features instead of stage 2 (#1872)

* feat(v2): add ability expand all items in doc sidebar (#1876)

* feat(v2): add ability expand all items in doc sidebar

* Fix tests

* Refactor: use themeConfig

* Improve docs

* Revert unnecessary  changes

* Refactor: better consistency

* Revert extra change

* Refactor: use useDocusaurusContext to get config value

* chore(v2): update changelog

* chore(v2): update showcase and broken link

* perf(v2): disable hash for css modules localident in dev (#1882)

* perf(v2): disable hash for css modules localident in dev

* changelog

* feat(v2): display footer in docs page for consistency (#1883)

* feat(v2): display footer in docs page

* nits

* address review

* nits

* docs(v2): fix format inline code (#1888)

* docs(v2): add docs on useful client api (#1890)

* docs(v2): add docs on useful client api

* Update docusaurus-core.md

* Update website/docs/docusaurus-core.md

* Update website/docs/docusaurus-core.md

* Update website/docs/docusaurus-core.md

* Update website/docs/docusaurus-core.md

* docs(v2): update config docs (#1885)

* fix(v2): do not show categories with empty items (#1891)

* styles(v2): update infima and fix styles (#1892)

* fix(v2): wrong css class

* v2.0.0-alpha.31

* chore(v2): update docs and changelog

* docs(v2): update plugins, presets and themes docs (#1889)

* docs(v2): update plugins, presets and themes docs

* ideal image plugin

* proof reading

* Merge master

* refactor(v2): Convert sitemap plugin to TypeScript (#1894)

* Convert sitemap plugin to TypeScript

Test - enabled the sitemap plugin in the v2 website and verified that
the sitemap is created after running `docusaurus build`.

* Addressing review comments

* perf(v2): significantly reduce bundle size & initial html payload (#1898)

* perf(v2): reduce bundle size significantly with super short chunk name and registry

* changelog

* use hash:8 as id for better long term caching

* even shorter filename. slice contenthash

* fix(v2): align search icon on small width device (#1893)

* fix(v2): align search icon on small width device

* nits

* nits

* refactor(v2): refactor dark toggle into a hook (#1899)

* change(v2): refactor dark toggle into a theme

* follow how themes resolve files

* let theme hook to pick up default theme by itself

* perf(v2): reduce memory usage consumption (#1900)

* misc(v1): use primary color for hovered items in table of contents (#1871)

* fix issue#1752

when element in side nav is hovered over the color changes.

* Update main.css

* fix(v1): mobile safari search input misalignment in header (#1895)

* misc(v2): v1 backward compatibility for USE_SSH env var (#1880)

* misc(v2): address comments

* misc(v2): update CHANGELOG
2019-10-27 15:19:28 -07:00
Yunus Rahbar
812a30be57 misc(v2): v1 backward compatibility for USE_SSH env var (#1880)
* misc(v2): address comments

* misc(v2): update CHANGELOG
2019-10-27 14:36:45 -07:00
Jacob Sarnowski
421598eb65 fix(v1): mobile safari search input misalignment in header (#1895) 2019-10-27 13:19:52 -07:00
blitz137
f14b6eee39 misc(v1): use primary color for hovered items in table of contents (#1871)
* fix issue#1752

when element in side nav is hovered over the color changes.

* Update main.css
2019-10-27 13:17:30 -07:00
Endi
98679b58f8 perf(v2): reduce memory usage consumption (#1900) 2019-10-27 13:10:51 -07:00
Wei Gao
01f4d9a955 refactor(v2): refactor dark toggle into a hook (#1899)
* change(v2): refactor dark toggle into a theme

* follow how themes resolve files

* let theme hook to pick up default theme by itself
2019-10-27 13:02:59 -07:00
Endi
84462e218e fix(v2): align search icon on small width device (#1893)
* fix(v2): align search icon on small width device

* nits

* nits
2019-10-27 07:11:09 -07:00
Endi
fabaf7772b perf(v2): significantly reduce bundle size & initial html payload (#1898)
* perf(v2): reduce bundle size significantly with super short chunk name and registry

* changelog

* use hash:8 as id for better long term caching

* even shorter filename. slice contenthash
2019-10-27 07:09:19 -07:00
Pawel Kadluczka
c23f981f67 refactor(v2): Convert sitemap plugin to TypeScript (#1894)
* Convert sitemap plugin to TypeScript

Test - enabled the sitemap plugin in the v2 website and verified that
the sitemap is created after running `docusaurus build`.

* Addressing review comments
2019-10-27 14:44:53 +07:00
Endi
2bbfbf88d6
docs(v2): update plugins, presets and themes docs (#1889)
* docs(v2): update plugins, presets and themes docs

* ideal image plugin

* proof reading

* Merge master
2019-10-26 15:10:48 +07:00
endiliey
242c9e0c29 chore(v2): update docs and changelog 2019-10-26 14:16:04 +07:00
endiliey
d4342dcbf3 v2.0.0-alpha.31 2019-10-26 14:12:15 +07:00