Skip to content

Commit

Permalink
feat: Add website layout (#130)
Browse files Browse the repository at this point in the history
* feat: Add website layout

Signed-off-by: Xuanwo <[email protected]>

* publish to rust.i.a.o

Signed-off-by: Xuanwo <[email protected]>

* Fix license

Signed-off-by: Xuanwo <[email protected]>

* Let's try mdbook action

Signed-off-by: Xuanwo <[email protected]>

* use cargo install

Signed-off-by: Xuanwo <[email protected]>

* disable section

Signed-off-by: Xuanwo <[email protected]>

* Add docs for website

Signed-off-by: Xuanwo <[email protected]>

* Fix license

Signed-off-by: Xuanwo <[email protected]>

* action approved

Signed-off-by: Xuanwo <[email protected]>

---------

Signed-off-by: Xuanwo <[email protected]>
  • Loading branch information
Xuanwo authored Dec 26, 2023
1 parent 7d06a85 commit 6a401d4
Show file tree
Hide file tree
Showing 10 changed files with 236 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .asf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ github:
required_approving_review_count: 1

required_linear_history: true
gh-pages:
whatever: Just a placeholder to make it take effects

features:
wiki: false
issues: true
Expand All @@ -56,3 +59,7 @@ notifications:
issues: [email protected]
pullrequests: [email protected]
jira_options: link label link label

publish:
whoami: gh-pages
hostname: rust.iceberg.apache.org
56 changes: 56 additions & 0 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

name: Website

on:
push:
branches:
- main
pull_request:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: '0.4.36'

- name: Build
working-directory: website
run: mdbook build

- name: Copy asf file
run: cp .asf.yaml ./website/book/.asf.yaml

- name: Deploy to gh-pages
uses: peaceiris/[email protected]
if: github.event_name == 'push' && github.ref_name == 'main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: website/book
publish_branch: gh-pages
3 changes: 2 additions & 1 deletion .licenserc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ header:
- 'LICENSE'
- 'NOTICE'
- '**/*.json'

# Generated content by mdbook
- 'website/book'
comment: on-failure
18 changes: 18 additions & 0 deletions website/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

book
40 changes: 40 additions & 0 deletions website/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->

# Iceberg Rust Website

## Setup

Install mdbook first

```shell
cargo install mdbook
```

## Preview

```shell
mdbook serve
```

## Build

```shell
mdbook build
```
30 changes: 30 additions & 0 deletions website/book.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

[book]
authors = ["Iceberg Community"]
language = "en"
multilingual = false
src = "src"
title = "Iceberg Rust"

[output.html]
git-repository-url = "https://github.com/apache/iceberg-rust"
git-repository-icon = "fa-github"
edit-url-template = "https://github.com/apache/iceberg-rust/edit/main/website/{path}"
cname = "rust.iceberg.opendal.org"
no-section-label = true
1 change: 1 addition & 0 deletions website/src/CONTRIBUTING.md
28 changes: 28 additions & 0 deletions website/src/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->

- [Introduction](./introduction.md)

# User Guide

- [Install](./install.md)

# Developer Guide

- [Contributing](./CONTRIBUTING.md)
32 changes: 32 additions & 0 deletions website/src/install.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->

# Install

Add `iceberg` into `Cargo.toml` dependencies:

```toml
iceberg = "0.2.0"
```

iceberg is under active development, you may want to use the git version instead:

```toml
iceberg = { git = "https://github.com/apache/iceberg-rust", rev = "commit-hash" }
```
22 changes: 22 additions & 0 deletions website/src/introduction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->

# Iceberg Rust

Iceberg Rust is a rust implementation for accessing iceberg tables.

0 comments on commit 6a401d4

Please sign in to comment.