Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: pre-build script #3

Merged
merged 2 commits into from
Apr 21, 2021
Merged

build: pre-build script #3

merged 2 commits into from
Apr 21, 2021

Conversation

molant
Copy link
Contributor

@molant molant commented Apr 20, 2021

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
  5. Generates the sidebar using the folder structure

Ref: Solves parts of #2

@molant molant requested a review from erickzhao April 20, 2021 19:26
@molant molant force-pushed the feat/pre-build branch 2 times, most recently from e16a936 to 8dbbed4 Compare April 20, 2021 22:23
@molant molant mentioned this pull request Apr 20, 2021
23 tasks
scripts/tasks/md-fixers.js Outdated Show resolved Hide resolved
sidebars.js Outdated Show resolved Hide resolved
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
"request": "launch",
"name": "Launch Program",
"skipFiles": ["<node_internals>/**"],
"program": "${workspaceFolder}/scripts/pre-build.js",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this version controlled?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd keep it in case someone else in the future wants to debug using vs code so they don't have to create it, although I should change the name.

@@ -0,0 +1,80 @@
{
"docs/experimental.md": "docs/api/experimental.md",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a non-blocking comment, but I'm wondering if re-organizing the contents of the /docs folder is truly necessary for our purposes. Doing this will break existing URLs, and is not necessary for the sidebar configuration.

I guess it would make navigating through the docs on GitHub a bit easier?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is truly necessary for our purposes.

My preference would be to have the content reorganization upstream so developers have an easier way finding things and knowing where things should go. If we don't use the paths, then we will have to force contributors to use a particular property in frontmatter indicating the category.

Doing this will break existing URLs,

Maybe we can look at the current analytics and see how much direct traffic goes to those pages. If it's significant we can probably create a redirect . TBH, I'd rather have something meaningful in the URL than putting everything under tutorial:

screenshot of the code signing document path locally: https://localhost:3000/docs/distribution/code-signing

screenshot of the code signing document in production: https://www.electronjs.org/docs/tutorials/code-signing

I guess it would make navigating through the docs on GitHub a bit easier?

Once we upstream the new location it should make it easier to navigate and to contribute.

@molant molant merged commit c914929 into master Apr 21, 2021
@molant molant deleted the feat/pre-build branch April 26, 2021 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants