diff --git a/.htmltest.yml b/.htmltest.yml index 25a5a7e2a2..b6718c41a8 100644 --- a/.htmltest.yml +++ b/.htmltest.yml @@ -1,4 +1,4 @@ -DirectoryPath: "htmltest" +DirectoryPath: "_site" IgnoreDirectoryMissingTrailingSlash: true IgnoreAltMissing: true CheckDoctype: false diff --git a/3.10/deployment-kubernetes-usage.md b/3.10/deployment-kubernetes-usage.md index 59be4124b6..0913fd7561 100644 --- a/3.10/deployment-kubernetes-usage.md +++ b/3.10/deployment-kubernetes-usage.md @@ -68,7 +68,7 @@ in the [kube-arangodb repository](https://github.com/arangodb/kube-arangodb/rele ## ArangoDB deployment creation -After deploying the latest ArangoDB Kubernetes operator, use the command below to deploy your [license key](../administration-license.html) as a secret which is required for the Enterprise Edition starting with version 3.9: +After deploying the latest ArangoDB Kubernetes operator, use the command below to deploy your [license key](administration-license.html) as a secret which is required for the Enterprise Edition starting with version 3.9: ```bash kubectl create secret generic arango-license-key --from-literal=token-v2="" diff --git a/3.10/start-using-aql.md b/3.10/start-using-aql.md index 810dc67b07..80f780ca36 100644 --- a/3.10/start-using-aql.md +++ b/3.10/start-using-aql.md @@ -51,12 +51,12 @@ There are always calls to the server's API under the hood, but the web interface and the `db` object abstract away the low-level communication details and are thus easier to use. -The ArangoDB Web Interface has a [specific tab for AQL queries execution](../aql/invocation-with-web-interface.html). +The ArangoDB Web Interface has a [specific tab for AQL queries execution](aql/invocation-with-web-interface.html). -You can run [AQL queries from the ArangoDB Shell](../aql/invocation-with-arangosh.html) -with the [_query](aql/invocation-with-arangosh.html#with-db_query) and -[_createStatement](aql/invocation-with-arangosh.html#with-db_createstatement-arangostatement) methods -of the [`db` object](../appendix-references-dbobject.html). This chapter +You can run [AQL queries from the ArangoDB Shell](aql/invocation-with-arangosh.html) +with the [`_query()`](aql/invocation-with-arangosh.html#with-db_query) and +[`_createStatement()`](aql/invocation-with-arangosh.html#with-db_createstatement-arangostatement) methods +of the [`db` object](appendix-references-dbobject.html). This chapter also describes how to use bind parameters, statistics, counting and cursors with arangosh. @@ -64,4 +64,4 @@ If you are using Foxx, see [how to write database queries](foxx-getting-started. for examples including tagged template strings. If you want to run AQL queries from your application via the HTTP REST API, -see the full API description at [HTTP Interface for AQL Query Cursors](../http/aql-query-cursor.html). \ No newline at end of file +see the full API description at [HTTP Interface for AQL Query Cursors](http/aql-query-cursor.html). diff --git a/3.10/transactions-stream-transactions.md b/3.10/transactions-stream-transactions.md index 5757d7ed5c..85f4d1e074 100644 --- a/3.10/transactions-stream-transactions.md +++ b/3.10/transactions-stream-transactions.md @@ -33,7 +33,7 @@ It is therefore advisable to keep the transactions as short as possible. {% endhint %} For a more detailed description of how transactions work in ArangoDB, please -refer to [Transactions](../transactions.html). +refer to [Transactions](transactions.html). You can use Stream Transactions via the [JavaScript API](#javascript-api) and the [HTTP API](http/transaction-stream-transaction.html). diff --git a/3.11/deployment-kubernetes-usage.md b/3.11/deployment-kubernetes-usage.md index 59be4124b6..0913fd7561 100644 --- a/3.11/deployment-kubernetes-usage.md +++ b/3.11/deployment-kubernetes-usage.md @@ -68,7 +68,7 @@ in the [kube-arangodb repository](https://github.com/arangodb/kube-arangodb/rele ## ArangoDB deployment creation -After deploying the latest ArangoDB Kubernetes operator, use the command below to deploy your [license key](../administration-license.html) as a secret which is required for the Enterprise Edition starting with version 3.9: +After deploying the latest ArangoDB Kubernetes operator, use the command below to deploy your [license key](administration-license.html) as a secret which is required for the Enterprise Edition starting with version 3.9: ```bash kubectl create secret generic arango-license-key --from-literal=token-v2="" diff --git a/3.11/start-using-aql.md b/3.11/start-using-aql.md index 810dc67b07..80f780ca36 100644 --- a/3.11/start-using-aql.md +++ b/3.11/start-using-aql.md @@ -51,12 +51,12 @@ There are always calls to the server's API under the hood, but the web interface and the `db` object abstract away the low-level communication details and are thus easier to use. -The ArangoDB Web Interface has a [specific tab for AQL queries execution](../aql/invocation-with-web-interface.html). +The ArangoDB Web Interface has a [specific tab for AQL queries execution](aql/invocation-with-web-interface.html). -You can run [AQL queries from the ArangoDB Shell](../aql/invocation-with-arangosh.html) -with the [_query](aql/invocation-with-arangosh.html#with-db_query) and -[_createStatement](aql/invocation-with-arangosh.html#with-db_createstatement-arangostatement) methods -of the [`db` object](../appendix-references-dbobject.html). This chapter +You can run [AQL queries from the ArangoDB Shell](aql/invocation-with-arangosh.html) +with the [`_query()`](aql/invocation-with-arangosh.html#with-db_query) and +[`_createStatement()`](aql/invocation-with-arangosh.html#with-db_createstatement-arangostatement) methods +of the [`db` object](appendix-references-dbobject.html). This chapter also describes how to use bind parameters, statistics, counting and cursors with arangosh. @@ -64,4 +64,4 @@ If you are using Foxx, see [how to write database queries](foxx-getting-started. for examples including tagged template strings. If you want to run AQL queries from your application via the HTTP REST API, -see the full API description at [HTTP Interface for AQL Query Cursors](../http/aql-query-cursor.html). \ No newline at end of file +see the full API description at [HTTP Interface for AQL Query Cursors](http/aql-query-cursor.html). diff --git a/3.11/transactions-stream-transactions.md b/3.11/transactions-stream-transactions.md index 5757d7ed5c..85f4d1e074 100644 --- a/3.11/transactions-stream-transactions.md +++ b/3.11/transactions-stream-transactions.md @@ -33,7 +33,7 @@ It is therefore advisable to keep the transactions as short as possible. {% endhint %} For a more detailed description of how transactions work in ArangoDB, please -refer to [Transactions](../transactions.html). +refer to [Transactions](transactions.html). You can use Stream Transactions via the [JavaScript API](#javascript-api) and the [HTTP API](http/transaction-stream-transaction.html). diff --git a/3.6/deployment-kubernetes-usage.md b/3.6/deployment-kubernetes-usage.md index 59be4124b6..886828d428 100644 --- a/3.6/deployment-kubernetes-usage.md +++ b/3.6/deployment-kubernetes-usage.md @@ -68,12 +68,6 @@ in the [kube-arangodb repository](https://github.com/arangodb/kube-arangodb/rele ## ArangoDB deployment creation -After deploying the latest ArangoDB Kubernetes operator, use the command below to deploy your [license key](../administration-license.html) as a secret which is required for the Enterprise Edition starting with version 3.9: - -```bash -kubectl create secret generic arango-license-key --from-literal=token-v2="" -``` - Once the operator is running, you can create your ArangoDB database deployment by creating a `ArangoDeployment` custom resource and deploying it into your Kubernetes cluster. @@ -83,15 +77,6 @@ For example (all examples can be found in the [kube-arangodb repository](https:/ ```bash kubectl apply -f examples/simple-cluster.yaml ``` -Additionally, you can specify the license key required for the Enterprise Edition starting with version 3.9 as seen below: - -```yaml -spec: - [...] - image: arangodb/enterprise:3.9.1 - license: - secretName: arango-license-key -``` ## Deployment removal diff --git a/3.7/deployment-kubernetes-usage.md b/3.7/deployment-kubernetes-usage.md index 59be4124b6..886828d428 100644 --- a/3.7/deployment-kubernetes-usage.md +++ b/3.7/deployment-kubernetes-usage.md @@ -68,12 +68,6 @@ in the [kube-arangodb repository](https://github.com/arangodb/kube-arangodb/rele ## ArangoDB deployment creation -After deploying the latest ArangoDB Kubernetes operator, use the command below to deploy your [license key](../administration-license.html) as a secret which is required for the Enterprise Edition starting with version 3.9: - -```bash -kubectl create secret generic arango-license-key --from-literal=token-v2="" -``` - Once the operator is running, you can create your ArangoDB database deployment by creating a `ArangoDeployment` custom resource and deploying it into your Kubernetes cluster. @@ -83,15 +77,6 @@ For example (all examples can be found in the [kube-arangodb repository](https:/ ```bash kubectl apply -f examples/simple-cluster.yaml ``` -Additionally, you can specify the license key required for the Enterprise Edition starting with version 3.9 as seen below: - -```yaml -spec: - [...] - image: arangodb/enterprise:3.9.1 - license: - secretName: arango-license-key -``` ## Deployment removal diff --git a/3.8/deployment-kubernetes-usage.md b/3.8/deployment-kubernetes-usage.md index 59be4124b6..886828d428 100644 --- a/3.8/deployment-kubernetes-usage.md +++ b/3.8/deployment-kubernetes-usage.md @@ -68,12 +68,6 @@ in the [kube-arangodb repository](https://github.com/arangodb/kube-arangodb/rele ## ArangoDB deployment creation -After deploying the latest ArangoDB Kubernetes operator, use the command below to deploy your [license key](../administration-license.html) as a secret which is required for the Enterprise Edition starting with version 3.9: - -```bash -kubectl create secret generic arango-license-key --from-literal=token-v2="" -``` - Once the operator is running, you can create your ArangoDB database deployment by creating a `ArangoDeployment` custom resource and deploying it into your Kubernetes cluster. @@ -83,15 +77,6 @@ For example (all examples can be found in the [kube-arangodb repository](https:/ ```bash kubectl apply -f examples/simple-cluster.yaml ``` -Additionally, you can specify the license key required for the Enterprise Edition starting with version 3.9 as seen below: - -```yaml -spec: - [...] - image: arangodb/enterprise:3.9.1 - license: - secretName: arango-license-key -``` ## Deployment removal diff --git a/3.8/transactions-stream-transactions.md b/3.8/transactions-stream-transactions.md index 5757d7ed5c..85f4d1e074 100644 --- a/3.8/transactions-stream-transactions.md +++ b/3.8/transactions-stream-transactions.md @@ -33,7 +33,7 @@ It is therefore advisable to keep the transactions as short as possible. {% endhint %} For a more detailed description of how transactions work in ArangoDB, please -refer to [Transactions](../transactions.html). +refer to [Transactions](transactions.html). You can use Stream Transactions via the [JavaScript API](#javascript-api) and the [HTTP API](http/transaction-stream-transaction.html). diff --git a/3.9/deployment-kubernetes-usage.md b/3.9/deployment-kubernetes-usage.md index 59be4124b6..0913fd7561 100644 --- a/3.9/deployment-kubernetes-usage.md +++ b/3.9/deployment-kubernetes-usage.md @@ -68,7 +68,7 @@ in the [kube-arangodb repository](https://github.com/arangodb/kube-arangodb/rele ## ArangoDB deployment creation -After deploying the latest ArangoDB Kubernetes operator, use the command below to deploy your [license key](../administration-license.html) as a secret which is required for the Enterprise Edition starting with version 3.9: +After deploying the latest ArangoDB Kubernetes operator, use the command below to deploy your [license key](administration-license.html) as a secret which is required for the Enterprise Edition starting with version 3.9: ```bash kubectl create secret generic arango-license-key --from-literal=token-v2="" diff --git a/3.9/transactions-stream-transactions.md b/3.9/transactions-stream-transactions.md index 5757d7ed5c..85f4d1e074 100644 --- a/3.9/transactions-stream-transactions.md +++ b/3.9/transactions-stream-transactions.md @@ -33,7 +33,7 @@ It is therefore advisable to keep the transactions as short as possible. {% endhint %} For a more detailed description of how transactions work in ArangoDB, please -refer to [Transactions](../transactions.html). +refer to [Transactions](transactions.html). You can use Stream Transactions via the [JavaScript API](#javascript-api) and the [HTTP API](http/transaction-stream-transaction.html). diff --git a/Dockerfile b/Dockerfile index dc40eea47d..dbcd34438d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,8 @@ -FROM ruby:2.6.7-buster - -RUN apt update && \ - apt install -y ruby-full build-essential zlib1g-dev wget python2.7 libpython2.7 +FROM ruby:2.6.10-buster RUN cd /tmp && \ - wget https://github.com/wjdp/htmltest/releases/download/v0.14.0/htmltest_0.14.0_linux_amd64.tar.gz && \ - tar xvzf htmltest_0.14.0_linux_amd64.tar.gz && \ + wget --no-verbose https://github.com/wjdp/htmltest/releases/download/v0.16.0/htmltest_0.16.0_linux_amd64.tar.gz && \ + tar xvzf htmltest_0.16.0_linux_amd64.tar.gz && \ mv htmltest /usr/local/bin RUN mkdir /root/gems @@ -15,7 +12,7 @@ ENV PATH="/root/gems/bin:${PATH}" # python md script needs that :S ENV LC_ALL=C.UTF-8 -RUN gem install bundler:2.2.28 jekyll +RUN gem install bundler:2.3.25 VOLUME /docs WORKDIR /docs diff --git a/Gemfile.lock b/Gemfile.lock index fb8462f580..c3cbaa170a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,8 +1,8 @@ GEM remote: https://rubygems.org/ specs: - addressable (2.8.0) - public_suffix (>= 2.0.2, < 5.0) + addressable (2.8.1) + public_suffix (>= 2.0.2, < 6.0) algolia_html_extractor (2.6.4) json (~> 2.0) nokogiri (~> 1.10) @@ -10,21 +10,21 @@ GEM httpclient (~> 2.8, >= 2.8.3) json (>= 1.5.1) colorator (1.1.0) - concurrent-ruby (1.1.9) - em-websocket (0.5.2) + concurrent-ruby (1.1.10) + em-websocket (0.5.3) eventmachine (>= 0.12.9) - http_parser.rb (~> 0.6.0) + http_parser.rb (~> 0) eventmachine (1.2.7) eventmachine (1.2.7-x64-mingw32) - ffi (1.15.4) - ffi (1.15.4-x64-mingw32) + ffi (1.15.5) + ffi (1.15.5-x64-mingw32) filesize (0.2.0) forwardable-extended (2.6.0) - http_parser.rb (0.6.0) + http_parser.rb (0.8.0) httpclient (2.8.3) - i18n (1.8.10) + i18n (1.12.0) concurrent-ruby (~> 1.0) - jekyll (4.2.1) + jekyll (4.2.2) addressable (~> 2.4) colorator (~> 1.0) em-websocket (~> 0.5) @@ -50,38 +50,38 @@ GEM verbal_expressions (~> 0.1.5) jekyll-redirect-from (0.16.0) jekyll (>= 3.3, < 5.0) - jekyll-sass-converter (2.1.0) + jekyll-sass-converter (2.2.0) sassc (> 2.0.1, < 3.0) jekyll-watch (2.2.1) listen (~> 3.0) - json (2.5.1) - kramdown (2.3.1) + json (2.6.2) + kramdown (2.4.0) rexml kramdown-parser-gfm (1.1.0) kramdown (~> 2.0) liquid (4.0.3) - listen (3.7.0) + listen (3.7.1) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) mercenary (0.4.0) - mini_portile2 (2.6.1) - nokogiri (1.12.5) - mini_portile2 (~> 2.6.1) + mini_portile2 (2.8.0) + nokogiri (1.13.9) + mini_portile2 (~> 2.8.0) racc (~> 1.4) - nokogiri (1.12.5-x64-mingw32) + nokogiri (1.13.9-x64-mingw32) racc (~> 1.4) - nokogiri (1.12.5-x86_64-linux) + nokogiri (1.13.9-x86_64-linux) racc (~> 1.4) pathutil (0.16.2) forwardable-extended (~> 2.6) progressbar (1.11.0) - public_suffix (4.0.6) - racc (1.5.2) - rb-fsevent (0.11.0) + public_suffix (5.0.0) + racc (1.6.0) + rb-fsevent (0.11.2) rb-inotify (0.10.1) ffi (~> 1.0) rexml (3.2.5) - rouge (3.26.1) + rouge (3.30.0) safe_yaml (1.0.5) sassc (2.4.0) ffi (~> 1.9) @@ -89,9 +89,9 @@ GEM ffi (~> 1.9) terminal-table (2.0.0) unicode-display_width (~> 1.1, >= 1.1.1) - tzinfo (2.0.4) + tzinfo (2.0.5) concurrent-ruby (~> 1.0) - tzinfo-data (1.2021.2) + tzinfo-data (1.2022.6) tzinfo (>= 1.0.0) unicode-display_width (1.8.0) verbal_expressions (0.1.5) @@ -110,4 +110,4 @@ DEPENDENCIES wdm (~> 0.1.1) BUNDLED WITH - 2.2.28 + 2.3.25 diff --git a/README.md b/README.md index ef9e6c45c1..0d08ce0b15 100644 --- a/README.md +++ b/README.md @@ -94,7 +94,7 @@ changes, use: `bundle exec jekyll build` -The generated content will be stored in the `_site/` folder. +The generated content will be stored in the `_site/docs/` folder. To serve the content from a previous build without watching for changes, use: @@ -115,28 +115,27 @@ encounter stale content, then stop the container and run: `docker run --rm -v $(pwd):/docs -p 4000:4000 arangodb/arangodb-docs bundler exec jekyll serve -H 0.0.0.0 --trace` -Alternatively, you may stop the container, execute -`rm -rf .jekyll-cache/ .jekyll-metadata _site/`, and run the Docker command -again (without additional arguments). +Alternatively, you may stop the container, execute either of the following +commands, and run the normal Docker command again (without additional arguments). +- `rm -rf .jekyll-cache/ .jekyll-metadata _site/` +- `docker run --rm -v $(pwd):/docs arangodb/arangodb-docs bundler exec jekyll clean` To build the documentation without watch mode or serving the resulting site, you can execute: `docker run --rm -v $(pwd):/docs arangodb/arangodb-docs bundler exec jekyll build --trace` -After that the HTML files in `_site/` are ready to be served by a webserver. - -Please note that you still need to put them into a `/docs` subdirectory if you -want to serve the documentation with another web server (only relevant for -hosting the documentation). Example: +After that the HTML files in `_site/` are ready to be served by a webserver: ```bash -mkdir -p /tmp/arangodocs -cp -a _site /tmp/arangodocs/docs -cd /tmp/arangodocs -python -m http.server +cd _site +python3 -m http.server ``` +To check for broken references (e.g. internal links), you can run `htmltest`: + +`docker run --rm -v $(pwd):/docs arangodb/arangodb-docs htmltest` + ### Performance A full build (all versions) will take quite a while. You can use Jekyll's diff --git a/_config.yml b/_config.yml index dc66959a78..dc474fc74f 100644 --- a/_config.yml +++ b/_config.yml @@ -16,6 +16,7 @@ description: >- # this means to ignore newlines until "baseurl:" ArangoDB Documentation baseurl: "/docs" # the subpath of your site, e.g. /blog +destination: "_site/docs" url: "https://www.arangodb.com" # the base hostname & protocol for your site diff --git a/_plugins/versions/generator.rb b/_plugins/versions/generator.rb index a7cb0e1179..26ed834c84 100644 --- a/_plugins/versions/generator.rb +++ b/_plugins/versions/generator.rb @@ -30,8 +30,8 @@ def generate { 'version' => v, 'url' => vps_with_key(vp.key)[v]&.url } end - @site.pages << JekyllRedirectFrom::RedirectPage.from_paths( - @site, vp.unversioned_path, vp.url) if vp.stable? + # @site.pages << JekyllRedirectFrom::RedirectPage.from_paths( + # @site, vp.unversioned_path, vp.url) if vp.stable? end @config.versions.each do |name, version| @site.static_files << Symlink.new(@site, name, version) diff --git a/build.sh b/build.sh index 7558b5f1df..611b508009 100755 --- a/build.sh +++ b/build.sh @@ -5,12 +5,12 @@ set -e bundler install bundler exec jekyll build ruby sitemap.rb -rm -rf htmltest -mkdir -p htmltest -# our baseUrl is /docs so we need to create that structure for htmltest -# otherwise it would fail to find absolute links like /docs/3.9 -cp -a _site htmltest/docs + # do not deploy file generated by jekyll-redirect-from v0.13.0+ plugin -rm -f htmltest/docs/redirects.json +rm -f _site/docs/redirects.json + htmltest -(cd htmltest && tar cvzf docs.tar.gz docs) + +rm -rf htmltest +mkdir -p htmltest +(cd _site && tar cvzf ../htmltest/docs.tar.gz docs) diff --git a/netlify.sh b/netlify.sh index d77bfe4c49..f0d08d2471 100755 --- a/netlify.sh +++ b/netlify.sh @@ -5,16 +5,11 @@ set -e JEKYLL_ENV="netlify" jekyll clean JEKYLL_ENV="netlify" jekyll build --trace ruby sitemap.rb -rm -rf htmltest -mkdir -p htmltest -# our baseUrl is /docs so we need to create that structure for htmltest -# otherwise it would fail to find absolute links like /docs/3.9 -cp -a _site htmltest/docs -cp _redirects htmltest +cp _redirects _site (cd /tmp && \ - wget -nv https://github.com/wjdp/htmltest/releases/download/v0.14.0/htmltest_0.14.0_linux_amd64.tar.gz && \ - tar xvzf htmltest_0.14.0_linux_amd64.tar.gz + wget -nv https://github.com/wjdp/htmltest/releases/download/v0.16.0/htmltest_0.16.0_linux_amd64.tar.gz && \ + tar xvzf htmltest_0.16.0_linux_amd64.tar.gz ) -/tmp/htmltest -s +/tmp/htmltest --skip-external diff --git a/netlify.toml b/netlify.toml index 3fef3dede2..b8f1f28632 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,4 +1,4 @@ # global context [build] - publish = "htmltest" + publish = "_site" command = "sh netlify.sh" diff --git a/sitemap.rb b/sitemap.rb index 72179c2932..1e6d5d0b43 100644 --- a/sitemap.rb +++ b/sitemap.rb @@ -8,7 +8,7 @@ config = YAML.load_file('_config.yml') version = config['versions']['stable'] baseurl = config['url'] + config['baseurl'] -dir = "_site/#{version}" +dir = "_site/docs/#{version}" puts("\nGenerating sitemap.xml (dir = '#{dir}', baseurl = '#{baseurl}')") @@ -16,7 +16,7 @@ raise IOError, "Source directory does not exist: #{dir}" end -f = File.open('_site/sitemap.xml', 'w') +f = File.open('_site/docs/sitemap.xml', 'w') f.write('' + "\n") f.write('' + "\n")