Commit graph

564 commits

Author SHA1 Message Date
Endi
d6143868a4 fix(v2): toc should not be broken for heading with html inline code (#2067) 2019-11-28 21:33:51 -08:00
Endi
05a2f46a9b
chore(v2): bump deps and run yarn upgrade (#2044) 2019-11-24 23:06:25 +07:00
Endi
9862a6821a feat(v2): allow non sidebar category to be first item of sidebar (#2032)
* feat(v2): allow non sidebar category to be first item of sidebar

* better error messages

* edit the react component

* Update website/docs/sidebar.md

* nits

* add @babel/plugin-transform-runtime
2019-11-23 20:08:19 -08:00
Endi
baabe1fdf9 perf(v2): use @babel/runtime plugin to reduce codesize (#2035) 2019-11-23 17:50:11 -08:00
Endi
2d15fadf16
chore(v2): bump deps and remove unused deps (#2029)
* chore(v2): deps bump

* remove unused deps
2019-11-22 17:55:22 +07:00
Endi
bd68dce667
fix(v1): markdown content and toc should render the same (#2022)
* fix(v1): autogenerated_toc and sidebar toc should render the same

* revert test docs

* yarn.lock
2019-11-21 12:04:07 +07:00
Endi
088606653d
chore: bump & remove unused deps (#2015) 2019-11-19 16:04:23 +07:00
Endi
cf4037ef91
chore(v2): update dependencies (#1985)
* chore(v2): update dependencies

* use forked ideal image deps. omgg
2019-11-13 23:04:13 +07:00
Endi
3be2e86546
chore: bump dev dependencies (#1955)
* chore: bump devdeps

* upd infima url
2019-11-11 17:44:26 +07:00
Endi
58751b4e1a chore(v2): add lerna-changelog (#1952) 2019-11-09 00:58:56 +08:00
Endi
639d8d3eac
perf(v2): skip runtime fileHash cache in prod & get timestamp asynchronously (#1951)
* skip hash calculation in prod when generating file

* perf: convert lastUpdated to be async process

* changelog
2019-11-08 23:35:39 +07:00
Endi
384e83a737
chore(v2): upgrade deps (#1945)
* chore(v2): upgrade dependencies

* revert TS 3.7 optional chaining
2019-11-07 13:32:55 +07: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
Endi
2d13fe2e0f chore: downgrade imagemin (#1933) 2019-11-03 23:20:47 +08:00
endiliey
ab1520548d chore: bump dependencies 2019-11-01 01:25:10 +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
Endi
98679b58f8 perf(v2): reduce memory usage consumption (#1900) 2019-10-27 13:10:51 -07:00
Endi
9fdda55672 styles(v2): update infima and fix styles (#1892) 2019-10-25 22:06:06 -07:00
Endi
4c4e6ad773
fix(v2): fix babel transpilation include/exclude logic (#1868)
* fix(v2): fix babel transpilation include/exclude logic

* nits

* optimize

* docs migration before alpha.30 hotfix
2019-10-22 12:17:00 +07:00
endiliey
7febe9ef94 chore(v2): bump core-js version 2019-10-21 19:26:47 +07:00
Endi
484526443e
fix(v2): fix missing deps and wrong babel config (#1867)
* fix(v2): fix missing deps and wrong babel config

* nits
2019-10-21 18:40:55 +07:00
Endi
e5bb7c2ab8
feat(v2): new ui progress bar (#1866) 2019-10-21 18:32:23 +07:00
Endi
1844c2bdd6
chore(v2): upgrade dependencies (#1865)
* chore(v2): upgrade dependencies

* nits
2019-10-21 12:25:30 +07:00
Endi
d96b5f99b9 fix(v2): swizzle should receive correct load context (#1844)
* fix(v2): swizzle should receive correct load context

* new prettier version

* niits
2019-10-16 08:56:09 -07:00
Endi
bdb129252c
perf(v2): fork clean-webpack-plugin to reduce memory (#1839)
* chore: fork clean-webpack-plugin

* deps
2019-10-14 19:37:50 +07:00
Endi
1dddb1f5ea
chore(v2): upgrade core dependency (#1837) 2019-10-14 15:33:10 +07:00
Endi
48db8b8e09
refactor(v2): simplify & faster last updated logic for docs (#1832)
* refactor(v2): simplify last updated logic for faster dev

* Update packages/docusaurus-plugin-content-docs/src/__tests__/lastUpdate.test.ts

* Update packages/docusaurus-plugin-content-docs/src/__tests__/lastUpdate.test.ts
2019-10-12 10:30:22 +08:00
Yangshun Tay
1c5a6ee244
misc(v2): make playground nicer (#1819)
* misc(v2): make code block nicer

* misc(v2): update changelog for code + playground

* misc(v2): update playground docs
2019-10-10 15:12:17 -07:00
Endi
1591128cdd
refactor(v2): add typing for docs plugin (#1811)
* refactor(v2): add typing for docs plugin

* nits
2019-10-07 18:28:33 +07:00
endiliey
9806b44a6d chore: fix expired discord invite link 2019-09-25 17:05:54 +07:00
Endi
0397f7b719
chore(v2): upgrade babel, webpack, and mdx (#1798)
* chore: upgrade babel, webpack, and mdx

* changelog
2019-09-24 18:55:07 +08:00
Yangshun Tay
4d76d58e4b
chore(v1): upgrade deps (#1787) 2019-09-15 21:27:22 -07:00
Emelia Smith
250a818e7f feat(v1): strip html from TOC (#1762)
The approach here is to first strip the HTML from the heading's content, then rendered it with markdown to get the HTML content for the TOC entry, then to strip the HTML from the rendered content again, as to get the text for the TOC entry's link.

Adds an additional dependency of striptags (MIT licensed)

Example TOC Entry, given the heading of:

```markdown
```

```javascript
{
  hashLink: 'foo',
  rawContent: '<a name="foo"></a> _Foo_',
  content: '<em>Foo</em>',
  children: []
}
```

Previously this TOC entry would be:

```javascript
{
  hashLink: 'a-name-foo-a-_foo_',
  rawContent: '<a name="foo"></a> _Foo_',
  content: '&lt;a name=&quot;foo&quot;&gt;&lt;/a&gt; <em>Foo</em>',
  children: []
}
```

closes issue #1703
2019-09-13 14:57:22 -07:00
Endi
ca3ae5ea96
chore: upgrade deps (#1733) 2019-08-01 19:14:12 +07:00
Endi
7ce6edc1b1
feat(v2): disable optimization.removeAvailableModules for webpack performance (#1711) 2019-07-26 22:42:03 +07:00
Endi
1c59b5bc1c
chore(v2): upgrade deps and add missing docs on docusaurus config (#1693)
* chore(v2): upgrade deps and add missing docs on docusaurus config

* review
2019-07-23 23:06:15 +07:00
Endi
55ef751f26 feat(v2): use contenthash instead of chunkhash for longterm caching (#1686)
* feat(v2): use contenthash instead of chunkhash for longterm caching

* changelog
2019-07-21 10:11:39 -07:00
Endi
1f0f3e130b
feat(v2): ️ faster and lighter bundle size (optimization) (#1681)
* feat(v2):️  fasterr and lighter bundle size optimization

* lint

* nits
2019-07-20 16:55:24 +07:00
Endi
7f5c1ef581
refactor(v2): use forked lqip-loader for performance (#1680) 2019-07-20 15:23:01 +07:00
Endi
2d6aaea069 feat(v2): allow custom syntax highlighting theme (#1674) 2019-07-18 11:19:00 -07:00
Endi
0daed4abec feat(v2): optimize dev by omiting production only plugins (#1673) 2019-07-18 11:18:03 -07:00
Endi
96d6369985
chore(v1.v2): upgrade a lot of packages deps (#1668)
* chore(v2): upgrade a lot of v2 packages deps

* chore(v1): upgrade a lot of v1 packages deps
2019-07-17 22:59:13 +07:00
Endi
b34ad721e4
feat(v2): @docusaurus/plugin-ideal-image (#1665)
* chore(v2): tweak image opt before moving to docusaurus-plugin-image

* lint

* feat(v2): convert to docusaurus-plugin-ideal-image

* tweak

* dont need many img

* fix dev err

* tweak

* opt png

* lower qual
2019-07-17 21:53:40 +08:00
Endi
bc5bceeb87 feat(v2): optimize image processing with sharp & lqip (#1663)
* feat(v2): optimize image processing

* cleanup
2019-07-14 11:28:16 -07:00
Endi
d61cc01217
feat(v2): @docusaurus/init package (#1655)
* feat(v2): separate v2 docusaurus/init package

* nits

* docs

* rm unwanted

* readme
2019-07-14 01:06:23 +07:00
Endi
22ce04d3fb feat(v2): better splitchunks and babel default (#1653)
* feat(v2): better splitchunks and babel default

* common chunks

* chunks: all
2019-07-13 10:38:48 -07:00
Endi
83e8e440fa
chore(v2): upgrade mdx deps (#1650) 2019-07-13 00:42:52 +08:00
Bruno Vego
7b7d1e6161 feat(v2): CodeBlock copy button (#1643)
* feat(v2): CodeBlock copy button

* fix: live theme editor breaking bug
2019-07-12 12:55:56 +07:00
Endi
a124929b41
chore(v2): upgrade deps (#1646) 2019-07-10 23:15:14 +07:00