Skip to content

Commit 91f45ca

Browse files
Merge pull request #22730 from vikram-redhat/mvpreview
Updated scripts for preview
2 parents 656d759 + 1e80536 commit 91f45ca

File tree

9 files changed

+763
-0
lines changed

9 files changed

+763
-0
lines changed

scripts/analytics_fix.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
set -ev
3+
4+
NC='\033[0m' # No Color
5+
GREEN='\033[0;32m'
6+
7+
# Download analytics related files and move them to correct folders
8+
echo -e "${GREEN}==== Download files with removed analytics ====${NC}"
9+
wget https://raw.githubusercontent.com/openshift-docs/scripts/master/ocpdocs/_analytics_other.html -O _templates/_analytics_other.html
10+
wget https://raw.githubusercontent.com/openshift-docs/scripts/master/ocpdocs/_footer_other.html.erb -O _templates/_footer_other.html.erb
11+
wget https://raw.githubusercontent.com/openshift-docs/scripts/master/ocpdocs/_topnav_other.html -O _templates/_topnav_other.html
12+
wget https://raw.githubusercontent.com/openshift-docs/scripts/master/ocpdocs/index-commercial.html -O index-commercial.html
13+
wget https://raw.githubusercontent.com/openshift-docs/scripts/master/ocpdocs/search-commercial.html -O search-commercial.html

scripts/ocp_preview.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
set -ev
3+
4+
# Download the preview page
5+
wget https://raw.githubusercontent.com/openshift-docs/scripts/master/_previewpage
6+
7+
# Copy preview page into the _preview folder
8+
cp --verbose _previewpage _preview/index.html
9+
10+
#Download robots.txt
11+
wget https://raw.githubusercontent.com/openshift-docs/scripts/master/robots_preview.txt
12+
13+
# Copy robots into the _preview folder
14+
cp --verbose robots_preview.txt _preview/robots.txt
15+
16+
# Rename (head detached at fetch_head) folder to latest
17+
find _preview/ -depth -name '*(HEAD detached at FETCH_HEAD)*' -execdir bash -c 'mv "$0" "${0//(HEAD detached at FETCH_HEAD)/latest}"' {} \;
18+
19+
#Rename (head detached at fetch_head) to latest in all html files
20+
find _preview/ -type f -name '*.html' -exec sed -i 's/(HEAD detached at FETCH_HEAD)/latest/g' {} + ;
21+
22+
# Show file paths (uncomment for debug)
23+
find _preview/ -maxdepth 3
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<!-- Google Tag Manager -->
2+
<!-- Removed Google Analytics -->
3+
<!-- End Google Tag Manager -->
4+
5+
<!-- Adobe DTM -->
6+
<!-- Removed Adobe Analytics -->
7+
<!-- End Adobe DTM -->
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<footer id="rh">
2+
<div class="container">
3+
<div class="row">
4+
<div class="col-sm-2">
5+
<img src="https://assets.openshift.net/content/subdomain/redhat_logo.svg" class="img-fluid" alt="Red Hat" style="height: 40px;">
6+
</div>
7+
8+
<div class="col-sm-3">
9+
<p>Copyright © 2018 <span class="text-nowrap">Red Hat, Inc.</span></p>
10+
</div>
11+
12+
<div class="col-sm-5">
13+
<nav class="nav">
14+
<a href="https://www.redhat.com/en/about/privacy-policy" class="nav-link">Privacy statement</a>
15+
<a href="https://www.openshift.com/legal/terms/" class="nav-link">Terms of use</a>
16+
<a href="https://www.redhat.com/en/about/all-policies-guidelines" class="nav-link">All policies and guidelines</a>
17+
</nav>
18+
</div>
19+
20+
<div class="hidden-sm col-sm-2 powered-by">
21+
<a href="https://www.openshift.com/" title="Powered by OpenShift Online">
22+
<img src="https://www.openshift.com/images/logos/powered_by_openshift_reverse.png" alt="Powered by OpenShift Online">
23+
</a>
24+
</div>
25+
</div>
26+
</div>
27+
</footer>
28+
29+
<!-- Adobe DTM -->
30+
<!-- Removed Adobe Analytics -->
31+
<!-- End Adobe DTM -->

