You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/04/25 12:10:29 UTC

[GitHub] [flink] JingGe commented on a diff in pull request #19571: [FLINK-27394] Integrate the Flink Elasticsearch documentation in the Flink documentation

JingGe commented on code in PR #19571:
URL: https://github.com/apache/flink/pull/19571#discussion_r857553242


##########
docs/README.md:
##########
@@ -32,6 +32,79 @@ $ ./build_docs.sh
 
 The site can be viewed at http://localhost:1313/
 
+## Include externally hosted documentation
+
+With the ongoing efforts to move Flink's connectors from this repository to individual, dedicated
+repositories, this also requires the documentation to be hosted outside this repo. However, 
+we still want to serve all documentation as a whole on the Flink documentation website.
+
+In order to achieve this, we're using [Hugo Modules.](https://gohugo.io/hugo-modules/configuration/) 
+to create a virtual filesystem. 
+
+Adding new externally hosted documentation requires the following steps to be taken:
+
+1. (If necessary) Move the existing documentation to the new repository
+2. In this new repository, in the `docs` folder, create a file `go.mod` containing:
+
+```go
+module github.com/apache/flink-connector-<repositoryname>/docs
+
+go 1.18
+```
+
+Replace <repositoryname> with the name of your repository.
+See https://github.com/apache/flink-connector-elasticsearch/tree/main/docs/go.mod for an example.
+3. In this new repository, in the `docs` folder, create a `config.toml` file containing:
+
+```yaml
+module:
+  mounts:
+    - source: content/docs/connectors/datastream/<filename>.md
+      target: content/docs/connectors/datastream/<filename>.md
+      lang: en
+    - source: content/docs/connectors/table/<filename>.md
+      target: content/docs/connectors/table/<filename>.md
+      lang: en
+    - source: content.zh/docs/connectors/datastream/<filename>.md
+      target: content.zh/docs/connectors/datastream/<filename>.md
+      lang: zh
+    - source: content.zh/docs/connectors/table/<filename>.md
+      target: content.zh/docs/connectors/table/<filename>.md
+      lang: zh
+```
+
+Replace <filename> with the name of the file you want to include in the documentation.
+See https://github.com/apache/flink-connector-elasticsearch/tree/main/docs/config.toml for an example.

Review Comment:
   Not sure if I did something wrong, I got 404 with this link.



##########
docs/README.md:
##########
@@ -32,6 +32,79 @@ $ ./build_docs.sh
 
 The site can be viewed at http://localhost:1313/
 
+## Include externally hosted documentation
+
+With the ongoing efforts to move Flink's connectors from this repository to individual, dedicated
+repositories, this also requires the documentation to be hosted outside this repo. However, 
+we still want to serve all documentation as a whole on the Flink documentation website.
+
+In order to achieve this, we're using [Hugo Modules.](https://gohugo.io/hugo-modules/configuration/) 
+to create a virtual filesystem. 
+
+Adding new externally hosted documentation requires the following steps to be taken:
+
+1. (If necessary) Move the existing documentation to the new repository
+2. In this new repository, in the `docs` folder, create a file `go.mod` containing:
+
+```go
+module github.com/apache/flink-connector-<repositoryname>/docs
+
+go 1.18
+```
+
+Replace <repositoryname> with the name of your repository.
+See https://github.com/apache/flink-connector-elasticsearch/tree/main/docs/go.mod for an example.
+3. In this new repository, in the `docs` folder, create a `config.toml` file containing:
+
+```yaml
+module:
+  mounts:
+    - source: content/docs/connectors/datastream/<filename>.md
+      target: content/docs/connectors/datastream/<filename>.md

Review Comment:
   It seems that `source` and `target` are identical. The effort is big if there are many md files. Is Hugo smart enough to work without the yaml or only with `source` in this case(target contains redundant info)?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org