:electron: The Electron website
Перейти к файлу
Keeley Hammond 6201995d63
Merge pull request #310 from electron/electron22-blog-post
chore: Electron 22 blog post
2022-11-30 14:53:04 -08:00
.github fix(build): remove caching step (#322) 2022-11-29 13:12:44 -08:00
.vscode feat: activate blog plugin 2021-07-21 13:08:13 -07:00
blog Merge pull request #310 from electron/electron22-blog-post 2022-11-30 14:53:04 -08:00
create-electron-documentation chore: update repo name (#305) 2022-11-22 15:25:57 -08:00
docs/latest chore: update ref to docs (🤖) 2022-11-30 21:21:46 +00:00
i18n chore(i18n): run write-translations (#323) 2022-11-30 12:55:58 -08:00
scripts build: remove unused versioned docs scripts (#327) 2022-11-30 13:40:45 -08:00
src fix(api-structures): make transform work with i18n builds (#320) 2022-11-29 12:39:05 -08:00
static feat: more homepage improvements (#308) 2022-11-25 12:39:02 -08:00
.env.example docs: add CrowdIn token to env (#173) 2022-02-11 10:25:38 -08:00
.eslintrc.js fix(api-structures): make transform work with i18n builds (#320) 2022-11-29 12:39:05 -08:00
.gitignore feat: add apps showcase section (#249) 2022-09-06 16:58:32 -07:00
.prettierrc build: pre-build script 2021-04-21 14:44:15 -07:00
LICENSE chore: add license 2021-05-17 12:05:40 -07:00
README.md chore: update repo name (#305) 2022-11-22 15:25:57 -08:00
app.json fix: absolute redirects in production 2021-06-04 14:14:30 -07:00
babel.config.js chore: npx docusaurus 2021-03-22 15:04:52 -07:00
crowdin.yml feat: Crowdin integration 2021-10-11 06:09:39 -07:00
docusaurus.config.js build: remove unused versioned docs scripts (#327) 2022-11-30 13:40:45 -08:00
jest.config.js build: update content when upstream changes 2021-05-13 21:08:47 -07:00
package.json fix(api-structures): make transform work with i18n builds (#320) 2022-11-29 12:39:05 -08:00
sidebars.js fix: prune docs for electron 22 (#324) 2022-11-29 22:56:00 -08:00
static.json fix: show docusaurus 404 page on error 2021-07-06 19:58:23 -07:00
versions-info.json chore: update ref to docs (🤖) 2022-11-30 06:06:42 +00:00
yarn.lock chore: update @actions/core (#317) 2022-11-29 01:28:45 -08:00

README.md

electronjs.org

This repository contains the code for the Electron website. It is built using Docusaurus 2, a modern static website generator.

Installation

yarn install

How to modify the documentation

For English documentation the changes need to happen upstream in [electron/electron]. These changes are picked automatically as soon as they are done in the stable branch. The exception is when there is a new major release.

The translation work happens in Crowdin and the changes are picked up periodically every 15 minutes.

Any documentation changes done manually in this repo will be eventually override by any of these updates.

How to add a new blogpost

To add a new blogpost you need to create a new markdown file under /blog. The supported frontmatter options are the ones documented in Docusaurus.

There are a couple of things that are different compared to the previous blog engine:

  1. There can only be one author. If there are several people working on a post please sign it at the end.
  2. The frontmatter date property with the format YYYY-MM-DD is not supported. The options to indicate the date are:
    • Write the date in the filename: YYYY-MM-DD-blogpost-slug
    • Use the output of (new Date('YYYY-MM-DD')).toString() and paste it in the frontmatter section:
      date: 2019-05-13T00:00:00.000Z
      

To see your changes (and have hot-reload), run the following commands:

yarn pre-build
yarn start

Note: yarn pre-build is only necessary the first time to get content under /docs.

Local Development

If you want to use the contents from electron/electron run the following:

yarn pre-build
yarn start

If you want the website to pick your local documentation, run:

yarn pre-build ../relative/path/to/local/electron/repo
yarn start

For example, if you have the following structure:

└── projects
     ├─ electron
     ├─ electronjs.org-new
     ├─ ...

and assuming your prompt is in /projects/electronjs.org-new/ you will have to run:

yarn pre-build ../electron
yarn start

yarn start starts a local development server and open up a browser window. Most changes are reflected live without having to restart the server.

Repository content organization

This repository contains the code for 2 related things:

The content of this repository is organized as follows:

└─ root
    |
    ├─ .github/workflows → The definitions for the GitHub actions
    |
    |
    ├─ create-electron-documentation → Code for the npm package
    |        of the same name. Read the readme in the folder
    |        for more information.
    |
    ├─ scripts → The code for the package.json tasks and GitHub
    |        actions
    |
    ├─ spec → Tests for the scripts
    |
    ├─ src → Docusaurus code
    |
    ├─ static → Docusaurus static assets