Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
16 changes: 0 additions & 16 deletions .devcontainer/Dockerfile

This file was deleted.

29 changes: 0 additions & 29 deletions .devcontainer/devcontainer.json

This file was deleted.

4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

51 changes: 0 additions & 51 deletions .eslintrc.js

This file was deleted.

5 changes: 5 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## What changed?

Write a short description of your changes.

## Screenshot
18 changes: 0 additions & 18 deletions .github/workflows/build-checks.yml

This file was deleted.

36 changes: 36 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Pull request workflow

on:
pull_request:

jobs:
lint:
name: Linting and formatting checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "22.14.0"
- uses: pnpm/action-setup@v4
- run: pnpm install
- run: pnpm lint
- run: pnpm format
test:
name: Run tests
runs-on: ubuntu-latest
strategy:
matrix:
package:
- delta-theme
- delta-site
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "22.14.0"
- uses: pnpm/action-setup@v4
- run: pnpm install
- run: pnpm --filter ${{ matrix.package }} test:ci
27 changes: 23 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,26 @@
# build output
dist/

# generated types
.astro/

# dependencies
node_modules/
.cache/
public

# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*

# environment variables
.env
.env.production

# macOS-specific files
.DS_Store

# jetbrains setting folder
.idea/
.env.development
.env.production

.env
5 changes: 1 addition & 4 deletions .husky/pre-commit
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
lint-staged
1 change: 0 additions & 1 deletion .node-version

This file was deleted.

1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v22.14.0
13 changes: 7 additions & 6 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/.cache
/.husky
/node_modules
/public
/coverage
/package-lock.json
coverage
public
dist
.astro
pnpm-lock.yaml
pnpm-workspace.yaml
.env
20 changes: 19 additions & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1 +1,19 @@
{}
{
"tabWidth": 2,
"useTabs": false,
"plugins": ["prettier-plugin-astro"],
"overrides": [
{
"files": "*.astro",
"options": {
"parser": "astro"
}
},
{
"files": "*.md",
"options": {
"useTabs": true
}
}
]
}
7 changes: 2 additions & 5 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{
"recommendations": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"silvenon.mdx"
]
"recommendations": ["astro-build.astro-vscode"],
"unwantedRecommendations": []
}
11 changes: 11 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"version": "0.2.0",
"configurations": [
{
"command": "./node_modules/.bin/astro dev",
"name": "Development server",
"request": "launch",
"type": "node-terminal"
}
]
}
8 changes: 0 additions & 8 deletions .vscode/settings.json

This file was deleted.

74 changes: 46 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<p align="center">
<a href="https://delta.io">
<img alt="Delta Lake" src="static/images/icon.png" width="60" />
<img alt="Delta Lake" src="packages/delta-site/public/images/icon.png" width="60" />
</a>
</p>
<h1 align="center">Delta Lake Website</h1>
Expand All @@ -13,40 +13,56 @@
</a>
</p>

## :rocket: Getting up and running locally
## Developer guide

This site requires Node 20 or above, which you can install with `brew install node@20`.
### Getting started

> If you are using vscode, you can use the dev container to simplify getting started.
This site requires a development `YOUTUBE_API_KEY` which populates the YouTube videos in the learn > videos, learn > tutorials, and community pages.

