[ 
https://issues.apache.org/jira/browse/KAFKA-16467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17837047#comment-17837047
 ] 

ASF GitHub Bot commented on KAFKA-16467:
----------------------------------------

showuon commented on code in PR #596:
URL: https://github.com/apache/kafka-site/pull/596#discussion_r1565129468


##########
README.md:
##########
@@ -10,4 +10,30 @@ You can run it with the following command, note that it 
requires docker:
 
 Then you can open [localhost:8080](http://localhost:8080) on your browser and 
browse the documentation.
 
-To kill the process, just type ctrl + c
\ No newline at end of file
+To kill the process, just type ctrl + c.
+
+## Preview latest kafka document
+
+1. Assume you have [kafka](https://github.com/apache/kafka) and kafka-site 
folder structure like this:
+
+```shell
+.
+├── kafka
+└── kafka-site
+```
+
+2. Generate document in kafka folder:

Review Comment:
   Generate document in kafka folder: -> Generating document from kafka 
repository:



##########
README.md:
##########
@@ -10,4 +10,30 @@ You can run it with the following command, note that it 
requires docker:
 
 Then you can open [localhost:8080](http://localhost:8080) on your browser and 
browse the documentation.
 
-To kill the process, just type ctrl + c
\ No newline at end of file
+To kill the process, just type ctrl + c.
+
+## Preview latest kafka document
+
+1. Assume you have [kafka](https://github.com/apache/kafka) and kafka-site 
folder structure like this:
+
+```shell
+.
+├── kafka
+└── kafka-site
+```
+

Review Comment:
   I think we don't need to have this assumption.



##########
README.md:
##########
@@ -10,4 +10,30 @@ You can run it with the following command, note that it 
requires docker:
 
 Then you can open [localhost:8080](http://localhost:8080) on your browser and 
browse the documentation.
 
-To kill the process, just type ctrl + c
\ No newline at end of file
+To kill the process, just type ctrl + c.
+
+## Preview latest kafka document

Review Comment:
   We could be consistent with the L1 title. Ex: 
   `How to preview the latest documentation changes in Kafka repository?`



##########
README.md:
##########
@@ -10,4 +10,30 @@ You can run it with the following command, note that it 
requires docker:
 
 Then you can open [localhost:8080](http://localhost:8080) on your browser and 
browse the documentation.
 
-To kill the process, just type ctrl + c
\ No newline at end of file
+To kill the process, just type ctrl + c.
+
+## Preview latest kafka document
+
+1. Assume you have [kafka](https://github.com/apache/kafka) and kafka-site 
folder structure like this:
+
+```shell
+.
+├── kafka
+└── kafka-site
+```
+
+2. Generate document in kafka folder:
+
+```shell
+./gradlew clean siteDocTar
+tar zxvf core/build/distributions/kafka_2.13-$(./gradlew properties | grep 
version: | awk '{print $NF}' | head -n 1)-site-docs.tgz
+```
+
+3. Running website in kafka-site folder and open 
[http://localhost:8080/dev/documentation/](http://localhost:8080/dev/documentation/):
+
+```shell
+rm -rf dev
+mkdir dev
+cp -r ../kafka/site-docs/* dev
+./start-preview.sh
+```

Review Comment:
   How about this:
   
   3. Copying the generated documents in Kafka repository into kafka-site, and 
preview them (note that it requires docker):
   
   ```shell
   # change directory into kafka-site repository
   cd KAFKA_SITE_REPO
   # copy the generated documents into dev folder
   rm -rf dev
   mkdir dev
   cp -r ../kafka/site-docs/* dev
   # preview it
   ./start-preview.sh
   ```
   
   Then you can open 
[http://localhost:8080/dev/documentation/](http://localhost:8080/dev/documentation/)
 on your browser and browse the generated documentation.



##########
README.md:
##########
@@ -10,4 +10,30 @@ You can run it with the following command, note that it 
requires docker:
 
 Then you can open [localhost:8080](http://localhost:8080) on your browser and 
browse the documentation.
 
-To kill the process, just type ctrl + c
\ No newline at end of file
+To kill the process, just type ctrl + c.
+
+## Preview latest kafka document
+
+1. Assume you have [kafka](https://github.com/apache/kafka) and kafka-site 
folder structure like this:
+
+```shell
+.
+├── kafka
+└── kafka-site
+```
+
+2. Generate document in kafka folder:
+
+```shell
+./gradlew clean siteDocTar
+tar zxvf core/build/distributions/kafka_2.13-$(./gradlew properties | grep 
version: | awk '{print $NF}' | head -n 1)-site-docs.tgz
+```

Review Comment:
   We didn't mention we are in kafka repo now. How about this:
   
   
   ```shell
   # change directory into kafka repository
   cd KAFKA_REPO
   ./gradlew clean siteDocTar
   # supposing built with scala 2.13
   tar zxvf core/build/distributions/kafka_2.13-$(./gradlew properties | grep 
version: | awk '{print $NF}' | head -n 1)-site-docs.tgz
   ```





> Add README to docs folder
> -------------------------
>
>                 Key: KAFKA-16467
>                 URL: https://issues.apache.org/jira/browse/KAFKA-16467
>             Project: Kafka
>          Issue Type: Improvement
>            Reporter: PoAn Yang
>            Assignee: PoAn Yang
>            Priority: Minor
>
> We don't have a guide in project root folder or docs folder to show how to 
> run local website. It's good to provide a way to run document with kafka-site 
> repository.
>  
> Option 1: Add links to wiki page 
> [https://cwiki.apache.org/confluence/display/KAFKA/Contributing+Website+Documentation+Changes]
>  and 
> [https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=67634793]. 
> Option 2: Show how to run the document within container. For example: moving 
> `site-docs` from kafka to kafka-site repository and run `./start-preview.sh`.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to