You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ha...@apache.org on 2023/01/29 09:43:56 UTC

[iotdb] 01/03: try replace picture url

This is an automated email from the ASF dual-hosted git repository.

haonan pushed a commit to branch test_doc_pic
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit ce60678208e5bd161536a66053fd2edcb898d165
Author: HTHou <hh...@outlook.com>
AuthorDate: Sun Jan 29 16:07:30 2023 +0800

    try replace picture url
---
 docs/Development/HowtoContributeCode.md |  2 +-
 site/pom.xml                            | 20 ++++++++++++++++++++
 site/replace-picture-urls.sh            | 22 ++++++++++++++++++++++
 3 files changed, 43 insertions(+), 1 deletion(-)

diff --git a/docs/Development/HowtoContributeCode.md b/docs/Development/HowtoContributeCode.md
index e04ae94233..bb6a5ae001 100644
--- a/docs/Development/HowtoContributeCode.md
+++ b/docs/Development/HowtoContributeCode.md
@@ -122,7 +122,7 @@ How to review a pr
 
 2. Add review comments. First, move your mouse to the left. And then there will be a plus sign, click the plus sign. Second, write comments. Third, click Start a Review. At this step, all review comments will be temporarily saved, which others can not see.<img style="width:100%; max-width:800px; max-height:600px; margin-left:auto; margin-right:auto; display:block;" src="https://github.com/apache/iotdb-bin-resources/blob/main/docs/zh/development/howtocontributecode/%E4%BB%A3%E7%A0%81%E5%A [...]
 3. Submit review. After all the comments are added, click Review Changes and select your opinion. Select "Approve" for those that can be combined. Select  "Request Changes" or "Comment" for those that need to be modified. Select  "Comment" for those that are not sure. Finally, submit a review and only the person submitting the PR can see the review.
-<img style="width:100%; max-width:800px; max-height:600px; margin-left:auto; margin-right:auto; display:block;" src="https://github.com/apache/iotdb-bin-resources/blob/main/docs/zh/development/howtocontributecode/%E4%BB%A3%E7%A0%81%E5%AE%A1%E9%98%85%E6%B5%81%E7%A8%8B3.png?raw=tru">
+<img style="width:100%; max-width:800px; max-height:600px; margin-left:auto; margin-right:auto; display:block;" src="https://github.com/apache/iotdb-bin-resources/blob/main/docs/zh/development/howtocontributecode/%E4%BB%A3%E7%A0%81%E5%AE%A1%E9%98%85%E6%B5%81%E7%A8%8B3.png?raw=true">
 
 ### Merging a PR
 Make sure that all review comments are responded. 
diff --git a/site/pom.xml b/site/pom.xml
index b46ebeceef..c17d553be7 100644
--- a/site/pom.xml
+++ b/site/pom.xml
@@ -296,6 +296,26 @@
                             </execution>
                         </executions>
                     </plugin>
+                    <plugin>
+                        <artifactId>maven-antrun-plugin</artifactId>
+                        <version>3.1</version>
+                        <executions>
+                            <execution>
+                                <id>replace-picture-urls</id>
+                                <phase>process-resources</phase>
+                                <goals>
+                                    <goal>run</goal>
+                                </goals>
+                                <configuration>
+                                    <tasks>
+                                        <exec executable="/bin/bash">
+                                            <arg line="-c ./replace-picture-urls.sh"/>
+                                        </exec>
+                                    </tasks>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
                     <!--install node and npm, then run `npm install` and `npm run build`-->
                     <plugin>
                         <groupId>com.github.eirslett</groupId>
diff --git a/site/replace-picture-urls.sh b/site/replace-picture-urls.sh
new file mode 100644
index 0000000000..8394f11464
--- /dev/null
+++ b/site/replace-picture-urls.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+#
+# 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.
+#
+
+sed -i "" "s/github.com\/apache\/iotdb-bin-resources\/blob\/main\//gitbox.apache.org\/repos\/asf?p=iotdb-bin-resources.git;a=blob_plain;f=/g" `grep "?raw=true" -rl --include="*.md"`
+sed -i "" "s/?raw=true//g" `grep "?raw=true" -rl --include="*.md"`
\ No newline at end of file