You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/delta-site/src/pages/resources/contributing-to-docs.md
+11-19Lines changed: 11 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -9,52 +9,44 @@ Like answering questions, contributing to documentation is an important place wh
9
9
10
10
The Delta.io website, documentation, and the issues that need to be worked on can be found [here in the issues section](https://github.com/delta-io/website/issues) of the Github repository. This is also a great place to propose your own issues and solutions with the current documentation.
11
11
12
-
The website is built on top of the Gatsby.js framework which allows us to build the content of the website using **`MDX`**- Markdown eXtension thus making things easy to create and edit. This will also simplify version control because we put the **`mdx`** files directly into GitHub. This approach allows the community to edit the delta.io website and documentation directly.
12
+
The site is generated by Astro (specifically the [Starlight theme](https://starlight.astro.build/guides/pages/)). This allows us to build the content of the website using **`MD`**files thus making things easy to create and edit. This will also simplify version control because we put the **`MD`** files directly into GitHub. This approach allows the community to edit the delta.io website and documentation directly.
13
13
14
14
Initial setup to contribute to [Delta.io](http://Delta.io)
15
15
16
-
- Use your favorite IDE to edit these **`mdx`** files. We suggest Visual Studio Code if you don’t have a preference
16
+
- Use your favorite IDE to edit these **`MD`** files. We suggest Visual Studio Code if you don't have a preference
17
17
- Install _Visual Studio Code_
18
-
- Install _MDX Preview_ and _Prettier - Code formatter_extensions
18
+
- Install _Prettier - Code formatter_extension
19
19
- Fork the https://github.com/delta-io/website site to your own (e.g. https://github.com/dennyglee/website) so you can make edits to your fork of the site.
20
-
-**NOTE:** Most of the changes we will be doing are in the **`src`** folder.
20
+
-**NOTE:** Most of the changes we will be doing are in the **`packages/delta-site/src/content/blog`** folder.
21
21
22
22
## Adding a new blog to [Delta.io](http://Delta.io)
23
23
24
24
To demonstrate how a contributor can add or edit content to Delta.io, we will step through how to add a new blog to the site.
25
25
26
-
- Each blog is stored as its own separate folder in the **`$/../src/blog`** folder organized by date.
26
+
- Each blog is stored as its own separate folder in the **`packages/delta-site/src/content/blog`** folder organized by date.
27
27
- Each folder contains an **`index.mdx`** file (Markdown extension) plus the associated images
28
28
- There typically is a thumbnail.png which is the image that shows up on the https://delta.io/blog as a featured image
29
29
- You can also include any other images that are needed for the blog.
30
30
- To create a new blog, start by creating a new folder in your own fork of the site; the following is the view from VS Code (right-click on blogs, click on New folder). Follow the same naming convention of YYYY-MM-DD-name_of_blog for the folder name
31
-
- Copy a previous blog’s **`index.mdx`** and ensure to update the metadata at the top of the blog.
31
+
- Copy a previous blog's **`index.mdx`** and ensure to update the metadata at the top of the blog.
32
32
- Note that there is a **`./thumbnail.png`** reference, copy an image to the same folder and rename it as **`./thumbnail.png`** OR update the metadata key thumbnail with the path of the image. Ensure the image file name is PNG and does not have any spaces in the name.
33
-
- If you want to copy/paste an existing blog (e.g. old delta.io site) over to the new site, you can use the copy/paste HTML to markdown tool at: https://euangoddard.github.io/clipboard2markdown/
34
-
- If you have _MDX Preview_ extension installed, with the magnifying glass icon on the top right you can preview your blog such as the following screenshot.
35
33
36
34
## Creating a pull request and deploying
37
35
38
36
After completing changes locally, like the one above, you can now push to Github and deploy them using the steps below:
39
37
40
-
- Once you have completed your edits, commit these changes to your fork. The following is a screenshot from the VS Code Source Control window. Ensure you add a description (e.g. “Adding Delta Survey 09/16/2021 blog”) and click on the checkmark box to commit changes.
38
+
- Once you have completed your edits, commit these changes to your fork. The following is a screenshot from the VS Code Source Control window. Ensure you add a description (e.g. "Adding Delta Survey 09/16/2021 blog") and click on the checkmark box to commit changes.
41
39
- Go to your branch and create a new pull request to master. Once you do this, a number of checks will automatically be performed and a staging site will be generated. This allows reviewers to both see the file diff as well as the preview of what the site will look like.
42
40
43
-
**NOTE:** This preview will take some time.
44
-
45
-
You can view an example of this at: https://github.com/jakebellacera/delta-lake/pull/15
46
-
47
41
-**NOTE:** Netlify (bot) allows you to explore the source changes, inspect the deploy log, and browse the preview. To view the changes, click on the browser preview link. For example,
48
42
- The browser preview link above is: https://deploy-preview-15--delta-lake.netlify.app/
49
43
- Clicking on it reviews the entire site staged for your review.
50
-
- Since this is a blog, click on [blog] and then you’ll notice the survey blog (in this example) posted to the top left.
44
+
- Since this is a blog, click on [blog] and then you'll notice the survey blog (in this example) posted to the top left.
51
45
- Presuming all checks are passed, the changes are then subsequently merged into your commit.
52
46
53
47
## Running the website locally
54
48
55
-
To run the website locally, run the command **`npm run develop`** from the repo folder. If you have never done this before, you first set up npm. To do so, run the following commands:
49
+
To run the website locally, run the command **`YOUTUBE_API_KEY=<string> pnpm --filter delta-site dev`** from the repo folder. If you have never done this before, you first set up npm. To do so, run the following commands:
56
50
57
-
-**`npm i -g gatsby-cli`**
58
-
-**`npm install --save`**
59
-
-**`npm run develop`**
60
-
- When it is finished, you will be given the localhost url, http://localhost:8000/ to view your site.
51
+
- pnpm i
52
+
- YOUTUBE_API_KEY=<string> pnpm --filter delta-site dev
0 commit comments