This is an automated email from the ASF dual-hosted git repository. madhan pushed a commit to branch ranger-2.7 in repository https://gitbox.apache.org/repos/asf/ranger.git
commit 7ae8267b9fd3e9910222e27da00666bde7a107f3 Author: Selvamohan Neethiraj <[email protected]> AuthorDate: Fri Apr 11 03:27:23 2025 -0400 RANGER-5189: modified to remove external site references from doc site (cherry picked from commit ae43615f850c0491c66246d1aed42a46f5df8946) --- docs/README.txt | 1 + docs/fix-external-site-reference.sh | 48 ++++++++++++++++++++++++++++++++++ docs/src/site/resources/css/custom.css | 4 +-- 3 files changed, 51 insertions(+), 2 deletions(-) diff --git a/docs/README.txt b/docs/README.txt index eb4f07444..cbe2cf968 100644 --- a/docs/README.txt +++ b/docs/README.txt @@ -25,6 +25,7 @@ $ export DOC_SRC_DIR=ranger/docs $ cd ${DOC_SRC_DIR} $ mvn site +$ sh fix-external-site-reference.sh # --------------------------------------------------------------------- diff --git a/docs/fix-external-site-reference.sh b/docs/fix-external-site-reference.sh new file mode 100755 index 000000000..f8fd64a81 --- /dev/null +++ b/docs/fix-external-site-reference.sh @@ -0,0 +1,48 @@ +#!/usr/bin/env bash +# Licensed 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. +EXT_DIR=external +EXT_URL_REF_FILE=/tmp/ext_ref_list.$$ +if [ -d target ] +then + cd target + [ -d ${EXT_DIR} ] && rm -rf ${EXT_DIR} + grep 'https://' *.html | grep -v '.apache.org' | grep '="https://' | awk -F'"' '{ print $2 }' | sort -u > ${EXT_URL_REF_FILE} + for url in `cat ${EXT_URL_REF_FILE}` + do + newname=`echo $url | sed -e "s@https://@${EXT_DIR}/@"` + dn=`dirname ${newname}` + fn=`basename ${newname}` + ext=`echo ${fn} | awk -F"." '{ if (NF > 1) { print $NF } }'` + if [ ! -z "${ext}" ] + then + #echo "+ mkdir -p ${dn}" + mkdir -p ${dn} + #echo "+ curl -o ${newname} ${url}" + curl -s -o ${newname} ${url} + #echo "$url => ./${newname}" + for f in *.html + do + cat ${f} | sed -e "s@${url}@./${newname}@g" > ${f}.$$ + #echo "+ diff ${f}.$$ ${f}" + #echo "+ ====================" + #diff ${f}.$$ ${f} + #echo "+ ====================" + mv ${f}.$$ ${f} + done + fi + done + rm -f ${EXT_URL_REF_FILE} +else + echo "ERROR: Unable to locate the target folder - Run 'mvn site' command before kicking off this script" + exit 1 +fi diff --git a/docs/src/site/resources/css/custom.css b/docs/src/site/resources/css/custom.css index e71b2f9f7..e41df59dd 100644 --- a/docs/src/site/resources/css/custom.css +++ b/docs/src/site/resources/css/custom.css @@ -112,7 +112,7 @@ body background-color: #67BE9C; border-radius: 0 0 50% 75%/0 0 100% 100%; transform: scaleX(1.5); - background-image: url(/background_design.png); + background-image: url(./../background_design.png); background-repeat: no-repeat; background-position: 300px -94px; background-size: 80%; @@ -283,4 +283,4 @@ table.bodyTable.table.table-striped.table-hover { .dropdown-backdrop{ display: none; -} \ No newline at end of file +}
