profile
viewpoint
Alexey Pyltsyn lex111 GitHub Jail https://lex111.ru/ ̶ ̶O̶b̶s̶e̶s̶s̶e̶d̶ open-source enthusiast 👋 Eternal amateur at everything 🤷‍♂️ Maintainer of Russian docs on PHP, React, Kubernetes and much more 🧐

facebook/docusaurus 17178

Easy to maintain open source documentation websites.

javascript-tutorial/ru.javascript.info 1627

Современный учебник JavaScript

certificationy/certificationy-cli 371

The CLI tool to train certifications

hootlex/the-majesty-of-vuejs-2 277

Demo APIs and homework solutions for "The Majesty of Vue.js 2"

certificationy/symfony-pack 211

A series of questions to prepare for the Symfony certification

autoloadnextpost/auto-load-next-post 59

Increase the pageviews on your WordPress site and reduce bounce rates as readers continue reading your posts infinitely scrolling down the page.

certificationy/php-pack 50

A series of questions to prepare for the Zend PHP certification

Bootsity/cracking-php-interviews-book 11

PHP Interview Questions and Answers

IT61/meetups 6

Коллекция митапов ростовского сообщества — IT61

Pull request review commentfacebook/docusaurus

feat(v2): Allow swizzling prism-include-languages in theme-classic

 module.exports = { }; ``` +If you want to add highlighting for languages not yet supported by Prism, you can swizzle `prism-include-languages` by++```bash+yarn swizzle @docusaurus/theme-classic prism-include-languages+```++It will produce `prism-include-languages.js` in your `src/theme` folder. You can add highlighting support for custom languages by editing `prism-include-languages.js`:++```js {6} title="src/theme/prism-include-languages.js"+    // ...

Ah, I'm sorry, I didn’t notice this update, because GitHub usually put the “Outdated” mark if the proposed change is applied.

SamChou19815

comment created time in 6 hours

Pull request review commentfacebook/docusaurus

feat(v2): Allow swizzling prism-include-languages in theme-classic

 module.exports = { }; ``` +If you want to add highlighting for languages not yet supported by Prism, you can swizzle `prism-include-languages` by++```bash+yarn swizzle @docusaurus/theme-classic prism-include-languages+```++It will produce `prism-include-languages.js` in your `src/theme` folder. You can add highlighting support for custom languages by editing `prism-include-languages.js`:++```js {6} title="src/theme/prism-include-languages.js"+    // ...

@SamChou19815 have you missed comment above or do you think this change is not necessary?

It seems important to me to provide some context if a piece of code is shown, otherwise its indents can be confusing for reader.

SamChou19815

comment created time in 6 hours

Pull request review commentfacebook/docusaurus

docs: _index docs page does not show a sidebar

 Given the example above, now when you navigate to the path `/docs` you will see  :::important -The document id of `_index` is reserved exclusively for the home doc page, so it will not work as a standalone route.+The document id of `_index` is reserved exclusively for the home doc page, so it will not work as a standalone route. If left to the default, the page will not show a sidebar. If you wish to have a sidebar for this page, its ID must be renamed to, for example, `index` or `introduction`.

A more accurate wording will look something like this (i.e. the document of "_index" the sidebar is not displayed, since this document is not specified in any sidebar file):

The document id of `_index` is reserved exclusively for the home doc page, so it will not work as a standalone route. If left to the default, the page will not show a sidebar. If you wish to have a sidebar for this page, specify the document id that is listed in the sidebar file.
aeneasr

comment created time in 6 hours

issue commentfacebook/docusaurus

Github Actions deployment error

@artemkovalyov could you please look at it?

pdimens

comment created time in 6 hours

pull request commentjavascript-tutorial/ru.javascript.info

Исправить опечатку в статье про Reflect

@yarastqt спасибо! Исправлено также в англ. версии https://github.com/javascript-tutorial/en.javascript.info/commit/075266e251e74a989f8bd9336c5bd43598a71396

yarastqt

comment created time in 8 hours

push eventjavascript-tutorial/ru.javascript.info

yarastqt

commit sha fb092dba07b797ce08756e115852d3829331a025

docs: fix typo

view details

Alexey Pyltsyn

commit sha 0e98c1b95d966174ca2adf9d4588a2f0b092e8a1

Merge pull request #959 from yarastqt/yarastqt.fix-typo Исправить опечатку в статье про Reflect

view details

push time in 8 hours

PR merged javascript-tutorial/ru.javascript.info

Исправить опечатку в статье про Reflect needs +1

Что сделано

Исправил опечатку в тексте, метод Reflect.get принимает только три аргумента.

+1 -1

1 comment

1 changed file

yarastqt

pr closed time in 8 hours

push eventjavascript-tutorial/en.javascript.info

Alexey Pyltsyn

commit sha 075266e251e74a989f8bd9336c5bd43598a71396

Update article.md

view details

push time in 8 hours

Pull request review commentfacebook/docusaurus

feat(v2): allow adding components to react-live scope

 import React from 'react'; import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; import usePrismTheme from '@theme/hooks/usePrismTheme'; import Playground from '@theme/Playground';+import ReactLiveScope from '@theme/ReactLiveScope'; import CodeBlock from '@theme-init/CodeBlock';+import {useMDXComponents} from '@mdx-js/react';++// Returns components that are available to use by the react-live playground+// It's not possible to import anything in the live playground,+// we need to provide the available imports manually+// See https://github.com/facebook/docusaurus/issues/2807+const useReactLiveScope = () => {+  const mdxComponents = useMDXComponents();

Maybe we should not include the built-in MDX components (a, code, h1 etc). Does this bring any overhead?

slorber

comment created time in a day

Pull request review commentfacebook/docusaurus

feat(v2): Allow swizzling prism-include-languages in theme-classic

 module.exports = { }; ``` +If you want to add highlighting for languages not yet supported by Prism, you can swizzle `prism-include-languages` by++```bash+yarn swizzle @docusaurus/theme-classic prism-include-languages+```++It will produce `prism-include-languages.js` in your `src/theme` folder. You can add highlighting support for custom languages by editing `prism-include-languages.js`:++```js {6} title="src/theme/prism-include-languages.js"+    // ...++    additionalLanguages.forEach((lang) => {+      require(`prismjs/components/prism-${lang}`); // eslint-disable-line+    });+    require('/path/to/your/prism-language-definition');++    // ...+```++You can refer to [PrismJS's official language definitions](https://github.com/PrismJS/prism/tree/master/components) when you are writing your own language definitions.
