Commit graph

72 commits

Author SHA1 Message Date
Sébastien Lorber
41ff9a9fd0
chore(v1): move v1 docs inside website-1.x (#3504)
* move v1 docs in website-1.x

* fix editUrl after moving v1 docs

* update crowdin source for v1 docs

* fix test after v1 config change

* migration cli should support customDocsPath (fix v1->v2 integration tests)

* fix migrationConfig.test.ts
2020-10-01 17:16:24 +02:00
josephMG
d280176806
fix(v1): versioned_docs and skip-next-release relative path issue by adding versioned_source to metadata (#3429) 2020-09-10 16:52:16 +02:00
adinaja
8fd5375b26
fix(v1): fenced block detection (#3340) 2020-08-27 10:06:10 +02:00
Ben Gubler
a94d14b9c7
fix(v1,v2): add initial-scale=1.0 to all meta name='viewport' (#3290) 2020-08-18 12:59:58 +02:00
Sébastien Lorber
83d160f017
fix(v1): fresh install failing due to <> syntax
https://github.com/facebook/docusaurus/issues/3199 (#3213)
2020-08-05 16:19:24 +02:00
Bartosz Kaszubowski
aa7430e168
feat(v1): add 'slugPreprocessor' config option to allow users customize the hash links (#3124)
* fix(v1): remove HTML content from hash links

* fix one more test

* rewrite changes as new feature to prevent breaking changes
2020-07-28 14:17:28 +02:00
Amirul Ahmad
f16258b19b
fix(v1): enableUpdateTime fails if local directory name has spaces (#2993)
Co-authored-by: Amirul Ahmad <amirul.ahmad@oleo.co.uk>
2020-06-25 18:00:54 +02:00
Eric Dobbertin
d513dec521
feat(v1): add deletedDocs config to escape from versioning fallback (#2955)
* feat: support for deletedDocs in siteConfig

fixes #2429

* docs: document deletedDocs option

* feat: allow array in deletedDocs config

* docs: clarify deletedDocs version formatting
2020-06-25 17:54:49 +02:00
Sébastien Lorber
08359dd3ca
chore(v2): fix async tests (#2906) 2020-06-09 01:10:13 +08:00
Bartosz Kaszubowski
92729af0ab
chore(v2): fix lint, tweak lqip-loader utils comment (#2563) 2020-04-09 01:08:58 +08:00
Alexey Pyltsyn
1f00d15c74 chore(v2): fix code style (revert previous changes) 2020-04-05 17:38:12 +03:00
Alexey Pyltsyn
6965a668cd chore(v2): fix code style 2020-04-05 17:30:59 +03:00
Yangshun Tay
b07507c9cc
chore(v2): upgrade devDependencies (#2538)
* chore(v2): upgrade devDependencies

* chore(v2): upgrade devDependencies

* chore: prettier
2020-04-05 19:07:44 +08:00
Yangshun Tay
32c1a92b17
chore: yearless copyright headers for source code (#2320)
* chore: yearless copyright headers for source code

* update snapshots
2020-02-25 23:12:28 +08:00
James McShane
e4eb9194fa fix(v1): update blog href value to match navbar href (#2204) 2020-01-11 13:19:01 +08:00
Dan Abramov
632e2dc437 fix(v1): fix JSX highlighting by passing language to Prism (#2196)
* Fix JSX highlighting by passing language to Prism

* Make Prettier happy

* Keep guessing what Prettier wants because CI doesn't tell me
2020-01-08 00:42:47 +08:00
Nick McCurdy
ba7c38cf0f docs(v1): fix path to sidebars.json in generated readme (#2108)
* docs(v1): fix path to sidebars.json in generated readme

* test(v1): fix path to sidebars.json in test
2019-12-09 15:57:59 -08:00
Yangshun Tay
55e676cb25
misc: add command to run prettier on docs (#2102)
* misc: add command to run prettier on docs

* Fix GH issue template

* Fix tests

* Add prettier-docs command to precommit
2019-12-07 21:56:30 -08:00
Huáng Jùnliàng
34e942e835 fix(v1): convert scripts to ES5 syntax for IE 10 (#2063) 2019-11-28 11:44: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
Yangshun Tay
0984dfcde5 fix(v1): apply negative margin to docs heading only (#2028) 2019-11-22 12:14:31 +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
de2954352a
fix(v1): docusaurus-start should work even if path contain 'pages' word (#2020) 2019-11-20 23:52:19 +07:00
Endi
e544dc960a
fix(v1): consistent slug & hash-link generation (#2019) 2019-11-20 23:35:47 +07:00
PA
1bf590ea2b fix(v1): fix page title render issue when referred by search result (#1869)
* fix(v1): Fix page title render issue when referred by search result

When Algolia DocSearch query finds a match for a page's title, it attempts to generate
a permalink. Because the page title element (`h1`) does not have an `id`, Algolia
generates uses the `id` from closes parent element. Because of this, the page title
scrolls to a position that is slightly overlayed by the fixed top navigation bar.

This fix sets an `id` for the page title so that the search result is able to generate
a more accurate permalink.

* Adjust css for handling post title to be on the top when referred by an anchor

The post title can sometimes be referred by an anchor using the "id" of that element.
In that case the title will be automatically be the first element within the viewport.
Since we have a header fixed at the top of the view port, the title becomes hidden or
not visible. That's why some css adjustments are needed so that if any user ends up
with a link to a page that is referring to the post title (i.e. auto generated anchor
link by algolia DocSearch).

The css code uses pseudo element `:before` to make the adjustments. Details on this
can be found in the following article:

https://css-tricks.com/hash-tag-links-padding/

* Adjust CSS so that different selectors are on separate lines
2019-11-18 11:07:02 -08:00
Endi
3be2e86546
chore: bump dev dependencies (#1955)
* chore: bump devdeps

* upd infima url
2019-11-11 17:44:26 +07:00
endiliey
ab1520548d chore: bump dependencies 2019-11-01 01:25:10 +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
Yangshun Tay
a690d34af0
feat(v1): allow specifying meta desc in front matter (#1859)
* feat(v1): allow specifying meta desc in front matter

* misc(v2): sync with v1
2019-10-20 11:17:10 -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
Yangshun Tay
9f6460fde0 misc: facebook/Docusaurus -> facebook/docusaurus 2019-10-12 01:11:34 -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
BlackRedScarf
a16e346c81 fix: footer links margin (#1781)
* fix footer links margin

* Update main.css
2019-09-13 13:11:43 -07:00
Chen Hui Jing
bd72aacfe8 fix: content aligning breaks at IE11 (#1684) 2019-07-20 21:48:34 -07:00
Endi
e1eea7b493
fix: dont render html for meta description (#1672) 2019-07-18 18:20:04 +07: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
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
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
Ó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
3496f6e609
v1.11.1 (#1592)
* v1.11.1

* chore: publish new website

* misc: fix tests
2019-06-08 10:56:21 -07:00
Sviatoslav
e486d3d1b0 fix: Add support for non-latin characters in scrollSpy ToC highlighter (#1570) 2019-06-06 16:50:55 +07:00
Tushar Sharma
0c8bf0fc5e style: fixes formatting issues in main.css (#1532) 2019-05-30 11:54:14 -07:00
Tushar Sharma
9514593d5f feat: highlight nav item in onPageNav ToC (#1524)
* feat: highlight nav item in onPageNav ToC

* fix: use es5 in browser scripts, update documentation, css refactoring

* fix: removes smooth scroll

* fix: removes unnecessary codeblock , undo css formatting issues, modify scrip load url

* fix: update scrollspy script comments
2019-05-30 08:54:47 -07:00
Tushar Sharma
bff9a53095 fix: enable live reloading title of doc (#1507)
* fix: enable live reloading title of doc

* fix: removing unnecessary reload statements

* fix: only title change should trigger a live reload

* fix: adding more properties that triggers a live reload

* fix: refactoring
2019-05-27 14:48:01 +07:00
Yangshun Tay
ef1af0a5be
fix: don't collapse the blog navigation even if collapsible is true (#1519)
* fix: don't collapse the blog navigation even if collapsible is true

* fix: read docsSideNavCollapsible from props
2019-05-26 20:37:58 -07:00
Endi
166816af40
fix: reload siteConfig.js automatically when locally served page is refreshed (#1509)
* fix: livereload siteConfig

* fix test

* nits
2019-05-22 22:31:51 +07:00