Skip to content

Commit 41c88bc

Browse files
committed
[CALCITE-6845] Self-host website images
1 parent bef0725 commit 41c88bc

File tree

5 files changed

+13
-47
lines changed

5 files changed

+13
-47
lines changed

site/README.md

Lines changed: 10 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -28,59 +28,21 @@ You can build the site manually using your environment or use the docker compose
2828

2929
The site is automatically built and published following the process outlined in the [Calcite repository](https://github.com/apache/calcite/blob/main/site/README.md).
3030

31-
# Previewing the website locally
32-
33-
## Building website on a host system
34-
35-
### Setup your environment
36-
37-
Similar to the instructions to
38-
[set up the Calcite web site](https://github.com/apache/calcite-avatica/blob/main/site/README.md).
39-
40-
Site generation currently works best with ruby-2.7.4.
41-
42-
1. `cd site`
43-
2. `git clone https://gitbox.apache.org/repos/asf/calcite-site.git target`.
44-
The site will be generated to target/avatica, so it will be ready for commit.
45-
3. `sudo apt-get install rubygems ruby2.7-dev zlib1g-dev` (linux)
46-
4. `sudo gem install bundler`
47-
5. Add avatica-go content: `./add-avatica-go-docs.sh`
48-
6. `bundle install`
49-
50-
### Build javadoc
51-
52-
1. `cd $avatica_project_directory`
53-
2. `./gradlew javadocAggregate # the result is placed to build/docs/javadocAggregate`
54-
55-
### Running website locally
56-
57-
Before opening a pull request, you can preview your contributions by
58-
running from within the directory:
59-
60-
1. `bundle exec jekyll serve`
61-
2. Open [http://localhost:4000/avatica/](http://localhost:4000/avatica/) (note the trailing slash)
62-
63-
### Building the website
64-
65-
1. `bundle exec jekyll build`
66-
2. The result is produced to `target/avatica`
67-
68-
## Building website with Docker
69-
70-
### Setup your environment
31+
# Previewing the website locally using docker
32+
## Setup your environment
7133

7234
1. Install [docker](https://docs.docker.com/install/)
73-
2. Install [docker compose v2](https://docs.docker.com/compose/cli-command/#installing-compose-v2)
35+
2. Install [docker compose](https://docs.docker.com/compose/install/)
7436

75-
### Build site
37+
## Build site
7638
1. `cd site`
7739
2. `docker compose run build-site`
7840

79-
### Generate javadoc
41+
## Generate javadoc
8042
1. `cd site`
8143
2. `docker compose run generate-javadoc`
8244

83-
### Running development mode locally
45+
## Running development mode locally
8446
You can preview your work while working on the site.
8547

8648
1. `cd site`
@@ -89,3 +51,7 @@ You can preview your work while working on the site.
8951
The web server will be started on [http://localhost:4000/avatica/](http://localhost:4000/avatica/) (note the trailing slash)
9052

9153
As you make changes to the site, the site will automatically rebuild.
54+
55+
## Publishing the website
56+
The website is automatically published using GitHub Actions, so you do not need to do anything but just merge your
57+
changes to the `main` branch.

site/_docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ limitations under the License.
2525
Avatica is a framework for building JDBC and ODBC drivers for databases,
2626
and an RPC wire protocol.
2727

28-
![Avatica Architecture](https://raw.githubusercontent.com/julianhyde/share/main/slides/avatica-architecture.png)
28+
![Avatica Architecture]({{site.baseurl}}/img/avatica-architecture.png)
2929

3030
Avatica's Java binding has very few dependencies.
3131
Even though it is part of Apache Calcite it does not depend on other parts of

site/_includes/news_item.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ <h2>
4141
{% if c.avatar %}
4242
{% assign avatar = c.avatar %}
4343
{% else %}
44-
{% capture avatar %}http://github.com/{{ c.githubId }}.png{% endcapture %}
44+
{% capture avatar %}https://calcite.apache.org/img/avatars/{{ c.githubId }}.png{% endcapture %}
4545
{% endif %}
4646
{% endif %}
4747
{% endfor %}

site/_layouts/news_item.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ <h2>
2828
{% if c.avatar %}
2929
{% assign avatar = c.avatar %}
3030
{% else %}
31-
{% capture avatar %}http://github.com/{{ c.githubId }}.png{% endcapture %}
31+
{% capture avatar %}https://calcite.apache.org/img/avatars/{{ c.githubId }}.png{% endcapture %}
3232
{% endif %}
3333
{% endif %}
3434
{% endfor %}

site/img/avatica-architecture.png

177 KB
Loading

0 commit comments

Comments
 (0)