Massoud Maboudi
7b807fd85c
refactor: improved Farsi default translations ( #5365 )
...
* changed the arrow icon direction for the nabvar in mobile size
* refactor(v2): improved Farsi default translations
2021-08-15 22:38:36 +03:00
Sébastien Lorber
b8841de53a
fix: refactor TOC highlighting + handle edge cases ( #5361 )
2021-08-14 18:53:24 +02:00
Sébastien Lorber
416e2a7a29
fix: code blocks should scroll in RTL direction ( #5357 )
2021-08-13 18:28:03 +02:00
Sébastien Lorber
295e77cc09
refactor(core): replace useDocusaurusContext().isClient by useIsBrowser() ( #5349 )
...
* extract separate useIsClient() hook
* for consistency, rename to `useIsBrowser`
* useless return
* improve doc for BrowserOnly
* update snapshot
* polish
2021-08-12 19:02:29 +02:00
Joshua Chen
69b11a8546
polish: bind key listener to light/dark toggle + a11y lint fixes ( #5341 )
...
* Fix Details a11y
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Remove keydown logic
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Fix toggle
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Proper way to fix toggle
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Proper way to fix details
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Put callback back
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
2021-08-12 16:33:31 +02:00
Alexey Pyltsyn
cbff487516
fix: author/image adjustments in BlogPosting schema ( #5346 )
2021-08-12 15:10:19 +02:00
Joshua Chen
3fc47938a5
chore(mdx-loader): migrate package to TypeScript ( #5347 )
...
* Polish code style
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Partly done migration
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Complete typing
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Fix tests
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* A-ha
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Cleanup
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Fix error
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Cleanup
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
2021-08-12 14:55:14 +02:00
Sébastien Lorber
1f8fa5e859
fix: add admonitions support to mdx partials loaded through the fallback mdx loader ( #5339 )
2021-08-11 16:33:25 +02:00
Joshua Chen
ee6ebc4877
refactor: better typing + remove unnecessary eslint-disable ( #5335 )
...
* Initial work
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Fix a few errors
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Restore default value
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Update docs
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Use custom route config
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Address a few suggestions
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Revert logo change
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Restore key
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Oops
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Remove use of any
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Remove eslint-disable
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Put type reference back
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Remove
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
2021-08-11 16:07:17 +02:00
Joshua Chen
0c0c14120e
refactor(plugin-blog): style improvements in blogUtils ( #5338 )
...
* Minor refactor
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Revert forEach change
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
2021-08-11 15:40:33 +02:00
Sébastien Lorber
a2ab4d33c8
feat: Markdown page-specific head metadatas ( #5330 )
...
* Markdown page-specific head metadatas
* ensure mdxType attribute is not added to the final markup
* polish doc
* Update packages/docusaurus-theme-classic/src/theme/MDXComponents/index.tsx
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
* fix eslint annoying rule error
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2021-08-11 11:39:01 +02:00
John Reilly
9afc900780
feat: structured data for blog posts ( #5322 )
2021-08-11 11:20:55 +02:00
Pierre-Gilles Leymarie
ec1401ad80
fix: plugin ideal-image should generate filename with a hash even in development ( #5334 )
2021-08-11 11:14:57 +02:00
Alexey Pyltsyn
09f089b612
chore: upgrade Infima to alpha.30 ( #5256 )
...
* chore: upgrade Infima to alpha.30
* Remove redundant CSS class
* Update index.tsx
2021-08-11 10:56:57 +03:00
Alexey Pyltsyn
0c73afd1b4
fix: remove top margin only from directly first element ( #5240 )
2021-08-11 09:47:05 +03:00
Joshua Chen
4c246493ef
refactor(init): share common files between templates ( #5315 )
...
* Create shared folder & update init logic
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Restore needed links
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Prevent copying symlinks
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Reuse some FB files
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Minor tweak
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Minor refactors
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Fix bootstrap url
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Add path alias
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Handle facebook template more gracefully
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* minor refactor: extract getTypeScriptBaseTemplate
Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-08-10 16:26:59 +02:00
Hamza Hamidi
39faf44718
fix: make proper highlighting doc link if no sidebar ( #5317 )
...
* fix: All navbar items without sidebar are active
Close All navbar items without sidebar are active #5310
* Update packages/docusaurus-theme-classic/src/theme/NavbarItem/DocNavbarItem.tsx
Co-authored-by: Alexey Pyltsyn <lex61rus@gmail.com>
Co-authored-by: Alexey Pyltsyn <lex61rus@gmail.com>
2021-08-10 15:34:18 +02:00
Alexey Pyltsyn
60599552e4
fix: avoid extra default active class on doc sidebar item ( #5316 )
2021-08-10 15:21:39 +02:00
Alexey Pyltsyn
928ba75da4
fix: unbreak highlighting regular navbar links ( #5319 )
2021-08-10 12:30:48 +02:00
Michal Sänger
18151879d2
feat: add Czech translation for docusaurus-theme-classic ( #5314 )
2021-08-08 00:07:32 +03:00
Joshua Chen
28e25992ab
feat: new init template classic-typescript ( #5233 )
...
* Add typescript template
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Update template
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Complete CLI
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Remove d.ts file
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Refactor
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Revert lock file changes
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Regenerate lock
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Add stylelint ignore
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Fix tsconfig
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Attempt to use symlink
* More symlinks
* Link all markdown
* Link source files
* Change to relative links
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Fix blogs
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Fix link
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Link config
* Documentation
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Add option to index
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Add option
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Fix copying
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Provide suffix
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Always have colored output
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Remove return signature
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Update generate examples
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Update lock
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Fix tsconfig
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Use latest docusaurus
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Update lock
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Add type def
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* init: make classic first in list + mark as recommended + minor refactors
* remove types.d.ts
* add "yarn typecheck" script
* Minor tweaks
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Generate example for TS
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Fix
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Add comment
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* No emit when running tsc
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* FIx generate examples
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Remove compiler options
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* This looks better
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Use new tsconfig
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-08-06 19:11:36 +02:00
Sébastien Lorber
cabb768473
feat: blog posts support /YYYY/MM/DD/blog-post/index.md pattern + blog frontmatter can reference relative images ( #5309 )
...
* POC of blog post folder
* add parseBlogFileName with tests + refactor and extract processBlogSourceFile in separate method
* improve blog date pattern doc + link from content plugin guides to API ref docs
* Some FrontMatter fields should be able to reference relative image assets, converted to Webpack require calls and exposed as frontMatterAssets
* remove log
2021-08-06 17:51:59 +02:00
wan-nyan-wan
34e9080232
fix: docusaurus serve logs wrong port if 3000 is taken ( #5311 )
2021-08-06 17:16:34 +02:00
Alexey Pyltsyn
081db7b35c
fix: remove unexpected whitespaces in CSS bundle ( #5308 )
2021-08-06 11:59:59 +02:00
Sébastien Lorber
916b82119b
feat: mdx loader fallback, allow importing mdx docs from anywhere ( #5299 )
...
* move deep filepath test
* split markdownPageExample.md
* re-org dogfooding content
* Add mdx partials fallback synthetic plugin by default
* test commit
* hide changelog title as it's already included in the partial file
* trigger CI
* fix changelog sidebar label
2021-08-06 11:32:22 +02:00
Joshua Chen
780e924a9e
fix: fix constant value import ( #5297 )
...
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
2021-08-05 14:54:09 +02:00
Joshua Chen
0a668366c2
refactor: properly type docs version ( #5284 )
...
* Type docs version
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Move non-null assertions
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Test again
2021-08-05 10:52:35 +02:00
Alexey Pyltsyn
bc6c67720a
fix: make successful build if missing favicon ( #5290 )
2021-08-05 10:43:14 +02:00
Alexey Pyltsyn
2c0b82e7ab
fix: apply proper class for active doc item on mobiles + avoid duplicated classes ( #5264 )
...
* fix: apply proper class for active doc item on mobiles
* Fixes after review
2021-08-04 15:29:10 +02:00
Massoud Maboudi
8e9b829d98
refactor: improve Farsi default translations ( #5280 )
2021-08-04 10:09:11 +03:00
Federico Aloi
22d3299b47
fix: improve Spanish translation ( #5275 )
2021-08-03 21:30:37 +03:00
Sébastien Lorber
bb825faf1c
fix: ability to link md files with relative paths when paths contain space ( #5270 )
...
* fix md linkify function when spaces in paths
* fix linkify
2021-08-02 18:02:01 +02:00
Joshua Chen
bd46de18f9
fix: fix wrong regex that removes extra letters from swizzled component names ( #5268 )
2021-08-02 11:44:45 +02:00
Alexey Pyltsyn
8a198ef20a
fix: show secondary menu if even there is no main one ( #5262 )
2021-08-02 11:16:32 +02:00
Joshua Chen
650f989dbb
fix: fix various TS errors ( #5261 )
...
* Fix import errors
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Oops
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Mark contentLoaded async
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
2021-08-02 11:02:43 +02:00
Joshua Chen
9e615eff02
refactor: reduce ESLint warnings / better typing ( #5242 )
...
* Fix code block children type
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Add return type
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Add types
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Fix return types
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Fix details type
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Fix type
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
2021-07-29 17:59:38 +02:00
Sébastien Lorber
fc64c12e41
chore(v2): prepare v2.0.0-beta.4 release ( #5238 )
...
* chore(v2): prepare v2.0.0-beta.4 release
* update publish
* v2.0.0-beta.4
2021-07-28 22:54:41 +02:00
Joshua Chen
4bc6a63756
fix: navbar item validation done correctly ( #5202 )
...
* Initial work
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Fix
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Fix again
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* More fix (Joi is so hard!)
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* This should pass now
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Such pain
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Minor tweaks
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* More test cases
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Minor tweaks
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Errr... this should be better
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Redo isOfType
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Make things more concise
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Remove TODO
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Rename isOfType
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Slight refactor
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* More error messages
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* More test cases
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-07-28 22:20:48 +02:00
Alexey Pyltsyn
c935fe2a37
feat(v2): add back to top button ( #4912 )
...
* feat(v2): add back to top button
* Test on mobiles
* Use clean-btn class
* Fix case
* clearer useScrollPosition() hook
* fix useScrollPosition typing + dangerous 0 fallback value + refactor a bit backToTop button
* useless fallback
* Handle both browsers with/without native smooth scrollBehavior support
* fix SupportsNativeSmoothScrolling using document on SSR
* revert to smoothScrollTopPolyfill usage
Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-07-28 22:10:17 +02:00
陈杨文
bb0c9eed0d
fix(v2): parse frontMatter.date ( #5232 )
...
Signed-off-by: wener <wenermail@gmail.com>
2021-07-28 19:32:14 +02:00
Sébastien Lorber
b3e89d2a86
feat: docusaurus.new + improved StackBlitz playground ( #5235 )
...
* Upgrade playground shortcut domain to docusaurus.new
* update generateExamples
* update generateExamples + re-generate with stackblitz config
* test
* test
* test
* test
* test
* update examples
* upgrade lockfile
* fix yarnlock
* fix yarnlock
2021-07-28 19:27:58 +02:00
Sébastien Lorber
4cfbfa11ee
chore: Upgrade infima 29 ( #5234 )
...
Co-authored-by: Massoud Maboudi <massoud.maboudi@gmail.com>
2021-07-28 17:58:09 +02:00
Alexey Pyltsyn
ce847d664c
fix(v2): remove top margin from first element inside doc article ( #5230 )
2021-07-28 16:35:31 +02:00
Alexey Pyltsyn
a72ed73d2d
fix(v2): keep mobile TOC after hydration ( #5229 )
2021-07-28 15:34:45 +02:00
antonvasilev52
a7618c7758
refactor(v2): fix small typo in Russian translation ( #5228 )
2021-07-28 02:33:45 +03:00
Sébastien Lorber
dc4664b489
feat: details/summary theme / MDX component ( #5216 )
...
* Details component
* polish arrow animation
* fix text selection bug
* fix some edge cases + polish
* example of overriding baseClassName
* Move Details component to theme-common
* make component work even when JS is disabled or failed to load
* update arrow transform
* Details component: better handling of no-JS fallback mode: avoid delaying arrow navigation when JS (see review)
* prefix css vars with --docusaurus
* improve css arrow styling
* slightly change details/summary design
* better md doc + include quotes and details in doc
2021-07-27 18:45:12 +02:00
Alexey Pyltsyn
798f634007
chore(v2): update Infima to alpha 28 ( #5222 )
2021-07-27 16:09:20 +02:00
Alexey Pyltsyn
938e5a906f
refactor(v2): update Russian translation ( #5224 )
...
* refactor(v2): update Russian translation
* Wording
2021-07-27 16:00:11 +02:00
Massoud Maboudi
6f366f4b45
refactor(v2): improved Farsi default translations ( #5217 )
...
* improved the Farsi translation
* removed the __description lines
* removed the __description lines
* improved the translation
2021-07-27 10:50:31 +02:00
Sébastien Lorber
8621ae2910
fix: upgrade Docsearch to avoid layout shift ( #5214 )
...
* upgrade algolia docsearch
* alpha 39
2021-07-24 18:40:09 +02:00