mirror of
https://github.com/rancher/rancher-docs.git
synced 2026-09-29 22:49:17 +00:00
@@ -1,11 +1,6 @@
|
|||||||
FROM rancher/docs:build as build
|
FROM rancher/docs:build as build
|
||||||
ARG ALGOLIA_APP_ID
|
|
||||||
ARG ALGOLIA_INDEX_NAME
|
|
||||||
ARG ALGOLIA_INDEX_FILE
|
|
||||||
ARG ALGOLIA_ADMIN_KEY
|
|
||||||
|
|
||||||
WORKDIR /run
|
WORKDIR /run
|
||||||
|
|
||||||
COPY gulpfile.babel.js /run/
|
COPY gulpfile.babel.js /run/
|
||||||
COPY .eslintrc.js /run/
|
COPY .eslintrc.js /run/
|
||||||
COPY config.toml /run/
|
COPY config.toml /run/
|
||||||
@@ -22,12 +17,6 @@ ENV HUGO_ENV production
|
|||||||
ADD https://github.com/rancherlabs/website-theme/archive/master.tar.gz master.tar.gz
|
ADD https://github.com/rancherlabs/website-theme/archive/master.tar.gz master.tar.gz
|
||||||
RUN tar -xzf master.tar.gz --strip 1 -C /run/node_modules/rancher-website-theme && rm master.tar.gz
|
RUN tar -xzf master.tar.gz --strip 1 -C /run/node_modules/rancher-website-theme && rm master.tar.gz
|
||||||
|
|
||||||
|
|
||||||
ENV ALGOLIA_APP_ID=$ALGOLIA_APP_ID
|
|
||||||
ENV ALGOLIA_INDEX_NAME=$ALGOLIA_INDEX_NAME
|
|
||||||
ENV ALGOLIA_INDEX_FILE=$ALGOLIA_INDEX_FILE
|
|
||||||
ENV ALGOLIA_ADMIN_KEY=$ALGOLIA_ADMIN_KEY
|
|
||||||
|
|
||||||
RUN gulp build
|
RUN gulp build
|
||||||
|
|
||||||
# Make sure something got built
|
# Make sure something got built
|
||||||
|
|||||||
@@ -1,11 +1,6 @@
|
|||||||
FROM rancher/docs:build as build
|
FROM rancher/docs:build as build
|
||||||
ARG ALGOLIA_APP_ID
|
|
||||||
ARG ALGOLIA_INDEX_NAME
|
|
||||||
ARG ALGOLIA_INDEX_FILE
|
|
||||||
ARG ALGOLIA_ADMIN_KEY
|
|
||||||
|
|
||||||
WORKDIR /run
|
WORKDIR /run
|
||||||
|
|
||||||
COPY gulpfile.babel.js /run/
|
COPY gulpfile.babel.js /run/
|
||||||
COPY .eslintrc.js /run/
|
COPY .eslintrc.js /run/
|
||||||
COPY config.toml /run/
|
COPY config.toml /run/
|
||||||
@@ -22,11 +17,6 @@ ENV HUGO_ENV production
|
|||||||
ADD https://github.com/rancherlabs/website-theme/archive/master.tar.gz master.tar.gz
|
ADD https://github.com/rancherlabs/website-theme/archive/master.tar.gz master.tar.gz
|
||||||
RUN tar -xzf master.tar.gz --strip 1 -C /run/node_modules/rancher-website-theme && rm master.tar.gz
|
RUN tar -xzf master.tar.gz --strip 1 -C /run/node_modules/rancher-website-theme && rm master.tar.gz
|
||||||
|
|
||||||
ENV ALGOLIA_APP_ID=$ALGOLIA_APP_ID
|
|
||||||
ENV ALGOLIA_INDEX_NAME=$ALGOLIA_INDEX_NAME
|
|
||||||
ENV ALGOLIA_INDEX_FILE=$ALGOLIA_INDEX_FILE
|
|
||||||
ENV ALGOLIA_ADMIN_KEY=$ALGOLIA_ADMIN_KEY
|
|
||||||
|
|
||||||
RUN gulp build-staging
|
RUN gulp build-staging
|
||||||
|
|
||||||
# Make sure something got built
|
# Make sure something got built
|
||||||
|
|||||||
+1
-1
@@ -205,7 +205,7 @@ gulp.task('publish:search-index', (cb) => {
|
|||||||
}).on('close', code => {
|
}).on('close', code => {
|
||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
console.log('Publishing to algolia', process.env.ALGOLIA_INDEX_NAME);
|
console.log('Publishing to algolia', process.env.ALGOLIA_INDEX_NAME);
|
||||||
atomicalgolia(process.env.ALGOLIA_INDEX_NAME, process.env.ALGOLIA_INDEX_FILE, (err, result) => {
|
atomicalgolia(process.env.ALGOLIA_INDEX_NAME, process.env.ALGOLIA_INDEX_FILE, {verbose: true}, (err, result) => {
|
||||||
console.log(result);
|
console.log(result);
|
||||||
cb(err);
|
cb(err);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -65,9 +65,12 @@ nodes.forEach(node => {
|
|||||||
// objectID is not quite unique yet so hash the entire object
|
// objectID is not quite unique yet so hash the entire object
|
||||||
paragraphOut.objectID = md5(JSON.stringify(paragraphOut));
|
paragraphOut.objectID = md5(JSON.stringify(paragraphOut));
|
||||||
|
|
||||||
if (paragraphOut.objectID === "d41d8cd98f00b204e9800998ecf8427e") {
|
if (true || paragraphOut.objectID === "d41d8cd98f00b204e9800998ecf8427e") {
|
||||||
console.log(paragraphOut)
|
console.log('====================================');
|
||||||
console.log(JSON.stringify(paragraphOut))
|
console.log('ID:',paragraphOut.objectID);
|
||||||
|
console.log('Paragraph:',paragraphOut)
|
||||||
|
console.log('JSON:',JSON.stringify(paragraphOut))
|
||||||
|
console.log('====================================');
|
||||||
}
|
}
|
||||||
|
|
||||||
nue.push(paragraphOut);
|
nue.push(paragraphOut);
|
||||||
|
|||||||
Reference in New Issue
Block a user