scripts/ocpdocs/_previewpage

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
<!DOCTYPE html>
2+
<html class="js flexbox flexboxlegacy canvas canvastext webgl no-touch geolocation postmessage no-websqldatabase indexeddb hashchange history draganddrop websockets rgba hsla multiplebgs backgroundsize borderimage borderradius boxshadow textshadow opacity cssanimations csscolumns cssgradients no-cssreflections csstransforms csstransforms3d csstransitions fontface generatedcontent video audio localstorage sessionstorage webworkers applicationcache svg inlinesvg smil svgclippaths">
3+
4+
<head>
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
7+
<meta charset="utf-8">
8+
<title>OpenShift Docs PR Review</title>
9+
<link href="https://assets.openshift.net/content/subdomain.css" rel="stylesheet" media="screen, print">
10+
<link href="/openshift-enterprise/latest/_stylesheets/commercial-home.css" rel="stylesheet">
11+
<header class="masthead masthead-docs text-center">
12+
<div class="container">
13+
<div class="title-inner">
14+
<h1>OpenShift Docs PR Preview</h1>
15+
</div>
16+
</div>
17+
</header>
18+
<div class="landing">
19+
<div class="container">
20+
<div class="row">
21+
<div class="col-md-10 col-centered">
22+
<div class="row">
23+
<div class="col-sm-3 text-center">
24+
<h2>OpenShift Online</h2>
25+
<div class="list-group">
26+
<p>
27+
<a role="button" class="btn btn-primary" href="/openshift-online/latest/welcome/index.html">
28+
<i class="fa fa-arrow-circle-o-right"></i> Online</a>
29+
</p>
30+
<p class="list-group-item-text">Red Hat's public cloud application deployment and hosting platform.</p>
31+
32+
</div>
33+
</div>
34+
<div class="col-sm-3 text-center">
35+
<h2>OpenShift Container Platform</h2>
36+
<div class="list-group">
37+
<p>
38+
<a role="button" class="btn btn-primary" href="/openshift-enterprise/latest/welcome/index.html">
39+
<i class="fa fa-arrow-circle-o-right"></i> Enterprise</a>
40+
</p>
41+
<p class="list-group-item-text">Red Hat's private, on-premise cloud application deployment and hosting platform.</p>
42+
43+
</div>
44+
</div>
45+
<div class="col-sm-3 text-center">
46+
<h2>OpenShift Dedicated</h2>
47+
<div class="list-group">
48+
<p>
49+
<a role="button" class="btn btn-primary" href="/openshift-dedicated/latest/welcome/index.html">
50+
<i class="fa fa-arrow-circle-o-right"></i> Dedicated</a>
51+
</p>
52+
<p class="list-group-item-text">Red Hat's managed public cloud application deployment and hosting service.</p>
53+
54+
</div>
55+
</div>
56+
<div class="col-sm-3 text-center">
57+
<h2>OpenShift Origin</h2>
58+
<div class="list-group">
59+
<p>
60+
<a role="button" class="btn btn-primary" href="/openshift-origin/latest/welcome/index.html">
61+
<i class="fa fa-arrow-circle-o-right"></i> Origin</a>
62+
</p>
63+
<p class="list-group-item-text">OpenShift's open source, upstream project.</p>
64+
65+
</div>
66+
</div>
67+
</div>
68+
</div>
69+
</div>
70+
</div>
71+
</div>
72+
</body>
73+
74+
</html>

