aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@corte.si>2018-03-06 09:34:15 +1300
committerGitHub <noreply@github.com>2018-03-06 09:34:15 +1300
commit53a9be498ca07f7f90ea4c9d3029a7c0ca9f8663 (patch)
treef14abea5f973b62ef483fa9c80ffdac3dac22d93
parentb490a97b383903539074541a6fa191bc1b2717ab (diff)
parentee6937f948f96d74d413a24f89c2317ab582d0c8 (diff)
downloadmitmproxy-53a9be498ca07f7f90ea4c9d3029a7c0ca9f8663.tar.gz
mitmproxy-53a9be498ca07f7f90ea4c9d3029a7c0ca9f8663.tar.bz2
mitmproxy-53a9be498ca07f7f90ea4c9d3029a7c0ca9f8663.zip
Merge pull request #2955 from cortesi/ndocs
docs: start move to docs.mitmproxy.org
-rw-r--r--docs/bucketassets/error.html9
-rw-r--r--docs/bucketassets/robots.txt3
-rwxr-xr-xdocs/build3
-rwxr-xr-xdocs/setup7
-rw-r--r--docs/src/themes/mitmproxydocs/static/css/style.css24
-rw-r--r--docs/style/style.scss3
-rwxr-xr-xdocs/upload-archive17
-rwxr-xr-xdocs/upload-master8
-rwxr-xr-xdocs/upload-stable8
9 files changed, 66 insertions, 16 deletions
diff --git a/docs/bucketassets/error.html b/docs/bucketassets/error.html
new file mode 100644
index 00000000..a855e72b
--- /dev/null
+++ b/docs/bucketassets/error.html
@@ -0,0 +1,9 @@
+Not found
+<html>
+ <head>
+ <meta http-equiv="refresh" content="0;URL='/stable'" />
+ </head>
+ <body>
+ Not found - redirecting you to <a href="/stable">latest stable docs</a>.
+ </body>
+</html>
diff --git a/docs/bucketassets/robots.txt b/docs/bucketassets/robots.txt
new file mode 100644
index 00000000..da4c47d6
--- /dev/null
+++ b/docs/bucketassets/robots.txt
@@ -0,0 +1,3 @@
+User-agent: *
+Disallow: /archive/
+Disallow: /master/ \ No newline at end of file
diff --git a/docs/build b/docs/build
new file mode 100755
index 00000000..1ca3fdb8
--- /dev/null
+++ b/docs/build
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+cd src; hugo \ No newline at end of file
diff --git a/docs/setup b/docs/setup
new file mode 100755
index 00000000..8a9c31fd
--- /dev/null
+++ b/docs/setup
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+aws configure set preview.cloudfront true
+aws --profile mitmproxy \
+ s3 cp --acl public-read ./bucketassets/error.html s3://docs.mitmproxy.org/error.html
+aws --profile mitmproxy \
+ s3 cp --acl public-read ./bucketassets/robots.txt s3://docs.mitmproxy.org/robots.txt
diff --git a/docs/src/themes/mitmproxydocs/static/css/style.css b/docs/src/themes/mitmproxydocs/static/css/style.css
index 6029ddb6..868c7d0a 100644
--- a/docs/src/themes/mitmproxydocs/static/css/style.css
+++ b/docs/src/themes/mitmproxydocs/static/css/style.css
@@ -6731,20 +6731,16 @@ label.panel-block {
text-align: right; }
.sidebar {
- background-color: #F1F1F1;
-}
-
-.sidebar .version {
- padding: 1em; }
-
-.sidebar .brand {
- background-color: #303030;
- color: #c0c0c0;
- padding: 1em;
- top: 0; }
-
-.sidebar .menu {
- padding: 1em; }
+ background-color: #F1F1F1; }
+ .sidebar .version {
+ padding: 1em; }
+ .sidebar .brand {
+ background-color: #303030;
+ color: #c0c0c0;
+ padding: 1em;
+ top: 0; }
+ .sidebar .menu {
+ padding: 1em; }
.mainbody {
padding: 3em; }
diff --git a/docs/style/style.scss b/docs/style/style.scss
index 2c66a4c9..bc146fd5 100644
--- a/docs/style/style.scss
+++ b/docs/style/style.scss
@@ -11,7 +11,6 @@ $family-sans-serif: BlinkMacSystemFont, -apple-system, "Segoe UI", "Roboto", "Ox
@import "../node_modules/bulma/sass/layout/_all";
.sidebody {
- height: 100vh;
overflow-x: hidden;
overflow-y: scroll;
}
@@ -28,8 +27,8 @@ $family-sans-serif: BlinkMacSystemFont, -apple-system, "Segoe UI", "Roboto", "Ox
margin-bottom: 1em;
}
-
.sidebar {
+ background-color: #F1F1F1;
.version {
padding: 1em;
}
diff --git a/docs/upload-archive b/docs/upload-archive
new file mode 100755
index 00000000..5622a2ae
--- /dev/null
+++ b/docs/upload-archive
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+if [[ $# -eq 0 ]] ; then
+ echo "Please supply a version, e.g. 'v3'"
+ exit 1
+fi
+
+# This script uploads docs to a specified archive version.
+
+SPATH="/archive/$1"
+
+aws configure set preview.cloudfront true
+aws --profile mitmproxy \
+ s3 sync --acl public-read ./public s3://docs.mitmproxy.org$SPATH
+# aws --profile mitmproxy \
+# cloudfront create-invalidation --distribution-id E3UCZ4MLN4TO7U \
+# --paths "$SPATH"
diff --git a/docs/upload-master b/docs/upload-master
new file mode 100755
index 00000000..c8fcda80
--- /dev/null
+++ b/docs/upload-master
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+aws configure set preview.cloudfront true
+aws --profile mitmproxy \
+ s3 sync --acl public-read ./public s3://docs.mitmproxy.org/master
+# aws --profile mitmproxy \
+# cloudfront create-invalidation --distribution-id E3UCZ4MLN4TO7U \
+# --paths "/master"
diff --git a/docs/upload-stable b/docs/upload-stable
new file mode 100755
index 00000000..7c658113
--- /dev/null
+++ b/docs/upload-stable
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+aws configure set preview.cloudfront true
+aws --profile mitmproxy \
+ s3 sync --acl public-read ./public s3://docs.mitmproxy.org/stable
+# aws --profile mitmproxy \
+# cloudfront create-invalidation --distribution-id E3UCZ4MLN4TO7U \
+# --paths "/master"