This site requires a development `YOUTUBE_API_KEY` which populates the YouTube videos in the learn > videos, learn > tutorials, and community pages. That is, ensure you have created a `.env.development` file in the root folder; the file should look like:
- To generate an API key, refer to [How to Get a YouTube API Key [Tutorial + Examples]](https://blog.hubspot.com/website/how-to-get-youtube-api-key)

```
//.env.development
Install dependencies and start the local development server:

YOUTUBE_API_KEY = $API_KEY$
```ts
pnpm i
YOUTUBE_API_KEY=<string> pnpm --filter delta-site dev
YOUTUBE_API_KEY=<string> pnpm --filter delta-site build
YOUTUBE_API_KEY=<string> pnpm --filter delta-site preview
```

- To generate an API key, refer to [How to Get a YouTube API Key [Tutorial + Examples]](https://blog.hubspot.com/website/how-to-get-youtube-api-key)
- For more information on Gatsby environment files, please refer to [How to implement '.env' variables in Gatsby and React](https://dev.to/steeeeeph/how-to-implement-env-variables-in-gatsby-and-react-252d)
### Code formatting

Simply check out this repo, run `npm install --legacy-peer-deps`, then run `npm run develop`.
Global operations
Lint (via eslint) the entire repo: `pnpm lint`
Format (via prettier) the entire repo: `pnpm format`

To open a localhost version of the site, run `npm run start`.
### Helpful resources

### Code formatting
- [Astro documentation](https://docs.astro.build/en/getting-started/) — guides, API reference, and more.
- [Tailwind v3 documentation](https://v3.tailwindcss.com/docs/) — for understanding the various classnames for styling.
- [YouTube Data API](https://developers.google.com/youtube/v3/docs) - for working with the YouTube API. 
- [Netlify documentation](https://docs.netlify.com/)

### Project structure

We use a monorepo pattern to separate individual packages. We currently have two packages:

If you use Visual Studio Code, install the [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) and [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) extensions to automatically format your code as you make changes.
- delta-site - The delta.io website source code
- delta-theme - The underlying theme used by delta-site

Alternatively, you may run `npm run lint` or `npm run lint:fix` to both check for and fix lint issues, respectively. All changes are automatically linted (and will attempt to auto-fix) on the git pre-commit hook.
#### delta-site

This repo runs automated checks on PRs, like the lint check above. Sometimes this process can hang. If you see the process hang, try running an empty commit and push the commit to rerun the checks. You can do this by running the following git command `git commit --allow-empty -m "Empty commit"` then pushing the commit to origin.
We mostly follow Astro's [standard project structure](https://docs.astro.build/en/basics/project-structure/). The most notable directory is the `src` folder, which includes the following folders:

**All PRs require linters to pass in order to deploy to production.**
- `src/components` - Contains various shared components. The "standard" component library is located directly in this folder, while page layouts are located in `src/components/layouts` and page-specific components are located in `src/components/pages`.
- `src/config` - Site configuration, which are "globals" for various things such as menus, site title, etc.
- `src/content` - Content collections. See below for how to use them.
- `src/pages` - Page routes. Astro uses this directory to generate the page routing structure.
- `src/utils` - Various utility functions used by different pages, including fetching data from the YouTube Data API.

## :handshake: Contributing
#### delta-theme

All changes are proposed as a [pull request](https://github.com/delta-io/website/pulls). Simply create a pull request and request a review and we'll get on it.
This is the theme source code for delta-site. It includes various plugin configurations, as well as the components used by the site.

### Blog posts

Expand All @@ -61,11 +77,12 @@ Blog posts should generally be around 2,000 words, target a relevant, high-value
You can add a blog by adding a directory with some files to `src/blog`. Here's an example:

```
src/
blog/
convert-parquet-to-delta/
index.mdx
thumbnail.png
delta-site/
src/
blog/
2023-10-22-delta-rs-python/
index.mdx
thumbnail.png
```

All of the images that correspond to the blog post should be saved in the respective folder.
Expand All @@ -74,9 +91,10 @@ The top of the `index.mdx` file should contain the following metadata:

```
---
title: Converting from Parquet to Delta Lake
description: This post shows how to convert a Parquet table to a Delta Lake.
thumbnail: ./thumbnail.png
author: Matthew Powers
title: New features in the Python deltalake 0.12.0 release
description: This post explains the new features in the Python deltalake 0.12.0 release
thumbnail: "./thumbnail.png"
author: ion-koutsouris
publishedAt: 2023-10-22
---
```
Loading