scripts/ocpdocs/_topnav_other.html

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
<!-- Google Tag Manager (noscript) -->
2+
<!-- Removed Google Analytics -->
3+
<!-- End Google Tag Manager (noscript) -->
4+
5+
<nav id="main">
6+
<div class="container">
7+
<div class="row">
8+
<div class="navbar navbar-default navbar-openshift" role="navigation">
9+
<div class="navbar-header">
10+
<a href="#nav-main" class="dropdown-toggle navbar-menu-toggle hidden visible-xs" data-toggle="collapse">
11+
<span class="icon-bar"></span>
12+
<span class="icon-bar"></span>
13+
<span class="icon-bar"></span>
14+
</a>
15+
<a class="navbar-brand" target="_blank" href="https://www.openshift.com"></a>
16+
</div>
17+
<div id="nav-main" class="navbar-collapse collapse">
18+
<ul class="nav navbar-nav">
19+
20+
<li class="dropdown">
21+
<a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
22+
Products <span class="fa fa-angle-down"></span>
23+
</a>
24+
<ul class="dropdown-menu">
25+
<li><a target="_blank" href="https://www.openshift.com/products/">Overview</a></li>
26+
<li><a target="_blank" href="https://www.openshift.com/products/features/">Features</a></li>
27+
<li class="dropdown">
28+
<a class="dropdown-toggle" target="_blank" href="https://www.openshift.com/products/online/">Online</a>
29+
<ul class="dropdown-menu product" style="display: none;">
30+
<a target="_blank" href="https://www.openshift.com/products/online/">
31+
<li>
32+
<p><img src="https://assets.openshift.net/content/subdomain/Logotype_RH_OpenShiftOnline_wLogo_RGB_Gray.svg" alt="" class="img-responsive"></p>
33+
<p>The fastest way for developers to build, host and scale applications in the public cloud</p>
34+
</li>
35+
</a>
36+
</ul>
37+
</li>
38+
<li class="dropdown">
39+
<a class="dropdown-toggle" target="_blank" href="https://www.openshift.com/products/dedicated/">Dedicated</a>
40+
<ul class="dropdown-menu product" style="display: none;">
41+
<a target="_blank" href="https://www.openshift.com/products/dedicated/">
42+
<li>
43+
<p><img src="https://assets.openshift.net/content/subdomain/Logotype_RH_OpenShiftDedicated_wLogo_RGB_Gray.svg" alt="" class="img-responsive"></p>
44+
<p>Single-tenant, high-availability Kubernetes clusters in the public cloud</p>
45+
</li>
46+
</a>
47+
</ul>
48+
</li>
49+
<li class="dropdown">
50+
<a class="dropdown-toggle" target="_blank" href="https://www.openshift.com/products/container-platform/">Container Platform</a>
51+
<ul class="dropdown-menu product" style="display: none;">
52+
<a target="_blank" href="https://www.openshift.com/products/container-platform/">
53+
<li>
54+
<p><img src="https://assets.openshift.net/content/subdomain/Logotype_RH_OpenShiftContainerPlatform_wLogo_RGB_Gray.svg" alt="" class="img-responsive"></p>
55+
<p>Build, deploy and manage your applications across cloud- and on-premise infrastructure</p>
56+
</li>
57+
</a>
58+
</ul>
59+
</li>
60+
<li><a target="_blank" href="https://www.openshift.com/products/quay/">Quay</a></li>
61+
<li><a target="_blank" href="https://www.openshift.com/products/pricing/">Pricing</a></li>
62+
</ul>
63+
</li>
64+
65+
<li class="dropdown">
66+
<a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
67+
Learn <span class="fa fa-angle-down"></span>
68+
</a>
69+
<ul class="dropdown-menu">
70+
<li><a target="_blank" href="https://www.openshift.com/learn/what-is-openshift/">What Is OpenShift</a></li>
71+
<li><a target="_blank" href="https://www.openshift.com/learn/get-started/">Get Started</a></li>
72+
<li class="dropdown">
73+
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
74+
Technology Topics <span class="fa fa-angle-right"></span>
75+
</a>
76+
<ul class="dropdown-menu" style="display: none;">
77+
<li><a target="_blank" href="https://www.openshift.com/learn/topics/security/">Security</a></li>
78+
<li><a target="_blank" href="https://www.openshift.com/learn/topics/kubernetes/">Kubernetes</a></li>
79+
</ul>
80+
</li>
81+
<li><a target="_blank" href="https://www.openshift.com/learn/partners/">Partners</a></li>
82+
<li><a target="_blank" href="https://www.openshift.com/learn/success-stories/">Customer success stories</a></li>
83+
<li><a target="_blank" href="https://blog.openshift.com">Blog</a></li>
84+
<li><a target="_blank" href="https://www.openshift.com/learn/resources/">Resources</a></li>
85+
</ul>
86+
</li>
87+
88+
<li class="dropdown">
89+
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
90+
Community <span class="fa fa-angle-down"></span>
91+
</a>
92+
<ul class="dropdown-menu">
93+
<li><a target="_blank" href="https://commons.openshift.org">OpenShift Commons</a></li>
94+
<li><a target="_blank" href="https://www.okd.io">Open Source (OKD)</a></li>
95+
<li><a target="_blank" href="https://www.openshift.com/community/programs/startups/">Startups</a></li>
96+
<li><a target="_blank" href="https://www.openshift.com/community/programs/grants/">Grants</a></li>
97+
</ul>
98+
</li>
99+
100+
<li class="dropdown">
101+
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
102+
Support <span class="fa fa-angle-down"></span>
103+
</a>
104+
<ul class="dropdown-menu">
105+
<li><a target="_blank" href="https://help.openshift.com">Help Center</a></li>
106+
<li><a href="https://docs.openshift.com">OpenShift Docs</a></li>
107+
</ul>
108+
</li>
109+
110+
<li><a class="nav-sign-up" target="_blank" href="https://www.openshift.com/trial/">Free Trial</a></li>
111+
112+
<li><a target="_blank" href="https://manage.openshift.com" class="nav-log-in">Sign In <span class="fa fa-angle-right"></span></a></li>
113+
114+
</ul>
115+
</div>
116+
</div>
117+
</div>
118+
</div>
119+
</nav>

0 commit comments

Comments
 (0)