You can refer to [Prism's official language definitions](https://github.com/PrismJS/prism/tree/master/components) when you are writing your own language definitions.
SamChou19815

comment created time in a day

Pull request review commentfacebook/docusaurus

feat(v2): Allow swizzling prism-include-languages in theme-classic

 module.exports = { }; ``` +If you want to add highlighting for languages not yet supported by Prism, you can swizzle `prism-include-languages` by++```bash+yarn swizzle @docusaurus/theme-classic prism-include-languages+```++It will produce `prism-include-languages.js` in your `src/theme` folder. You can add highlighting support for custom languages by editing `prism-include-languages.js`:++```js {6} title="src/theme/prism-include-languages.js"+    // ...

Here we either need to remove all indents, or add a function declaration:

const prismIncludeLanguages = (Prism) => {
    // ...

    additionalLanguages.forEach((lang) => {
      require(`prismjs/components/prism-${lang}`); // eslint-disable-line
    });

    require('/path/to/your/prism-language-definition');

    // ...
}

SamChou19815

comment created time in a day

Pull request review commentfacebook/docusaurus

feat(v2): Allow swizzling prism-include-languages in theme-classic

 module.exports = { }; ``` +If you want to add highlighting for languages not yet supported by Prism, you can swizzle `prism-include-languages` by++```bash
```bash npm2yarn
SamChou19815

comment created time in a day

Pull request review commentfacebook/docusaurus

feat(v2): Allow swizzling prism-include-languages in theme-classic

 module.exports = { }; ``` +If you want to add highlighting for languages not yet supported by Prism, you can swizzle `prism-include-languages` by
If you want to add highlighting for languages not yet supported by Prism, you can swizzle `prism-include-languages`:
SamChou19815

comment created time in a day

pull request commentfacebook/docusaurus

feat(v2): Allow swizzling prism-include-languages in theme-classic

It’s definitely certain that we won’t be able to completely refuse from swizzling, this is actually not a bad mechanism for change built-in components.

We will also leave additionalLanguages option, because otherwise our users will need to have swizzled prism-include-languages to add more languages -- this is an unnecessary step and just unpleasant action for them.

Therefore, I think we need to update the docs for this new use case - when people want to add custom language. However in most cases this is not needed by anyone, since very few people develop their own programming languages, since this feature is intended only for them, right?

SamChou19815

comment created time in a day

issue commentfacebook/docusaurus

Use CSS instead of JS for the default night-mode toggle

In fact, in the case of the site https://pgm.dev, this issue is due to the Rocket Loader from CloudFlare, if you disable it, then quick flash will no longer appear.

Indicardo

comment created time in a day

issue commentfacebook/docusaurus

alpha.56 broke theme-search-algolia

Ha ha no problem!

aeneasr

comment created time in a day

issue commentfacebook/docusaurus

alpha.56 broke theme-search-algolia

I have no errors when running yarn start :man_shrugging: .

aeneasr

comment created time in a day

issue commentfacebook/docusaurus

alpha.56 broke theme-search-algolia

"@docusaurus/theme-search-algolia": "^2.0.0-alpha.32",

Bump to .56 please, it is important.

aeneasr

comment created time in a day

pull request commentfacebook/docusaurus

feat(v2): introduce DocSearch v3 search

There is a issue with not exactly accurate displaying the keyboard element of CTRL on all OS other than macOS, I suppose.

image

But it would be great to use SVG in navbar search, as it produces pretty clear font rendering.

Do you have a browser and os compatibility list you'd like to cover with Docusaurus?

We do not have much preference for this, we do not even support IE11, but just want to see smoothest and niceness UI.

francoischalifour

comment created time in a day

issue commentfacebook/docusaurus

Adding docs home page to the sidebar

Fine, thus, for example, the document id of introduction is set as the docs home page (homePageId: 'introduction'), then the route for it will not be generated (docs/introduction), and its contents will be available by the docs home page route (/docs). I will try to ship it to the next release.

ark120202

comment created time in a day

issue commentfacebook/docusaurus

Adding docs home page to the sidebar

Yep, I only now realized that I had missed this point, but maybe we should not create a route for such a document at all? I'm not exactly sure.

ark120202

comment created time in 2 days

issue commentfacebook/docusaurus

Adding docs home page to the sidebar

Actually this was done intentionally, do you think we do not need to create a separate route for the document, which is used as a home docs page?

ark120202

comment created time in 2 days

issue commentfacebook/docusaurus

alpha.56 broke theme-search-algolia

docusaurus/preset-classic preset already includes Algolia, you do not need to declare it anywhere or in config life.

If you are not using classic preset, then you need to install all the necessary presets manually. From your snippets, I can't figure out what the error is. Please, whenever you create a bug report, give a link to a reproducible repo

aeneasr

comment created time in 2 days

CommitCommentEvent

issue commentfacebook/docusaurus

Sidebar hidden when using new docs `homePageId` feature

If you use reserved doc id for this feature, then this is intentional behavior (see https://github.com/facebook/docusaurus/pull/2785) If this is not your case, we need a reproducible repo/demo.

aeneasr

comment created time in 2 days

Pull request review commentfacebook/docusaurus

feat(v2): introduce DocSearch v3 search

  * LICENSE file in the root directory of this source tree.  */ -import React, {useState, useRef, useCallback} from 'react';-import classnames from 'classnames';-+import React, {useState, useCallback} from 'react';+import {createPortal} from 'react-dom'; import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; import {useHistory} from '@docusaurus/router';-import useSearchQuery from '@theme/hooks/useSearchQuery';+import Link from '@docusaurus/Link';+import Head from '@docusaurus/Head';+import {DocSearchButton, useDocSearchKeyboardEvents} from '@docsearch/react';++let DocSearchModal = null; -import styles from './styles.module.css';+function Hit({hit, children}) {+  return <Link to={hit.url}>{children}</Link>;+} -const Search = ({handleSearchBarToggle, isSearchBarExpanded}) => {-  const [algoliaLoaded, setAlgoliaLoaded] = useState(false);-  const searchBarRef = useRef(null);+function SearchBar() {   const {siteConfig = {}} = useDocusaurusContext();-  const {-    themeConfig: {algolia},-  } = siteConfig;   const history = useHistory();-  const {navigateToSearchPage} = useSearchQuery();--  function initAlgolia(focus) {-    window.docsearch({-      appId: algolia.appId,-      apiKey: algolia.apiKey,-      indexName: algolia.indexName,-      inputSelector: '#search_input_react',-      algoliaOptions: algolia.algoliaOptions,-      autocompleteOptions: {-        openOnFocus: true,-        autoselect: false,-        hint: false,-        tabAutocomplete: false,-      },-      // Override algolia's default selection event, allowing us to do client-side-      // navigation and avoiding a full page refresh.-      handleSelected: (_input, _event, suggestion) => {-        _event.stopPropagation();--        // Use an anchor tag to parse the absolute url into a relative url-        // Alternatively, we can use new URL(suggestion.url) but it's not supported in IE.-        const a = document.createElement('a');-        a.href = suggestion.url;--        // Algolia use closest parent element id #__docusaurus when a h1 page title does-        // not have an id, so we can safely remove it.-        // See https://github.com/facebook/docusaurus/issues/1828 for more details.-        const routePath =-          `#__docusaurus` === a.hash-            ? `${a.pathname}`-            : `${a.pathname}${a.hash}`;-        history.push(routePath);-      },-    });--    if (focus) {-      searchBarRef.current.focus();-    }-  }--  const loadAlgolia = (focus = true) => {-    if (algoliaLoaded) {-      return;-    }--    Promise.all([import('docsearch.js'), import('./algolia.css')]).then(-      ([{default: docsearch}]) => {-        setAlgoliaLoaded(true);-        window.docsearch = docsearch;-        initAlgolia(focus);-      },-    );-  };+  const [isOpen, setIsOpen] = useState(false); -  const toggleSearchInput = useCallback(() => {-    loadAlgolia();--    if (algoliaLoaded) {-      searchBarRef.current.focus();-    }--    handleSearchBarToggle(!isSearchBarExpanded);-  }, [isSearchBarExpanded]);--  const handleSearchInputBlur = useCallback(() => {-    handleSearchBarToggle(!isSearchBarExpanded);-  }, [isSearchBarExpanded]);+  const {+    indexName,+    appId = 'BH4D9OD16A',+    apiKey,+    searchParameters,+  } = siteConfig.themeConfig.algolia;++  const importDocSearchModalIfNeeded = useCallback(+    function importDocSearchModalIfNeeded() {+      if (DocSearchModal) {+        return Promise.resolve();+      }++      return Promise.all([+        import('@docsearch/react/modal'),+        import('@docsearch/react/style'),+      ]).then(([{DocSearchModal: Modal}]) => {+        DocSearchModal = Modal;+      });+    },+    [],+  ); -  const handleSearchInput = useCallback((e) => {-    const needFocus = e.type !== 'mouseover';+  const onOpen = useCallback(+    function onOpen() {+      importDocSearchModalIfNeeded().then(() => {+        setIsOpen(true);+      });+    },+    [importDocSearchModalIfNeeded, setIsOpen],+  ); -    loadAlgolia(needFocus);-  });+  const onClose = useCallback(+    function onClose() {+      setIsOpen(false);+    },+    [setIsOpen],+  ); -  const handleSearchInputPressEnter = useCallback((e) => {-    if (!e.defaultPrevented && e.key === 'Enter') {-      navigateToSearchPage(e.target.value);

Instead, we could display a link (e.g., "Show all results") at the end of the DocSearch results that goes to the search page with the typed query.

I actually like that one. We'll go that way, then.

francoischalifour

comment created time in 2 days

Pull request review commentfacebook/docusaurus

feat(v2): introduce DocSearch v3 search

  * LICENSE file in the root directory of this source tree.  */ -import React, {useState, useRef, useCallback} from 'react';-import classnames from 'classnames';-+import React, {useState, useCallback} from 'react';+import {createPortal} from 'react-dom'; import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; import {useHistory} from '@docusaurus/router';-import useSearchQuery from '@theme/hooks/useSearchQuery';+import Link from '@docusaurus/Link';+import Head from '@docusaurus/Head';+import {DocSearchButton, useDocSearchKeyboardEvents} from '@docsearch/react';++let DocSearchModal = null; -import styles from './styles.module.css';+function Hit({hit, children}) {+  return <Link to={hit.url}>{children}</Link>;+} -const Search = ({handleSearchBarToggle, isSearchBarExpanded}) => {-  const [algoliaLoaded, setAlgoliaLoaded] = useState(false);-  const searchBarRef = useRef(null);+function SearchBar() {   const {siteConfig = {}} = useDocusaurusContext();-  const {-    themeConfig: {algolia},-  } = siteConfig;   const history = useHistory();-  const {navigateToSearchPage} = useSearchQuery();--  function initAlgolia(focus) {-    window.docsearch({-      appId: algolia.appId,-      apiKey: algolia.apiKey,-      indexName: algolia.indexName,-      inputSelector: '#search_input_react',-      algoliaOptions: algolia.algoliaOptions,-      autocompleteOptions: {-        openOnFocus: true,-        autoselect: false,-        hint: false,-        tabAutocomplete: false,-      },-      // Override algolia's default selection event, allowing us to do client-side-      // navigation and avoiding a full page refresh.-      handleSelected: (_input, _event, suggestion) => {-        _event.stopPropagation();--        // Use an anchor tag to parse the absolute url into a relative url-        // Alternatively, we can use new URL(suggestion.url) but it's not supported in IE.-        const a = document.createElement('a');-        a.href = suggestion.url;--        // Algolia use closest parent element id #__docusaurus when a h1 page title does-        // not have an id, so we can safely remove it.-        // See https://github.com/facebook/docusaurus/issues/1828 for more details.-        const routePath =-          `#__docusaurus` === a.hash-            ? `${a.pathname}`-            : `${a.pathname}${a.hash}`;-        history.push(routePath);-      },-    });--    if (focus) {-      searchBarRef.current.focus();-    }-  }--  const loadAlgolia = (focus = true) => {-    if (algoliaLoaded) {-      return;-    }--    Promise.all([import('docsearch.js'), import('./algolia.css')]).then(-      ([{default: docsearch}]) => {-        setAlgoliaLoaded(true);-        window.docsearch = docsearch;-        initAlgolia(focus);-      },-    );-  };+  const [isOpen, setIsOpen] = useState(false); -  const toggleSearchInput = useCallback(() => {-    loadAlgolia();--    if (algoliaLoaded) {-      searchBarRef.current.focus();-    }--    handleSearchBarToggle(!isSearchBarExpanded);-  }, [isSearchBarExpanded]);--  const handleSearchInputBlur = useCallback(() => {-    handleSearchBarToggle(!isSearchBarExpanded);-  }, [isSearchBarExpanded]);+  const {+    indexName,+    appId = 'BH4D9OD16A',+    apiKey,+    searchParameters,+  } = siteConfig.themeConfig.algolia;++  const importDocSearchModalIfNeeded = useCallback(+    function importDocSearchModalIfNeeded() {

Let's use arrow functions in useCallback, OK? Otherwise it turns out some unnecessary duplication and more code.

francoischalifour

comment created time in 2 days

Pull request review commentfacebook/docusaurus

feat(v2): introduce DocSearch v3 search

  * LICENSE file in the root directory of this source tree.  */ -import React, {useState, useRef, useCallback} from 'react';-import classnames from 'classnames';-+import React, {useState, useCallback} from 'react';+import {createPortal} from 'react-dom'; import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; import {useHistory} from '@docusaurus/router';-import useSearchQuery from '@theme/hooks/useSearchQuery';+import Link from '@docusaurus/Link';+import Head from '@docusaurus/Head';+import {DocSearchButton, useDocSearchKeyboardEvents} from '@docsearch/react';++let DocSearchModal = null; -import styles from './styles.module.css';+function Hit({hit, children}) {+  return <Link to={hit.url}>{children}</Link>;+} -const Search = ({handleSearchBarToggle, isSearchBarExpanded}) => {-  const [algoliaLoaded, setAlgoliaLoaded] = useState(false);-  const searchBarRef = useRef(null);+function SearchBar() {   const {siteConfig = {}} = useDocusaurusContext();-  const {-    themeConfig: {algolia},-  } = siteConfig;   const history = useHistory();-  const {navigateToSearchPage} = useSearchQuery();--  function initAlgolia(focus) {-    window.docsearch({-      appId: algolia.appId,-      apiKey: algolia.apiKey,-      indexName: algolia.indexName,-      inputSelector: '#search_input_react',-      algoliaOptions: algolia.algoliaOptions,-      autocompleteOptions: {-        openOnFocus: true,-        autoselect: false,-        hint: false,-        tabAutocomplete: false,-      },-      // Override algolia's default selection event, allowing us to do client-side-      // navigation and avoiding a full page refresh.-      handleSelected: (_input, _event, suggestion) => {-        _event.stopPropagation();--        // Use an anchor tag to parse the absolute url into a relative url-        // Alternatively, we can use new URL(suggestion.url) but it's not supported in IE.-        const a = document.createElement('a');-        a.href = suggestion.url;--        // Algolia use closest parent element id #__docusaurus when a h1 page title does-        // not have an id, so we can safely remove it.-        // See https://github.com/facebook/docusaurus/issues/1828 for more details.-        const routePath =-          `#__docusaurus` === a.hash-            ? `${a.pathname}`-            : `${a.pathname}${a.hash}`;-        history.push(routePath);-      },-    });--    if (focus) {-      searchBarRef.current.focus();-    }-  }--  const loadAlgolia = (focus = true) => {-    if (algoliaLoaded) {-      return;-    }--    Promise.all([import('docsearch.js'), import('./algolia.css')]).then(-      ([{default: docsearch}]) => {-        setAlgoliaLoaded(true);-        window.docsearch = docsearch;-        initAlgolia(focus);-      },-    );-  };+  const [isOpen, setIsOpen] = useState(false); -  const toggleSearchInput = useCallback(() => {-    loadAlgolia();--    if (algoliaLoaded) {-      searchBarRef.current.focus();-    }--    handleSearchBarToggle(!isSearchBarExpanded);-  }, [isSearchBarExpanded]);--  const handleSearchInputBlur = useCallback(() => {-    handleSearchBarToggle(!isSearchBarExpanded);-  }, [isSearchBarExpanded]);+  const {+    indexName,+    appId = 'BH4D9OD16A',+    apiKey,+    searchParameters,+  } = siteConfig.themeConfig.algolia;

Potential bug: the siteConfig.themeConfig.algolia object may not be defined in the config file, then there will be a fatal error.

francoischalifour

comment created time in 2 days

delete branch facebook/docusaurus

delete branch : lex111/live-editor-font-issue

delete time in 2 days

pull request commentfacebook/docusaurus

fix(v2): set proper font for live editor

Old - https://deploy-preview-2822--docusaurus-2.netlify.app/docs/next/markdown-features#interactive-code-editor New - https://deploy-preview-2835--docusaurus-2.netlify.app/docs/next/markdown-features/#interactive-code-editor

lex111

comment created time in 2 days

pull request commentfacebook/docusaurus

fix(v2): set proper font for live editor

The font size in live editor is very small compared to regular code block, just see the screenshots in Test Plan.

lex111

comment created time in 2 days

PR opened facebook/docusaurus

Reviewers
fix(v2): set proper font for live editor tag: bug fix

<!-- Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to Docusaurus here: https://github.com/facebook/docusaurus/blob/master/CONTRIBUTING.md

Happy contributing!

-->

Motivation

Fix an unexpected regression due to https://github.com/facebookincubator/infima/commit/dfb1da40453000460287ba3dfa2430e9d5bc20c2

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

Before After
screenshot_21 screenshot_20

Related PRs

(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/docusaurus, and link to your PR here.)

+5 -1

0 comment

2 changed files

pr created time in 2 days

create barnchfacebook/docusaurus

branch : lex111/live-editor-font-issue

created branch time in 2 days

pull request commentthemgoncalves/react-loadable-ssr-addon

:bug: Add all chunks from stats object

@themgoncalves I got you, so I will use v0.2.2 then.

lex111

comment created time in 2 days

pull request commentthemgoncalves/react-loadable-ssr-addon

:bug: Add all chunks from stats object

@themgoncalves thank you! Although I do not understand why and how more elements can appear in chunks array. But in any case, this PR should not bring breaking changes. Could you please release a new version?

lex111

comment created time in 2 days

issue commentfacebook/docusaurus

Adding docs home page to the sidebar

Could not reproduce this issue, try removing node_modules and .docusaurus dirs, and then re-build the site.

ark120202

comment created time in 2 days

push eventphp-ru/php-doc-ru

sergey

commit sha 202fd71add8f9d41ea864579a95085a9ebe5e3ba

docs(ru): Updated to English revision git-svn-id: https://svn.php.net/repository/phpdoc/ru/trunk@349991 c90b9560-bf6c-de11-be94-00142212c4b1

view details

push time in 2 days

pull request commentthemgoncalves/react-loadable-ssr-addon

:bug: Add all chunks from stats object

We use your lib in Docusaurus, you probably remember this project.

Reproducible demo you can find here https://github.com/facebook/docusaurus/tree/repro-2244/website-build-fail

When you try to build that site by running the yarn build command, you get the error that I indicated in the issue.

This happens when the user overrides the NotFound component (see https://v2.docusaurus.io/docs/using-themes/#swizzling-theme-components). If you delete this file, then there will be no fatal errors when building the site.

I don’t understand why this is happening, I just found out that it is due to react-loadable-ssr-addon So I will be very glad if you can help with this strange error. I hope you have enough information for debugging?

lex111

comment created time in 2 days

issue closedfacebook/docusaurus

Error: Cannot find module '@docusaurus/plugin-ideal-image'

🐛 Bug Report

I am trying to use the plugin-ideal-image plugin, however despite installing and configuring, it throws an error to say it cannot find it. I can confirm that the plugin exists in my node_modules

Have you read the Contributing Guidelines on issues?

Yes

To Reproduce

  1. Install plugin-ideal-image with npm i --save @docusaurus/plugin-ideal-image. This adds the dependency "@docusaurus/plugin-ideal-image": "^2.0.0-alpha.39",

  2. Add the plugin to my docusaurus.config.js file: plugins: ['@docusaurus/plugin-ideal-image'],

  3. Import the plugin and use in my mdx file:

import Image from '@theme/IdealImage';
<Image img={require('./img.png')} />
  1. npm run start

Expected behavior

Image is loaded and displayed in documentation

Actual Behavior

Docusaurus fails to start with the below error:

Error: Cannot find module '@docusaurus/plugin-ideal-image'
Require stack:
- C:\Users\Greg\Documents\Projects\assistant-relay\doc-src\website
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:966:15)
    at Function.resolve (internal/modules/cjs/helpers.js:78:19)
    at C:\Users\Greg\Documents\Projects\assistant-relay\doc-src\website\node_modules\@docusaurus\core\lib\server\plugins\init.js:40:67
    at Array.map (<anonymous>)
    at Object.initPlugins (C:\Users\Greg\Documents\Projects\assistant-relay\doc-src\website\node_modules\@docusaurus\core\lib\server\plugins\init.js:22:10)
    at Object.loadPlugins (C:\Users\Greg\Documents\Projects\assistant-relay\doc-src\website\node_modules\@docusaurus\core\lib\server\plugins\index.js:47:28)
    at Object.load (C:\Users\Greg\Documents\Projects\assistant-relay\doc-src\website\node_modules\@docusaurus\core\lib\server\index.js:57:62)
    at start (C:\Users\Greg\Documents\Projects\assistant-relay\doc-src\website\node_modules\@docusaurus\core\lib\commands\start.js:45:34)
    at C:\Users\Greg\Documents\Projects\assistant-relay\doc-src\website\node_modules\@docusaurus\core\bin\docusaurus.js:29:5
    at Command.<anonymous> (C:\Users\Greg\Documents\Projects\assistant-relay\doc-src\website\node_modules\@docusaurus\core\bin\docusaurus.js:97:23)
    at Command.listener (C:\Users\Greg\Documents\Projects\assistant-relay\doc-src\website\node_modules\commander\index.js:370:29)
    at Command.emit (events.js:315:20)
    at Command.parseArgs (C:\Users\Greg\Documents\Projects\assistant-relay\doc-src\website\node_modules\commander\index.js:892:12)
    at Command.parse (C:\Users\Greg\Documents\Projects\assistant-relay\doc-src\website\node_modules\commander\index.js:642:21)
    at Object.<anonymous> (C:\Users\Greg\Documents\Projects\assistant-relay\doc-src\website\node_modules\@docusaurus\core\bin\docusaurus.js:120:5)
    at Module._compile (internal/modules/cjs/loader.js:1138:30)

Your Environment

<!-- Include as many relevant details about the environment you experienced the bug in -->

  • Docusaurus version used: 2.0.0-alpha.56
  • Environment name and version (e.g. Chrome 78.0.3904.108, Node.js 10.17.0): Node 12.17.0
  • Operating system and version (desktop or mobile): Windows 10 x64

closed time in 3 days

greghesp

issue commentfacebook/docusaurus

Error: Cannot find module '@docusaurus/plugin-ideal-image'

Please read the release notes carefully. https://github.com/facebook/docusaurus/releases/tag/v2.0.0-alpha.56

greghesp

comment created time in 3 days

pull request commentthemgoncalves/react-loadable-ssr-addon

:bug: Add all chunks from stats object

Hi @themgoncalves, any thoughts about this PR?

lex111

comment created time in 3 days

push eventphp-ru/php-doc-ru

sergey

commit sha 3731c56ff1003e90fdca553982af227981544d0a

docs(ru): Updated to English revision git-svn-id: https://svn.php.net/repository/phpdoc/ru/trunk@349987 c90b9560-bf6c-de11-be94-00142212c4b1

view details

push time in 3 days

push eventfacebook/docusaurus

Alexey Pyltsyn

commit sha 0047db28965e48c2ea371bc0a46c632b1eb4ca25

docs(v2): delete alpha.43

view details

push time in 3 days

issue commentfacebook/docusaurus

Mixed content warning

image

:)

benmccann

comment created time in 3 days

delete tag facebook/docusaurus

delete tag : v2.0.0

delete time in 3 days

issue closedfacebook/docusaurus

Deleting

🐛 Bug Report

Removing the following from a clean install of docusaurus v2 causes 404s:

        blog: {
          showReadingTime: true,
          // Please change this to your repo.
          editUrl:
            'https://github.com/facebook/docusaurus/edit/master/website/blog/',
        },

Have you read the Contributing Guidelines on issues?

(Write your answer here.)

To Reproduce

(Write your steps here:)

  1. run npx @docusaurus/init@next init my-website classic
  2. delete the entire blog item
  3. observe navigating to docs/doc1 results in a 404

Expected behavior

docs/doc1 should not 404 when in docs-only mode

Actual Behavior

I get a 404 when accessing docs/doc1

Your Environment

Node: v13.10.1 Chrome 81.0.4044.138

closed time in 3 days

kedarv

issue commentfacebook/docusaurus

Deleting

Fixed in v2.0.0-alpha.56.

kedarv

comment created time in 3 days

pull request commentfacebook/docusaurus

feat(v2): allow user to toggle sidebar open default

@jsjoeio nope, we just renamed the document with id "docs" to "docs-introduction"

https://github.com/facebook/docusaurus/blob/d8ebe8b2e4072376f7d02b6c61f4b9f72be4d800/website/sidebars.js#L17

https://github.com/facebook/docusaurus/pull/2682/files#diff-0983ed9e7518a0fbbe7806ed8166258cR31

jsjoeio

comment created time in 3 days

issue commentfacebook/docusaurus

Mixed content warning

Hi @benmccann this bug fixed in .56, I just checked it on my local copy of Chart.js, the docs home page feature works as expected. Sorry for long wait.

benmccann

comment created time in 3 days

release facebook/docusaurus

v2.0.0-alpha.56

released time in 3 days

created tagfacebook/docusaurus

tagv2.0.0-alpha.56

Easy to maintain open source documentation websites.

created time in 3 days

push eventfacebook/docusaurus

Alexey Pyltsyn

commit sha d8ebe8b2e4072376f7d02b6c61f4b9f72be4d800

v2.0.0-alpha.56

view details

push time in 3 days

push eventlex111/test-website

Alexey Pyltsyn

commit sha 00cfb85909948dee5216ab18e6ecac645c4717ef

Deploy website - based on 3cf1a7b9effcee529b99d39faa0afe7449b25cfb

view details

push time in 3 days

PR merged facebook/docusaurus

chore(v2): v2.0.0-alpha.56 CLA Signed

<!-- Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to Docusaurus here: https://github.com/facebook/docusaurus/blob/master/CONTRIBUTING.md

Happy contributing!

-->

Motivation

Release new version :boom:

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

Preview.

Related PRs

(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/docusaurus, and link to your PR here.)

+6088 -0

2 comments

29 changed files

lex111

pr closed time in 3 days

delete branch facebook/docusaurus

delete branch : v2.0.0-alpha.56

delete time in 3 days

push eventfacebook/docusaurus

Alexey Pyltsyn

commit sha 3cf1a7b9effcee529b99d39faa0afe7449b25cfb

chore(v2): v2.0.0-alpha.56 (#2822)

view details

push time in 3 days

PublicEvent

PR opened facebook/docusaurus

Reviewers
chore(v2): v2.0.0-alpha.56

<!-- Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to Docusaurus here: https://github.com/facebook/docusaurus/blob/master/CONTRIBUTING.md

Happy contributing!

-->

Motivation

Release new version :boom:

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

Preview.

Related PRs

(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/docusaurus, and link to your PR here.)

+6088 -0

0 comment

29 changed files

pr created time in 3 days

create barnchfacebook/docusaurus

branch : v2.0.0-alpha.56

created branch time in 3 days

push eventlex111/test-website

Alexey Pyltsyn

commit sha db9d10b968eea19934002541e1af5e57b9815e0a

Deploy website - based on 9973ae2d12258c759e215002a7740a59407021fe

view details

push time in 3 days

push eventlex111/test-website

Alexey Pyltsyn

commit sha 2b5ae7877c7b2645d51fe089bcfa102c565cc079

Deploy website - based on 9973ae2d12258c759e215002a7740a59407021fe

view details

push time in 3 days

delete branch facebook/docusaurus

delete branch : lex111/website-tweaks

delete time in 3 days

push eventfacebook/docusaurus

Alexey Pyltsyn

commit sha 9973ae2d12258c759e215002a7740a59407021fe

refactor(v2): do not use announcement bar hook unnecessarily

view details

push time in 3 days

PR opened facebook/docusaurus

chore(v2): upgrade Infima to 0.2.0-alpha.12 tag: polish

<!-- Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to Docusaurus here: https://github.com/facebook/docusaurus/blob/master/CONTRIBUTING.md

Happy contributing!

-->

Motivation

Resolve #2812.

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

Preview.

Related PRs

(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/docusaurus, and link to your PR here.)

+5 -5

0 comment

2 changed files

pr created time in 3 days

create barnchfacebook/docusaurus

branch : lex111/upg-infima-12

created branch time in 3 days

issue closedfacebook/docusaurus

(V2) Docs-only mode homepage errors with Uncaught TypeError

🐛 Bug Report

I am trying to get the new docs-only mode homepage feature merged with #2652 to work. However, I just end up with a blank screen and Cannot read property 'find' of undefined.

Have you read the Contributing Guidelines on issues?

Yes

To Reproduce

  1. I used the current docs from ORY Hydra: https://github.com/ory/hydra/tree/master/docs
  2. I renamed https://github.com/ory/hydra/tree/master/docs/docs/index.md to https://github.com/ory/hydra/tree/master/docs/docs/introduction.md and changed id: introduction in the meta
  3. I added homePageId: 'introduction' to @docusaurus/plugin-content-docs
  4. Ran npm start

Expected behavior

I should see the introduction

Actual Behavior

The page is white and empty and I am seeing uncaught errors in the console:

log.js?1afd:24 [HMR] Waiting for update signal from WDS...
index.js?5734:24 Uncaught TypeError: Cannot read property 'find' of undefined
    at DocPage (index.js?5734:24)
    at renderWithHooks (react-dom.development.js?61bb:12892)
    at mountIndeterminateComponent (react-dom.development.js?61bb:14974)
    at beginWork (react-dom.development.js?61bb:15579)
    at performUnitOfWork (react-dom.development.js?61bb:19266)
    at workLoop (react-dom.development.js?61bb:19306)
    at HTMLUnknownElement.callCallback (react-dom.development.js?61bb:149)
    at Object.invokeGuardedCallbackDev (react-dom.development.js?61bb:199)
    at invokeGuardedCallback (react-dom.development.js?61bb:256)
    at replayUnitOfWork (react-dom.development.js?61bb:18532)
    at renderRoot (react-dom.development.js?61bb:19422)
    at performWorkOnRoot (react-dom.development.js?61bb:20296)
    at performWork (react-dom.development.js?61bb:20208)
    at performSyncWork (react-dom.development.js?61bb:20182)
    at requestWork (react-dom.development.js?61bb:20051)
    at scheduleWork (react-dom.development.js?61bb:19865)
    at scheduleRootUpdate (react-dom.development.js?61bb:20526)
    at updateContainerAtExpirationTime (react-dom.development.js?61bb:20554)
    at updateContainer (react-dom.development.js?61bb:20611)
    at ReactRoot.render (react-dom.development.js?61bb:20907)
    at eval (react-dom.development.js?61bb:21044)
    at unbatchedUpdates (react-dom.development.js?61bb:20413)
    at legacyRenderSubtreeIntoContainer (react-dom.development.js?61bb:21040)
    at render (react-dom.development.js?61bb:21109)
    at eval (clientEntry.js?12b7:24)
DocPage @ index.js?5734:24
renderWithHooks @ react-dom.development.js?61bb:12892
mountIndeterminateComponent @ react-dom.development.js?61bb:14974
beginWork @ react-dom.development.js?61bb:15579
performUnitOfWork @ react-dom.development.js?61bb:19266
workLoop @ react-dom.development.js?61bb:19306
callCallback @ react-dom.development.js?61bb:149
invokeGuardedCallbackDev @ react-dom.development.js?61bb:199
invokeGuardedCallback @ react-dom.development.js?61bb:256
replayUnitOfWork @ react-dom.development.js?61bb:18532
renderRoot @ react-dom.development.js?61bb:19422
performWorkOnRoot @ react-dom.development.js?61bb:20296
performWork @ react-dom.development.js?61bb:20208
performSyncWork @ react-dom.development.js?61bb:20182
requestWork @ react-dom.development.js?61bb:20051
scheduleWork @ react-dom.development.js?61bb:19865
scheduleRootUpdate @ react-dom.development.js?61bb:20526
updateContainerAtExpirationTime @ react-dom.development.js?61bb:20554
updateContainer @ react-dom.development.js?61bb:20611
ReactRoot.render @ react-dom.development.js?61bb:20907
eval @ react-dom.development.js?61bb:21044
unbatchedUpdates @ react-dom.development.js?61bb:20413
legacyRenderSubtreeIntoContainer @ react-dom.development.js?61bb:21040
render @ react-dom.development.js?61bb:21109
eval @ clientEntry.js?12b7:24
Promise.then (async)
eval @ clientEntry.js?12b7:24
./node_modules/@docusaurus/core/lib/client/clientEntry.js @ main.js:94
__webpack_require__ @ runtime~main.js:859
fn @ runtime~main.js:151
1 @ main.js:1063
__webpack_require__ @ runtime~main.js:859
checkDeferredModules @ runtime~main.js:46
webpackJsonpCallback @ runtime~main.js:33
(anonymous) @ main.js:1
index.js?1ef8:1 The above error occurred in the <DocPage> component:
    in DocPage (created by LoadableComponent)
    in LoadableComponent (created by Context.Consumer)
    in Route (created by App)
    in Switch (created by App)
    in Route (created by PendingNavigation)
    in PendingNavigation (created by Context.Consumer)
    in withRouter(PendingNavigation) (created by App)
    in App
    in Router (created by BrowserRouter)
    in BrowserRouter

Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://fb.me/react-error-boundaries to learn more about error boundaries.
console.<computed> @ index.js?1ef8:1
logCapturedError @ react-dom.development.js?61bb:17071
logError @ react-dom.development.js?61bb:17107
update.callback @ react-dom.development.js?61bb:18019
callCallback @ react-dom.development.js?61bb:16387
commitUpdateEffects @ react-dom.development.js?61bb:16426
commitUpdateQueue @ react-dom.development.js?61bb:16417
commitLifeCycles @ react-dom.development.js?61bb:17337
commitAllLifeCycles @ react-dom.development.js?61bb:18690
callCallback @ react-dom.development.js?61bb:149
invokeGuardedCallbackDev @ react-dom.development.js?61bb:199
invokeGuardedCallback @ react-dom.development.js?61bb:256
commitRoot @ react-dom.development.js?61bb:18902
eval @ react-dom.development.js?61bb:20372
unstable_runWithPriority @ scheduler.development.js?3069:255
completeRoot @ react-dom.development.js?61bb:20371
performWorkOnRoot @ react-dom.development.js?61bb:20300
performWork @ react-dom.development.js?61bb:20208
performSyncWork @ react-dom.development.js?61bb:20182
requestWork @ react-dom.development.js?61bb:20051
scheduleWork @ react-dom.development.js?61bb:19865
scheduleRootUpdate @ react-dom.development.js?61bb:20526
updateContainerAtExpirationTime @ react-dom.development.js?61bb:20554
updateContainer @ react-dom.development.js?61bb:20611
ReactRoot.render @ react-dom.development.js?61bb:20907
eval @ react-dom.development.js?61bb:21044
unbatchedUpdates @ react-dom.development.js?61bb:20413
legacyRenderSubtreeIntoContainer @ react-dom.development.js?61bb:21040
render @ react-dom.development.js?61bb:21109
eval @ clientEntry.js?12b7:24
Promise.then (async)
eval @ clientEntry.js?12b7:24
./node_modules/@docusaurus/core/lib/client/clientEntry.js @ main.js:94
__webpack_require__ @ runtime~main.js:859
fn @ runtime~main.js:151
1 @ main.js:1063
__webpack_require__ @ runtime~main.js:859
checkDeferredModules @ runtime~main.js:46
webpackJsonpCallback @ runtime~main.js:33
(anonymous) @ main.js:1
index.js?5734:24 Uncaught (in promise) TypeError: Cannot read property 'find' of undefined
    at DocPage (index.js?5734:24)
    at renderWithHooks (react-dom.development.js?61bb:12892)
    at mountIndeterminateComponent (react-dom.development.js?61bb:14974)
    at beginWork (react-dom.development.js?61bb:15579)
    at performUnitOfWork (react-dom.development.js?61bb:19266)
    at workLoop (react-dom.development.js?61bb:19306)
    at renderRoot (react-dom.development.js?61bb:19389)
    at performWorkOnRoot (react-dom.development.js?61bb:20296)
    at performWork (react-dom.development.js?61bb:20208)
    at performSyncWork (react-dom.development.js?61bb:20182)
    at requestWork (react-dom.development.js?61bb:20051)
    at scheduleWork (react-dom.development.js?61bb:19865)
    at scheduleRootUpdate (react-dom.development.js?61bb:20526)
    at updateContainerAtExpirationTime (react-dom.development.js?61bb:20554)
    at updateContainer (react-dom.development.js?61bb:20611)
    at ReactRoot.render (react-dom.development.js?61bb:20907)
    at eval (react-dom.development.js?61bb:21044)
    at unbatchedUpdates (react-dom.development.js?61bb:20413)
    at legacyRenderSubtreeIntoContainer (react-dom.development.js?61bb:21040)
    at render (react-dom.development.js?61bb:21109)
    at eval (clientEntry.js?12b7:24)
DocPage @ index.js?5734:24
renderWithHooks @ react-dom.development.js?61bb:12892
mountIndeterminateComponent @ react-dom.development.js?61bb:14974
beginWork @ react-dom.development.js?61bb:15579
performUnitOfWork @ react-dom.development.js?61bb:19266
workLoop @ react-dom.development.js?61bb:19306
renderRoot @ react-dom.development.js?61bb:19389
performWorkOnRoot @ react-dom.development.js?61bb:20296
performWork @ react-dom.development.js?61bb:20208
performSyncWork @ react-dom.development.js?61bb:20182
requestWork @ react-dom.development.js?61bb:20051
scheduleWork @ react-dom.development.js?61bb:19865
scheduleRootUpdate @ react-dom.development.js?61bb:20526
updateContainerAtExpirationTime @ react-dom.development.js?61bb:20554
updateContainer @ react-dom.development.js?61bb:20611
ReactRoot.render @ react-dom.development.js?61bb:20907
eval @ react-dom.development.js?61bb:21044
unbatchedUpdates @ react-dom.development.js?61bb:20413
legacyRenderSubtreeIntoContainer @ react-dom.development.js?61bb:21040
render @ react-dom.development.js?61bb:21109
eval @ clientEntry.js?12b7:24
Promise.then (async)
eval @ clientEntry.js?12b7:24
./node_modules/@docusaurus/core/lib/client/clientEntry.js @ main.js:94
__webpack_require__ @ runtime~main.js:859
fn @ runtime~main.js:151
1 @ main.js:1063
__webpack_require__ @ runtime~main.js:859
checkDeferredModules @ runtime~main.js:46
webpackJsonpCallback @ runtime~main.js:33
(anonymous) @ main.js:1

Bildschirmfoto 2020-05-27 um 15 43 34

Your Environment

<!-- Include as many relevant details about the environment you experienced the bug in -->

  • Docusaurus version used: "2.0.0-alpha.55"
  • Environment name and version (e.g. Chrome 78.0.3904.108, Node.js 10.17.0): Irrelevant, happens everywhere.
  • Operating system and version (desktop or mobile): macOS

Reproducible Demo

# docusaurus.config.js

const config = require('./contrib/config.js')
const fs = require('fs')
const admonitions = require('remark-admonitions');

const links = [
]

let version = ['latest']

if (fs.existsSync('./versions.json')) {
  version = require('./versions.json');
  if (version && version.length > 0) {
    links.push({
      label: version[0],
      position: 'right',
      to: 'versions'
    });
  }
  if (version.length === 0) {
    version = ['latest']
  }
}

module.exports = {
  title: config.projectName,
  tagline: config.projectTagLine,
  url: `https://www.ory.sh/`,
  baseUrl: `/${config.projectSlug}/docs/`,
  favicon: 'img/favico.png',
  organizationName: 'ory', // Usually your GitHub org/user name.
  projectName: config.projectSlug, // Usually your repo name.
  themeConfig: {
    googleAnalytics: {
      trackingID: 'UA-71865250-1',
      anonymizeIP: true,
    },
    algolia: {
      apiKey: '8463c6ece843b377565726bb4ed325b0',
      indexName: 'ory',
      algoliaOptions: {
        facetFilters: [`tags:${config.projectSlug}`, `version:${version[0]}`],
      },
    },
    navbar: {
      logo: {
        alt: config.projectName,
        src: `img/logo-${config.projectSlug}.svg`,
        href: `https://www.ory.sh/${config.projectSlug}`
      },
      links: links
    },
    footer: {
      style: 'dark',
      copyright: `Copyright © ${new Date().getFullYear()} ORY GmbH`,
      links: [
        {
          title: 'Company',
          items: [
            {
              label: 'Imprint',
              href: 'https://www.ory.sh/imprint',
            },
            {
              label: 'Privacy',
              href: 'https://www.ory.sh/privacy',
            },
            {
              label: 'Terms',
              href: 'https://www.ory.sh/tos',
            },
          ],
        },
      ],
    },
  },
  plugins: [
    [
      "@docusaurus/plugin-content-docs",
      {
        path: config.projectSlug === 'docusaurus-template' ? 'contrib/docs' : 'docs',
        sidebarPath: require.resolve('./contrib/sidebar.js'),
        editUrl:
          `https://github.com/ory/${config.projectSlug}/edit/master/docs`,
        routeBasePath: '',
        homePageId: 'introduction',
        showLastUpdateAuthor: true,
        showLastUpdateTime: true,
        remarkPlugins: [admonitions],
      },
    ],
    [
      "@docusaurus/plugin-content-pages",
    ],
    ["@docusaurus/plugin-google-analytics"],
    ["@docusaurus/plugin-sitemap"]
  ],
  themes: [
    [
      "@docusaurus/theme-classic",
      {
        customCss: config.projectSlug === 'docusaurus-template' ? require.resolve('./contrib/theme.css') : require.resolve('./src/css/theme.css'),
      }
    ], [
      "@docusaurus/theme-search-algolia"
    ]
  ],
};

closed time in 3 days

aeneasr

delete branch facebook/docusaurus

delete branch : lex111/base-url-to-logo

delete time in 3 days

Pull request review commentfacebook/docusaurus

feat(v2): automatically add base url to logo link

 const useLogo = () => {     siteConfig: {baseUrl, themeConfig: {navbar: {logo = {}} = {}}} = {},   } = useDocusaurusContext();   const {isDarkTheme} = useThemeContext();-  const logoLink = logo.href || baseUrl;+  const logoLink = useBaseUrl(logo.href || baseUrl);

Oops, fixed. I set / as the default value which will be processed by useBaseUrl

https://github.com/facebook/docusaurus/blob/be7367b2f85c366c6343787a78f80ab1c75397b0/packages/docusaurus/src/client/exports/useBaseUrl.ts#L30-L32

lex111

comment created time in 3 days

push eventfacebook/docusaurus

Alexey Pyltsyn

commit sha ca2f8e32e048ad9e9dfa880da0a326396d5a3d87

Fix for docs non-root path

view details

push time in 3 days

PR opened facebook/docusaurus

feat(v2): automatically add base url to logo link tag: breaking change tag: new feature

<!-- Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to Docusaurus here: https://github.com/facebook/docusaurus/blob/master/CONTRIBUTING.md

Happy contributing!

-->

Motivation

This is a request from Discord chat, I think we should take care to add the base url to the logo link automatically, this is the expected behavior I suppose.

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

Set document id to navbar.logo.href and make sure base url has been added to it.

By default a slash (/) will be added (standard base url).

Nevertheless, this is BC, because previously users had to manually specify the base url (in the case of using non-standard base url)

Related PRs

(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/docusaurus, and link to your PR here.)

+1 -1

0 comment

1 changed file

pr created time in 3 days

create barnchfacebook/docusaurus

branch : lex111/base-url-to-logo

created branch time in 3 days

Pull request review commentfacebook/docusaurus

refactor(v2): various tweaks to website

 module.exports = {             {               label: 'Privacy',               href: 'https://opensource.facebook.com/legal/privacy/',-              target: '_blank',

Redundant attributes because they are automatically added.

lex111

comment created time in 4 days

PR opened facebook/docusaurus

Reviewers
refactor(v2): various tweaks to website tag: internal

<!-- Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to Docusaurus here: https://github.com/facebook/docusaurus/blob/master/CONTRIBUTING.md

Happy contributing!

-->

Motivation

  • Hold the logo higher so that it is not below the baseline of heading

screenshot_11

  • Fix highlighting of active navbar items using regexps (required many custom rules, but we can't get desired correct behavior without them)

screenshot_9

  • Versions page improvements: title and smaller upper margin (like on other pages)

  • Fix React warnings due to invalid class prop.

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

See preview.

Related PRs

(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/docusaurus, and link to your PR here.)

+159 -156

0 comment

5 changed files

pr created time in 4 days

create barnchfacebook/docusaurus

branch : lex111/website-tweaks

created branch time in 4 days

delete branch facebook/docusaurus

delete branch : lex111/search-icon-center

delete time in 4 days

pull request commentfacebook/docusaurus

feat(v2): introduce DocSearch v3 search

It is very strange why there are so few results? https://v2.docusaurus.io/search?q=doc It used to be >200 results.

francoischalifour

comment created time in 4 days

Pull request review commentfacebook/docusaurus

feat(v2): introduce DocSearch v3 search

  * LICENSE file in the root directory of this source tree.  */ -import React, {useState, useRef, useCallback} from 'react';-import classnames from 'classnames';-+import React, {useState, useCallback} from 'react';+import {createPortal} from 'react-dom'; import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; import {useHistory} from '@docusaurus/router';-import useSearchQuery from '@theme/hooks/useSearchQuery';+import Link from '@docusaurus/Link';+import Head from '@docusaurus/Head';+import {DocSearchButton, useDocSearchKeyboardEvents} from '@docsearch/react';++let DocSearchModal = null; -import styles from './styles.module.css';+function Hit({hit, children}) {+  return <Link to={hit.url}>{children}</Link>;+} -const Search = ({handleSearchBarToggle, isSearchBarExpanded}) => {-  const [algoliaLoaded, setAlgoliaLoaded] = useState(false);-  const searchBarRef = useRef(null);+function SearchBar() {   const {siteConfig = {}} = useDocusaurusContext();-  const {-    themeConfig: {algolia},-  } = siteConfig;   const history = useHistory();-  const {navigateToSearchPage} = useSearchQuery();--  function initAlgolia(focus) {-    window.docsearch({-      appId: algolia.appId,-      apiKey: algolia.apiKey,-      indexName: algolia.indexName,-      inputSelector: '#search_input_react',-      algoliaOptions: algolia.algoliaOptions,-      autocompleteOptions: {-        openOnFocus: true,-        autoselect: false,-        hint: false,-        tabAutocomplete: false,-      },-      // Override algolia's default selection event, allowing us to do client-side-      // navigation and avoiding a full page refresh.-      handleSelected: (_input, _event, suggestion) => {-        _event.stopPropagation();--        // Use an anchor tag to parse the absolute url into a relative url-        // Alternatively, we can use new URL(suggestion.url) but it's not supported in IE.-        const a = document.createElement('a');-        a.href = suggestion.url;--        // Algolia use closest parent element id #__docusaurus when a h1 page title does-        // not have an id, so we can safely remove it.-        // See https://github.com/facebook/docusaurus/issues/1828 for more details.-        const routePath =-          `#__docusaurus` === a.hash-            ? `${a.pathname}`-            : `${a.pathname}${a.hash}`;-        history.push(routePath);-      },-    });--    if (focus) {-      searchBarRef.current.focus();-    }-  }--  const loadAlgolia = (focus = true) => {-    if (algoliaLoaded) {-      return;-    }--    Promise.all([import('docsearch.js'), import('./algolia.css')]).then(-      ([{default: docsearch}]) => {-        setAlgoliaLoaded(true);-        window.docsearch = docsearch;-        initAlgolia(focus);-      },-    );-  };+  const [isOpen, setIsOpen] = useState(false); -  const toggleSearchInput = useCallback(() => {-    loadAlgolia();--    if (algoliaLoaded) {-      searchBarRef.current.focus();-    }--    handleSearchBarToggle(!isSearchBarExpanded);-  }, [isSearchBarExpanded]);--  const handleSearchInputBlur = useCallback(() => {-    handleSearchBarToggle(!isSearchBarExpanded);-  }, [isSearchBarExpanded]);+  const {+    indexName,+    appId = 'BH4D9OD16A',+    apiKey,+    searchParameters,+  } = siteConfig.themeConfig.algolia;++  const importDocSearchModalIfNeeded = useCallback(+    function importDocSearchModalIfNeeded() {+      if (DocSearchModal) {+        return Promise.resolve();+      }++      return Promise.all([+        import('@docsearch/react/modal'),+        import('@docsearch/react/style'),+      ]).then(([{DocSearchModal: Modal}]) => {+        DocSearchModal = Modal;+      });+    },+    [],+  ); -  const handleSearchInput = useCallback((e) => {-    const needFocus = e.type !== 'mouseover';+  const onOpen = useCallback(+    function onOpen() {+      importDocSearchModalIfNeeded().then(() => {+        setIsOpen(true);+      });+    },+    [importDocSearchModalIfNeeded, setIsOpen],+  ); -    loadAlgolia(needFocus);-  });+  const onClose = useCallback(+    function onClose() {+      setIsOpen(false);+    },+    [setIsOpen],+  ); -  const handleSearchInputPressEnter = useCallback((e) => {-    if (!e.defaultPrevented && e.key === 'Enter') {-      navigateToSearchPage(e.target.value);

It must be reverted.

francoischalifour

comment created time in 4 days

PR opened facebook/docusaurus

Reviewers
refactor(v2): align search icon to center on mobiles tag: polish

<!-- Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to Docusaurus here: https://github.com/facebook/docusaurus/blob/master/CONTRIBUTING.md

Happy contributing!

-->

Motivation

See Test plan.

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

Before After
screenshot_7 screenshot_8

Related PRs

(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/docusaurus, and link to your PR here.)

+1 -0

0 comment

1 changed file

pr created time in 4 days

create barnchfacebook/docusaurus

branch : lex111/search-icon-center

created branch time in 4 days

Pull request review commentfacebook/docusaurus

feat(v2): allow deploy without building website

 Deploys your site with [GitHub Pages](https://pages.github.com/). Check out the | Name | Default | Description | | --- | --- | --- | | `--out-dir` | `build` | The full path for the new output directory, relative to the current workspace. |+| `--skip-build` | `false` | Deploy website without new its building. This may be useful when using custom deploy script. |

Fixed.

lex111

comment created time in 4 days

push eventfacebook/docusaurus

Alexey Pyltsyn

commit sha 92c20c460523f7b5cf5e70e3843ae348b4abeb98

Update cli.md

view details

push time in 4 days

push eventphp-ru/php-doc-ru

sergey

commit sha 6011f7bc72f7e8434ce0c6e7e9fadb04b086cc20

docs(ru): Updated to English revision git-svn-id: https://svn.php.net/repository/phpdoc/ru/trunk@349983 c90b9560-bf6c-de11-be94-00142212c4b1

view details

push time in 5 days

push eventphp-ru/php-doc-ru

lex

commit sha 855a3913b4cd58ae9fbdf05122bd3e9a462bb3bf

Minor improvements to functions git-svn-id: https://svn.php.net/repository/phpdoc/ru/trunk@349976 c90b9560-bf6c-de11-be94-00142212c4b1

view details

lex

commit sha d985fb91e6d214b06a7284ff4573ae87ef0b4ad9

Fixes by anons git-svn-id: https://svn.php.net/repository/phpdoc/ru/trunk@349977 c90b9560-bf6c-de11-be94-00142212c4b1

view details

push time in 6 days

pull request commentfacebook/docusaurus

feat(v2): allow deploy without building website

cc @yangshun

lex111

comment created time in 6 days

pull request commentfacebook/docusaurus

fix(v2): enable scrolling for sidebar menu only

cc @yangshun

lex111

comment created time in 6 days

create barnchlex111/docusaurus

branch : exp-live-editor-scope

created branch time in 6 days

Pull request review commentfacebook/docusaurus

feat(v2): docusaurus-plugin-client-redirects

+/**+ * Copyright (c) Facebook, Inc. and its affiliates.+ *+ * This source code is licensed under the MIT license found in the+ * LICENSE file in the root directory of this source tree.+ */++import fs from 'fs-extra';+import path from 'path';+import {flatten} from 'lodash';++import {LoadContext, Plugin, Props} from '@docusaurus/types';++import {PluginOptions, RedirectsCreator} from './types';+import createRedirectPageContent from './createRedirectPageContent';+import {addTrailingSlash, getFilePathForRoutePath} from './utils';+import {+  fromExtensionsRedirectCreator,+  toExtensionsRedirectCreator,+} from './redirectCreators';++const DEFAULT_OPTIONS: PluginOptions = {+  fromExtensions: [],+  toExtensions: [],+};++type RedirectMetadata = {+  fromRoutePath: string;+  toRoutePath: string;+  toUrl: string;+  redirectPageContent: string;+  redirectAbsoluteFilePath: string;+};++type PluginContext = {+  props: Props;+  options: PluginOptions;+  redirectsCreators: RedirectsCreator[];+};++export default function pluginClientRedirectsPages(+  _context: LoadContext,+  opts: Partial<PluginOptions>,+): Plugin<unknown> {+  const options = {...DEFAULT_OPTIONS, ...opts};+  return {+    name: 'docusaurus-plugin-client-redirects',+    async postBuild(props: Props) {+      const redirectsCreators: RedirectsCreator[] = buildRedirectCreators(+        options,+      );++      const pluginContext: PluginContext = {props, options, redirectsCreators};+      // Process in 2 steps, to make code more easy to test+      const redirects: RedirectMetadata[] = collectRoutePathRedirects(+        pluginContext,+      );++      console.log('redirects=', redirects);++      await writeRedirectFiles(redirects);+    },+  };+}++function buildRedirectCreators(options: PluginOptions): RedirectsCreator[] {+  const noopRedirectCreator: RedirectsCreator = (_routePath: string) => [];+  return [+    fromExtensionsRedirectCreator(options.fromExtensions),+    toExtensionsRedirectCreator(options.toExtensions),+    options.createRedirects ?? noopRedirectCreator,+  ];+}++function collectRoutePathRedirects(+  pluginContext: PluginContext,+): RedirectMetadata[] {+  return flatten(+    pluginContext.redirectsCreators.map((redirectCreator) => {+      return createRoutesPathsRedirects(redirectCreator, pluginContext);+    }),+  );+}++// Create all redirects for a list of route path+function createRoutesPathsRedirects(+  redirectCreator: RedirectsCreator,+  pluginContext: PluginContext,+): RedirectMetadata[] {+  return flatten(+    pluginContext.props.routesPaths.map((routePath) =>+      createRoutePathRedirects(routePath, redirectCreator, pluginContext),+    ),+  );+}++// Create all redirects for a single route path+function createRoutePathRedirects(+  routePath: string,+  redirectCreator: RedirectsCreator,+  {props}: PluginContext,+): RedirectMetadata[] {+  const {siteConfig, outDir} = props;++  // TODO do we receive absolute urls???+  if (!path.isAbsolute(routePath)) {+    return [];+  }++  // TODO addTrailingSlash ?+  const toUrl = addTrailingSlash(`${siteConfig.url}${routePath}`);++  const redirectPageContent = createRedirectPageContent({toUrl});++  const fromRoutePaths: string[] = redirectCreator(routePath) ?? [];++  return fromRoutePaths.map((fromRoutePath) => {+    const redirectAbsoluteFilePath = path.join(+      outDir,+      getFilePathForRoutePath(fromRoutePath),+    );+    return {+      fromRoutePath,+      toRoutePath: routePath,+      toUrl,+      redirectPageContent,+      redirectAbsoluteFilePath,+    };+  });+}++async function writeRedirectFiles(redirects: RedirectMetadata[]) {+  async function writeRedirectFile(redirect: RedirectMetadata) {+    try {+      await fs.writeFile(

Alright, if so, otherwise in certain cases the website building may be finished before the redirect files are generated.

slorber

comment created time in 6 days

Pull request review commentfacebook/docusaurus

feat(v2): docusaurus-plugin-client-redirects

+/**+ * Copyright (c) Facebook, Inc. and its affiliates.+ *+ * This source code is licensed under the MIT license found in the+ * LICENSE file in the root directory of this source tree.+ */++type CreateRedirectPageOptions = {+  toUrl: string;+};++export default function createRedirectPageContent({+  toUrl,+}: CreateRedirectPageOptions) {+  return `+<!DOCTYPE html>+<html lang="en-US">+  <head>+    <meta charset="UTF-8">+       <meta http-equiv="refresh" content="0; url=${toUrl}">+    <script>+      const redirectLink = '${toUrl}' + location.search + location.hash;+      document.write('<link rel="canonical" href="' + redirectLink + '">');+      document.write('<title>Redirecting to ' + redirectLink + '</title>');+      document.write('</head>')+      document.write('<body>')+      document.write('If you are not redirected automatically, follow this <a href="' + redirectLink + '">link</a>.')+      document.write('</body>')+      setTimeout(() => {+        window.location.assign(redirectLink)

Oh yes, this is an old-fashion version of browser redirect. We had better remove setTimeout and document.write calls.

slorber

comment created time in 6 days

push eventphp-ru/php-doc-ru

sergey

commit sha 344bc45e212532148a18d3104cc42652d2b87fbc

docs(ru): Updated to English revision git-svn-id: https://svn.php.net/repository/phpdoc/ru/trunk@349975 c90b9560-bf6c-de11-be94-00142212c4b1

view details

push time in 6 days

push eventphp-ru/php-doc-ru

sergey

commit sha 235f144b976bdb7453b33fcf6b99e2becea7be2a

docs(ru): Updated to English revision git-svn-id: https://svn.php.net/repository/phpdoc/ru/trunk@349966 c90b9560-bf6c-de11-be94-00142212c4b1

view details

push time in 7 days

pull request commentfacebook/docusaurus

docs(v2): add trailing slash to external links

We recently made external links open in a new tab, however this will not work for links that look like files. See for yourself, on the page https://v2.docusaurus.io/docs/contributing/ click on "Docusaurus 2".

Docusaurus 2 is currently under alpha development

The same thing I tried to reflect in #2802.

lex111

comment created time in 7 days

pull request commentjavascript-tutorial/ru.javascript.info

Ошибка в окончании

@pew-rivza спасибо! :)

pew-rivza

comment created time in 7 days

push eventjavascript-tutorial/ru.javascript.info

Екатерина Пугачева

commit sha 1144d196615fa575d64a904244682adbeda46e56

Ошибка в окончании Тут окончание -и, так как слово употреблено в предложном падеже

view details

Alexey Pyltsyn

commit sha 7cd21cd6f0de2f56e255a6d7ae134f14514d565c

Merge pull request #956 from pew-rivza/patch-7 Ошибка в окончании

view details

push time in 7 days

PR merged javascript-tutorial/ru.javascript.info

Ошибка в окончании needs +1

Тут окончание -и, так как слово употреблено в предложном падеже

+1 -1

1 comment

1 changed file

pew-rivza

pr closed time in 7 days

issue commentfacebook/docusaurus

docusaurus 2 images are broken on local

Could we get more details? How to reproduce this issue?

bhaskey

comment created time in 7 days

issue commentfacebook/docusaurus

Progressive Web App

FYI we already have a PR (oldest from actives ones) for that, but it is under review. https://github.com/facebook/docusaurus/pull/2205

Another reminder for @yangshun :)

fishcharlie

comment created time in 7 days

Pull request review commentfacebook/docusaurus

feat(v2): docusaurus-plugin-client-redirects

+/**+ * Copyright (c) Facebook, Inc. and its affiliates.+ *+ * This source code is licensed under the MIT license found in the+ * LICENSE file in the root directory of this source tree.+ */++import path from 'path';++export function addTrailingSlash(str: string) {+  return str.endsWith('/') ? '' : '/';+}++export function removeTrailingSlash(str: string) {+  return str.endsWith('/') ? str.substr(0, str.length - 2) : str;

Could we do this? str.substr(0, str.length - 2) -> str.slice(0, -1)

It should be faster.

slorber

comment created time in 7 days

Pull request review commentfacebook/docusaurus

feat(v2): docusaurus-plugin-client-redirects

+/**+ * Copyright (c) Facebook, Inc. and its affiliates.+ *+ * This source code is licensed under the MIT license found in the+ * LICENSE file in the root directory of this source tree.+ */++import fs from 'fs-extra';+import path from 'path';+import {flatten} from 'lodash';++import {LoadContext, Plugin, Props} from '@docusaurus/types';++import {PluginOptions, RedirectsCreator} from './types';+import createRedirectPageContent from './createRedirectPageContent';+import {addTrailingSlash, getFilePathForRoutePath} from './utils';+import {+  fromExtensionsRedirectCreator,+  toExtensionsRedirectCreator,+} from './redirectCreators';++const DEFAULT_OPTIONS: PluginOptions = {+  fromExtensions: [],+  toExtensions: [],+};++type RedirectMetadata = {+  fromRoutePath: string;+  toRoutePath: string;+  toUrl: string;+  redirectPageContent: string;+  redirectAbsoluteFilePath: string;+};++type PluginContext = {+  props: Props;+  options: PluginOptions;+  redirectsCreators: RedirectsCreator[];+};++export default function pluginClientRedirectsPages(+  _context: LoadContext,+  opts: Partial<PluginOptions>,+): Plugin<unknown> {+  const options = {...DEFAULT_OPTIONS, ...opts};+  return {+    name: 'docusaurus-plugin-client-redirects',+    async postBuild(props: Props) {+      const redirectsCreators: RedirectsCreator[] = buildRedirectCreators(+        options,+      );++      const pluginContext: PluginContext = {props, options, redirectsCreators};+      // Process in 2 steps, to make code more easy to test+      const redirects: RedirectMetadata[] = collectRoutePathRedirects(+        pluginContext,+      );++      console.log('redirects=', redirects);++      await writeRedirectFiles(redirects);+    },+  };+}++function buildRedirectCreators(options: PluginOptions): RedirectsCreator[] {+  const noopRedirectCreator: RedirectsCreator = (_routePath: string) => [];+  return [+    fromExtensionsRedirectCreator(options.fromExtensions),+    toExtensionsRedirectCreator(options.toExtensions),+    options.createRedirects ?? noopRedirectCreator,+  ];+}++function collectRoutePathRedirects(+  pluginContext: PluginContext,+): RedirectMetadata[] {+  return flatten(+    pluginContext.redirectsCreators.map((redirectCreator) => {+      return createRoutesPathsRedirects(redirectCreator, pluginContext);+    }),+  );+}++// Create all redirects for a list of route path+function createRoutesPathsRedirects(+  redirectCreator: RedirectsCreator,+  pluginContext: PluginContext,+): RedirectMetadata[] {+  return flatten(+    pluginContext.props.routesPaths.map((routePath) =>+      createRoutePathRedirects(routePath, redirectCreator, pluginContext),+    ),+  );+}++// Create all redirects for a single route path+function createRoutePathRedirects(+  routePath: string,+  redirectCreator: RedirectsCreator,+  {props}: PluginContext,+): RedirectMetadata[] {+  const {siteConfig, outDir} = props;++  // TODO do we receive absolute urls???+  if (!path.isAbsolute(routePath)) {+    return [];+  }++  // TODO addTrailingSlash ?+  const toUrl = addTrailingSlash(`${siteConfig.url}${routePath}`);++  const redirectPageContent = createRedirectPageContent({toUrl});++  const fromRoutePaths: string[] = redirectCreator(routePath) ?? [];++  return fromRoutePaths.map((fromRoutePath) => {+    const redirectAbsoluteFilePath = path.join(+      outDir,+      getFilePathForRoutePath(fromRoutePath),+    );+    return {+      fromRoutePath,+      toRoutePath: routePath,+      toUrl,+      redirectPageContent,+      redirectAbsoluteFilePath,+    };+  });+}++async function writeRedirectFiles(redirects: RedirectMetadata[]) {+  async function writeRedirectFile(redirect: RedirectMetadata) {+    try {+      await fs.writeFile(

Please use sync file write (see https://github.com/facebook/docusaurus/pull/2530 for more details and examples).

slorber

comment created time in 7 days

Pull request review commentfacebook/docusaurus

feat(v2): docusaurus-plugin-client-redirects

+/**+ * Copyright (c) Facebook, Inc. and its affiliates.+ *+ * This source code is licensed under the MIT license found in the+ * LICENSE file in the root directory of this source tree.+ */++import {RedirectsCreator} from './types';+import {removeTrailingSlash} from './utils';++export function fromExtensionsRedirectCreator(+  extensions: string[],+): RedirectsCreator {+  const dottedExtensions = extensions.map((ext) => `.${ext}`);+  return (fromRoutePath: string) => {+    const extensionMatch = dottedExtensions.find((ext) =>+      fromRoutePath.endsWith(`.${ext}`),+    );+    if (extensionMatch) {

I would change the extensionMatch const name to something more understandable, maybe foundExtension?

slorber

comment created time in 7 days

Pull request review commentfacebook/docusaurus

feat(v2): docusaurus-plugin-client-redirects

+/**+ * Copyright (c) Facebook, Inc. and its affiliates.+ *+ * This source code is licensed under the MIT license found in the+ * LICENSE file in the root directory of this source tree.+ */++type CreateRedirectPageOptions = {+  toUrl: string;+};++export default function createRedirectPageContent({+  toUrl,+}: CreateRedirectPageOptions) {+  return `+<!DOCTYPE html>

How about using Eta to render an HTML template from separated file? You can find an example below: https://github.com/facebook/docusaurus/blob/368eb4279ff6a1f26d134a2349e2ebd8d9c35644/packages/docusaurus/src/client/serverEntry.js#L64

slorber

comment created time in 7 days

more