Add support for custom parameterization in the fiddle's code block header.
Example:
```javascript fiddle='docs/fiddles/features/keyboard-shortcuts/web-apis|focus=renderer.js'
```
This will default the focused tab to `renderer.js`. To minimize focus issues as fiddles are changed,
if the provided file is not found a compile-time error will occur.
Co-authored-by: Ethan Arrowood <ethan@arrowood.dev>
Co-authored-by: Erick Zhao <erick@hotmail.ca>
This commit adds support to respond to `repository_dispatch` events
coming from `electron/electron-website-updater` that contain the
SHA of the new commit in `electron/electron` to pin to in
`package.json`.
More information about the architecture can be found in #19.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Fix#19Close#23
Add the top navigation link "Examples" and a new page that explains how
to acquire Fiddle and run the examples available in the sidebar.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Close#26
Partial work on #2
Co-authored-by: Erick Zhao <erick@hotmail.ca>
With the update to .75 the titles are hidden and `hide_title` has to be
disabled. It was enabled initially because otherwise titles were
duplicated (one from frontmatter, the other from the markdown).
Enables CI via GitHub actions. Additionally it uses the action
`bahmutov/npm-install` to reduce the process of installing
dependencies by ~40%.
- - - - - - - - - - - - - - - - - - - -
Close#25
Enable docsearch module with provided configuration by algolia.
Currently the search does not seem to work when `contextSearch` is
enabled. This seems to be a temporary issue per Clement's mail:
> As the DocSearch plugin is not active yet, you won't be able to use
the Docusaurus `contextualSearch` option until next crawl.
While this feature is not necessary (there are no versioned docs),
it seems like the search results page has it enabled by default
always ([1]) so might as well have it enabled everywhere to make sure it
works.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[1]: https://github.com/temporalio/documentation/pull/357/files#r616656533
Ref: https://github.com/facebook/docusaurus/issues/3805
Part of #2Close#22
Without the `bin` property in `package.json` and `#!` at the top of
`index.js` the command `npm create electron-documenation` does not
work properly.
- - - - - - - - - - - - - - - - - -
Close#17
* feat: add `create-electron-documentation` package
Add the code for the package `create-electron-documentation` to help
writers of Electron documentation scaffold their examples faster and
following good patterns (using `sandbox` and `contextBridge`).
Once published the developers will use it by calling
```console
npm create electron-documentation
```
From a folder under the main Electron documentation folder.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Fix#12Close#13
Use `json5` to `stringify` the content of `sidebars` so it can be read
as a regular JS object instead of a JSON one.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Fix#15Close#16
Separates the existing API docs into:
* Main process
* Renderer process
* Structures
* Custom DOM elements
All other pages that don't fit neatly in a bucket are under
miscellaneous but will be moved to other sections.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Close#14
This PR allows developers to pass a parameter to indicate where in the
file system the `prebuild` script should look for the documentation. It
assumes it is a clone of `electron/electron` so the content should be
under a `/docs` folder. E.g.:
```console
yarn prebuild ../electron
```
In the future there might be a `watch` option enabled by default. This
is the MVP for #4.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Fix#4Close#9
This change makes sure that `sidebars.js` is not generated from scratch
each time that `prebuild` is called:
- New content is added at the end of the corresponding category or in
a new one if it does not exist.
- If no new content is found, `sidebars.js` is left unmodified.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Fix#8
The documentation in `electron/electron` uses the current format to
embed a fiddle:
```
```javascript fiddle='docs/fiddles/screen/fit-screen'
```
The new fiddle remark plugin uses:
```
```fiddle docs/fiddles/example
```
This PR updates all the old style to use the new one.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Ref https://github.com/electron/electronjs.org-new/pull/5
The pre-build scripts does the following:
1. Downloads the documentation from electron/electron and data/blog
from electron/electronjs.org
2. Moves the files to the right folders based on the contents of
`docs-reorg.json`
3. Add frontmatter to each file
4. Fixes internal links and multiline image titles
5. Generates the sidebar using the folder structure
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Fix#6
Ref: Solves parts of #2