Граф коммитов

13 Коммитов

Автор SHA1 Сообщение Дата
Erick Zhao fb5a601db7
docs: update i18n/README.md (#531) 2024-03-04 13:06:01 -08:00
Erick Zhao acff234dbc
feat: add apps showcase section (#249) 2022-09-06 16:58:32 -07:00
Antón Molleda 707718fa7a fix: new docs process
The `.gitignore` was too aggressive and new files under `docs/latest`
weren't added. Now we ignore the `vXX-y-z` folders.

Also tweaked the `sidebars.js` creation process so new tutorials are
added under `How To` instead of creating a new section.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Rel #95
2021-10-22 09:54:33 -07:00
Antón Molleda 17a1bd6872 feat: versioned docs
The way versioned documents are supported on the site differs a bit from
Docusaurus' documentation:

- Each doc change to a branch is build and publish separately.
- The links to the versions are `_blank` to bypass `react-router` even
  though the content is in the same server. The reason is that because
  it is built at different steps it is not "found".

This is achieve thanks to `electron-website-updater` sending a
`repository_dispatch` event with 2 different types of actions for each
`push` event that happens in `electron/electron` that contains doc
changes. The 2 types of events are:

* `doc_changes_branches`: Updates to documentation branches (does not
  matter if they are the latest or not).
* `doc_changes`: Updates to the latest stable branch.

The tasks to perform are almost identical and are split in two different
GitHub actions for each event:

1. Download the markdown for the SHA, check if there are new version
   branches and update `versions-info.json`, update the SHA, and publish
   those changes to Git.
   This is done in `update-docs-XXX.yml` when we receive the event.
2. Build the content for that branch and publish in the right place.
   This is done in `push-XXX.yml` when there is a push to `main` or a
   `vXX` branch.

The deployment is done to the storage service. The difference is that a
branch will only push `assets` and `docs` while `main` will publish
everything.

Additionally, Crowdin gets updated every time there is a change in
`main` to make sure the latest content is always uploaded.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Fix #118
2021-10-21 17:36:22 -07:00
Antón Molleda 8fb226af91 feat: Crowdin integration
Integrates with Crowdin to enable i18n of the site. This PR changes the
source of truth for Crowdin and moves it to this repository instead of
relying on `electron/i18n`.

Additionally it uses Crowdin's CLI to do the upload/download of assets
making it more reliable.

The website is built on locale at a time via `yarn i18n:build`.
Otherwise the process crashed with an out of memory error. The regular
`yarn build` command still compiles the `en` locale.

Because we cannot get notifications when there are new translations
avaiable, there is a GitHub workflow (`update-i18n-deploy.yml`) that
downloads the content every few minutes, builds, and deploy. To speed up
this process, the previous generated assets are download. In local tests
this reduces the build times from 250s to 40s so the whole process
should take about 5 minutes.

The previous generated content is stored in Azure Storage. Because this
is a static website it makes more sense than having a dyno and will make
it easier to:
- deploy multiple locales at the same time if we still need to speed up
  the process
- have versioned docs because we just need to "take a snapshot" and
  publish to a different folder

The current live site is still not using this storage but will soon-ish.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Fix #64
2021-10-11 06:09:39 -07:00
Antón Molleda b6fc413776 docs: track electron documentation
Rel: https://github.com/electron/electronjs.org-new/issues/64#issuecomment-931738721
2021-10-06 10:10:17 -07:00
Antón Molleda 5e4353e91a feat: activate blog plugin
Activate Docusaurus' blog plugin and make the previous posts available
in the new site.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Fix #71
2021-07-21 13:08:13 -07:00
Antón Molleda 11a0f9d3f1
build: update content when upstream changes
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 #19
Close #23
2021-05-13 21:08:47 -07:00
Antón Molleda 850daca67f chore: fixes for static publishing
Fix broken links and ignore static output folder (`build/`)
2021-04-26 12:29:39 -07:00
Antón Molleda 5b9da1ecfb feat: preserve sidebar order with new content
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
2021-04-26 06:44:20 -07:00
Antón Molleda 972a54e1d7 build: pre-build script
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
2021-04-21 14:44:15 -07:00
Erick Zhao 6627f6ccbb chore: update .gitignore 2021-03-23 10:19:42 -07:00
Erick Zhao 050bce8180 chore: npx docusaurus 2021-03-22 15:04:52 -07:00