Commit graph

294 commits

Author SHA1 Message Date
Endi
71283dc7df
fix(v2): docusaurus route config generation for empty path (#1683)
* fix(v2): route config does not acceptempty string

* test snapshot

* add test

* changelog
2019-07-21 11:14:14 +07:00
endiliey
ae620cd530 v2.0.0-alpha.22 2019-07-20 18:31:41 +07:00
Yangshun Tay
6f0d858b4f chore(v2): shift v2 CHANGELOG and update classic template (#1682)
* chore(v2): shift v2 CHANGELOG and update classic template

* changelog
2019-07-20 18:08:25 +07:00
陈杨文
ff105bf774 feat(v2): add support for front matter id in blog (#1666) 2019-07-20 03:40:51 -07:00
Wei Gao
05b28b5520 v1.12.0 (#1679)
* v1.12.0

* Add compare version link for v1.12

* Update version numbers for v1.12

* cut new docs

* changelog
2019-07-20 17:21:47 +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
Sakti Kr Chourasia
1a5aed404e feat(v2): autoprefix css (#1605)
* docs: make navbar less cluttered

* misc(v2): rename components (#1434)

* misc(v2): clean up work

* misc(v2): rename components

* misc(v2): rename Blog components

* refactor(v2): remove page plugin component

* chore(v2): optimize webpack config

* feat(v2): implement theme component overriding (#1435)

* feat(v2): implement component overriding

* siteDir theme overriding should work for > 1 level directory

* fallback for essential component like Loading

* rename default -> classic

* fix(v2): add missing layout alias on theme-classic plugin

* feat(v2): easier plugin theme components swizzling (#1436)

* feat(v2): easier plugin theme components override

* add context

* refactor again

* rename eject -> swizzle

* nits

* fix(v2-cli): passes the missing host option to start (#1439)

* feat(v2): Algolia search theme (#1440)

* feat(v2): Algolia search plugin

* patch PR #1440 (#1441)

* alternative implementation

* typo

* refactor noop

* rename SearchAlgolia -> SearchBar

* changes.md

* refactor(v2): move headerLinks -> themeConfig & rm dead code (#1442)

* refactor(v2): move headerLinks -> themeConfig & rm dead code

* rm -rf dead code

* chore(v2): better chunk naming

* refactor(v2): add flowtype + refactor test (#1443)

* chore(v2): add flow setup

* nits

* fix

* add flow-typed

* ignore compiled library

* fix error

* fix typing

* fix module name mapper

* setup for @docusaurus/core

* dont try remove type without @flow

* fix can't find @docusaurus/utils

* fix test

* remove obscure relative paths

* more refactoring

* add typing for server/load/theme.js

* no need to ship .flow source

* chore(v2): rm flowtype (#1444)

* chore(v2): tweak eslint config (#1445)

* chore: point website-1.x to correct version so that it can pick latest code

* feat(v2): meta description (#1447)

* feat(v2): meta description

* add description for blog as well

* fix non-descriptive text link

* remove font awesome

* switch front-matter -> gray-matter

* fix(v2): docsearch a11y issue (#1449)

* refactor(v2): blog data revamp (#1450)

* refactor(v2): blog data revamp

* fix(v2): fix incorrect blog total count

* misc: remove console.log

* feat(v2): export frontMatter as an object within MDX file (#1451)

* refactor. Don't confuse metadata & frontmatter

* export frontMatter in content itself

* nits

* nits name

* dont truncate first four lines in blog

* fix(v2): transpiling, window scroll and console error (#1452)

* chore(v2): better error message style (#1454)

* chore(v2): remove docsearch a11y workaround

* fix(v2): slugify tags

* feat(v2): blog tags (#1453)

* feat(v2): blog tags

* feat(v2): blog tags

* chore(v2): use remark-slug so that rightToc can benefit from it

* fix: right TOC should not strip special chars (#1458)

* fix: right TOC should not strip special chars

* nits

*  fix(v2): handle non existent blog, docs, pages (#1459)

* fix(v2): handle non existent blog, docs, pages

* nits

* feat(v2): list blog tags on posts (#1456)

* feat(v2): list blog tags on posts

* fix date handling on blog header

* fix console log error due to non unique key

* test(v2): test different type of sidebar item

* chore(v2): fix typo

* v2.0.0-alpha.14

* fix(v2): fix wrong dependency problem (#1460)

* v2.0.0-alpha.15

* Chore(v2): use alias instead of relative path for blogpost

* feat(v2): theme config for Footer (#1461)

* feat(v2): theme config for Footer

* fix: dont show footer if themeConfig.footer is undefined
* Import fresh docusaurus.config.js for better hot reload

* chore(v2): update dependencies (#1462)

* chore(v2): update dependencies

* nits

* v2.0.0-alpha.16

* fix(v2): fix cannot import css from node_modules in userland (#1463)

* docs: showcase user Express Validator (#1464)

* docs: sort user with alphabetical (#1465)

* chore: fix typo (#1466)

* docs: showcase user tipsi-stripe (#1423)

* docs: make it clear in the tutorial where the `docs` folder is (#1468)

* Make it clear where the `docs` folder is

It was not clear, to the beginner user—who this tutorial is for—where the `docs` folder was . The only reason I know this is because I'm a beginner user and I tried for too many minutes to find the `docs` folder inside the `website` folder. I had this assumption because the previous example is offered under the assumption that you're in the `website` folder.

Feel free to change the wording, I just want to make it clear where you should be looking, if you're new.

* Update tutorial-create-pages.md

* docs: add hint for linking dependencies time (#1470)

In this tutorial we assume that the user may or may not have used Node.js. It would follow then, based on how long it takes the "Linking dependencies" step to complete—243.61s for me—that we give them a hint that it might take a minute.

* doc: mention HTTPS approach in tutorial git clone step (#1471)

* doc: change tutorial git to suggest HTTPS

Since we're instructing the user to create a new repository, it might be a safe bet to assume that they don't have their SSH keys set up. HTTPS might be a better option in this context.

* docs: keep ssh add https

@Hongarc said, "How about keep `SSH` and add `HTTPS`." This is one way to do that.

* Update tutorial-setup.md

* docs: normalized spelling of `web server` (#1473)

* docs: clarify location of sidebars.json (#1472)

In #1468 we clarify where the `docs` folder is. 
Here, we make it clear where `sidebars.json` is.

* fix: missing cli commands (#1478)

* fix: missing cli commands

* centralize

* feat(v2): move navbar config into themeConfig (#1477)

* feat(v2): move navbar config into themeConfig

* misc: fix tests

* fix: support external url for logo

* docs(v2): CLI docs (#1476)

* WiP: CLI docs

* Tweak word choices for CLI docs

- Use the word swizzle directly
- Follow variable convention for shell

* Resolve docs discussion

* Update cli.md

* fix(v2): should be able to build even if static folder doesnt exist (#1479)

* chore: remove noWatch cli options because you cant disable watch in wds (#1480)

* docs: update StreamPipes logo (#1481)

* docs: showcase user Ax (#1483)

* docs: remove pinned for Taro (#1482)

* docs: fix typo for `docs` folder (#1484)

* docs: fix typo for `docs` folder

* docs: request change for #1484

* Update api-doc-markdown.md

* docs: add some showcase user of `facebook` (#1486)

* docs: showcase user Idb

* docs: showcase user Netconsd

* docs: showcase user Redex

* added autoprefixer code with postcss loader

* removed unused changes

* added correct importloader and removed unused packages and conf
2019-07-19 19:00:10 -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
381dd75105
feat(v2): better twitter preview meta tag (#1676)
* fix(v2): remove unwanted scale zoom due to initial-scale meta tag

* use summary meta
2019-07-19 01:06:59 +07:00
Endi
e1eea7b493
fix: dont render html for meta description (#1672) 2019-07-18 18:20:04 +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
Masafumi Koba
d77f5538c2 fix: fix PostCSS warning on build command (#1664)
The warning is produced on `cssnano` call. See below:

> Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.

Reproduction:

```shell
mkdir work
cd work
npx docusaurus-init
cd website
yarn install
yarn run build
```

Environments:

- Node: 12.6.0
- Yarn: 1.17.3
2019-07-15 18:08:06 +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
f77e96d28d fix(v2): missing deps from preset-classic (#1662)
* fix(v2): missing deps from preset-classic

* nits

* changelog

* Update CHANGELOG.md
2019-07-14 08:24:54 -07:00
endiliey
dc15a51745 v2.0.0-alpha.21 2019-07-14 18:54:53 +07:00
Endi
e3c0803c0a
fix(v2): Fix babel-loader not transpiling docusaurus package (#1661) 2019-07-14 18:40:20 +07:00
endiliey
307f384684 v2.0.0-alpha.20 2019-07-14 17:36:40 +07:00
endiliey
568d9fd7dd chore(v2): update changelog 2019-07-14 17:32:48 +07:00
Yangshun Tay
c021367a18
docs(v2): proofread docs for alpha.20 (#1658)
* docs(v2): proofread docs for alpha.20

* docs(v2): update creating pages doc

* docs(v2): further updates to creating pages doc

* chore(v2): update CHANGELOG
2019-07-13 19:21:39 -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
9e9ad1f2b8 fix(v2): clicking logo on mobile sidebar should go to homepage (#1657) 2019-07-13 10:33:12 -07:00
Endi
1f5f06134f feat(v2): render 404 html page (#1652) 2019-07-13 03:57:09 -07:00
Endi
ca67cad2a7
feat(v2): add more essential meta tags (#1651)
* feat(v2): add more essential meta tags

* nits tagline
2019-07-13 01:23:00 +08:00
Endi
83e8e440fa
chore(v2): upgrade mdx deps (#1650) 2019-07-13 00:42:52 +08:00
Wei Gao
2491c53ba9 feat(v2): improve seo (#1588)
* feat(v2): improve seo

- Add doc specific seo information
- Add twitter meta tags to seo in theme Layout

* Cannot use svg in SEO image

* Add docs about SEO

* add site default image for seo

* Resolve PR discussion

* Add `image` to config optional fields

* Use theme config instead of root config for image, rename in front matter

* Use absolute url for image (wont work on preview)

* update docs for frontmatter field for seo

* refactor

* pages seo

* fix

* nits again'
2019-07-13 00:23:49 +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
Saugat Acharya
4faa608edd docs(v1): introduce docsSideNavCollapsible in siteConfig.js (#1649)
* Add information for docsSideNavCollapsible

* Add trailing comma
2019-07-11 21:30:19 -07:00
Endi
b2558ac379
fix: wrong bootstrapped footer social links (#1647) 2019-07-10 23:45:17 +07:00
Endi
a124929b41
chore(v2): upgrade deps (#1646) 2019-07-10 23:15:14 +07:00
Endi
d57110d15c
feat(v2): minor webpack build perf optimization (#1612)
* feat(v2): improve webpack build time

* revert devtool

* nits

* nits

* prettier
2019-07-10 22:12:07 +07:00
Yangshun Tay
e5e085b33d
chore(v2): make v2 docs plugin legacy (#1639)
* chore(v2): make v2 docs plugin legacy

* chore(v2): update fixtures
2019-07-05 17:20:46 -07:00
Yangshun Tay
702dba1c81 docs(v2): add README for template 2019-07-05 16:05:29 -07:00
James George
d8b5323836 misc(v2): refactor utils code to be slightly more concise (#1633) 2019-07-05 11:16:57 -07:00
PA
725219716f feat: use primary color for highlighted items in table of contents (#1628)
Currently the items in table of contents are highlighted as bold based on items being
viewed on the screen or as the user scrolls up/down on a page. Added the `primaryColor`
of the site's configuration to make the current section being viewed standout more
in the table of content.

closes #1608
2019-07-02 23:09:14 -07:00
James George
f4effe49fc chore: minor refactor (#1630)
* feat: minor refactor

* Minor fix

* Update init.ts
2019-06-29 22:38:39 -07:00
Wei Gao
a6736dd8dc feat(v2): report port number when starting dev server (#1582)
* feat(v2): report port number when starting dev server

* Attempt to print dev server URL

* Use digit dino

* Resolve merge conflict

* remove dino
2019-06-24 15:17:13 +07:00
Wei Gao
d1418af5ba chore(v2): tweak installation doc (#1621)
- generated site to match what is described in the doc
- minor changes in the installation page
2019-06-23 10:32:10 -07:00
Parth Patel
db44eccac3 fix: replace apostrophe with empty string in header slugification (#1618)
* Replace apostrophe with empty string in header

This change is to replicate the github behviour with respect to apostrophe in
headers. When there is an apostrophe in a header, github replaces it with empty string
when creating an anchor link to that header. Docusaurus should follow the same convention.
2019-06-21 17:40:04 -07:00
Yangshun Tay
49cfdeb42b feat: make blog posts unlisted only in production 2019-06-15 10:32:43 -07:00
Yangshun Tay
ffbc7a37f8
refactor(v2): move source files to be under website/src directory (#1609)
* refactor(v2): move source files to be under website/src directory

* misc: rename src constant
2019-06-15 09:59:23 -07:00
Ólafur Páll Geirsson
da3c91373e feat: add "unlisted" front matter option for blog posts (#1396)
* Add `unlisted` header option for blog posts, fixes #1393.

Previously, the blog sidebar listed the most recent blog posts sorted by
their publish date. This commit adds the ability to hide a specific blog
post from the sidebar and the feed of all blog posts by adding the
`unlisted: true` header option.

```md
title: My Draft Post
unlisted: true # Hide from blog sidebar and main blog page feed.
---
```

* Rename "unlisted" into "draft".
2019-06-15 09:24:15 -07:00
Oscar Walter
a5996829ef fix: require babel dependencies directly (#1575)
**What it does:**
 - Directly require babel dependencies instead of asking babel to do it.
2019-06-14 12:58:46 +08:00
Shawn Tabrizi
b1023aa9ac fix: remove the Container component from the docsNavContainer (#1599)
In this case, the `docsNavContainer` does not pick up any styles or attributes from the `container` component it is wrapped in.

It does however pick up the pesky `.container` className, which when paired with bootstrap, messes up the styling of the top navigation in mobile.

This change is completely non-destructive, but helps enable the use of bootstrap on top of Docusaurus.
2019-06-13 09:05:41 -07:00
Yangshun Tay
2d7a456208 misc(v2): misc fixes 2019-06-10 22:20:12 -07:00
Yangshun Tay
8a6f8ef9c3 fix(v2): make Google analytics and Google gtag plugins work 2019-06-10 00:48:38 -07:00
Yangshun Tay
cfffad8c6d feat(v2): implement Google analytics plugin 2019-06-10 00:16:06 -07:00