You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by nt...@apache.org on 2018/01/08 13:05:45 UTC
[2/2] cayenne-website git commit: - Move production domain
configuration to maven from Gulp internals - Add index pages for docs -
Modify .htaccess to match all content from old site version
- Move production domain configuration to maven from Gulp internals
- Add index pages for docs
- Modify .htaccess to match all content from old site version
Project: http://git-wip-us.apache.org/repos/asf/cayenne-website/repo
Commit: http://git-wip-us.apache.org/repos/asf/cayenne-website/commit/f2963e1b
Tree: http://git-wip-us.apache.org/repos/asf/cayenne-website/tree/f2963e1b
Diff: http://git-wip-us.apache.org/repos/asf/cayenne-website/diff/f2963e1b
Branch: refs/heads/master
Commit: f2963e1beb7dad5390165dd8f68edcdaf1ea3395
Parents: b69a24b
Author: Nikita Timofeev <st...@gmail.com>
Authored: Mon Jan 8 16:05:37 2018 +0300
Committer: Nikita Timofeev <st...@gmail.com>
Committed: Mon Jan 8 16:05:37 2018 +0300
----------------------------------------------------------------------
pom.xml | 4 +++-
src/main/assets/gulp/hugo.js | 2 +-
src/main/site/content/docs/3.1/_index.md | 5 +++++
src/main/site/content/docs/4.1/_index.md | 5 +++++
src/main/site/static/.htaccess | 24 +++++++++++++++++-------
5 files changed, 31 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cayenne-website/blob/f2963e1b/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index cb82662..91a5871 100644
--- a/pom.xml
+++ b/pom.xml
@@ -37,6 +37,8 @@
<!-- Host and port for dev mode, can be set via mvn (e.g. -Ddev.host="192.168.1.2" -Ddev.port=80) -->
<dev.host>localhost</dev.host>
<dev.port>3000</dev.port>
+ <!-- Production host -->
+ <prod.host>https://cayenne.apache.org</prod.host>
</properties>
<build>
@@ -73,7 +75,7 @@
<goal>gulp</goal>
</goals>
<configuration>
- <arguments>${gulp.task} --host ${dev.host} --port ${dev.port}</arguments>
+ <arguments>${gulp.task} --host ${dev.host} --port ${dev.port} --prod_host ${prod.host}</arguments>
</configuration>
</execution>
</executions>
http://git-wip-us.apache.org/repos/asf/cayenne-website/blob/f2963e1b/src/main/assets/gulp/hugo.js
----------------------------------------------------------------------
diff --git a/src/main/assets/gulp/hugo.js b/src/main/assets/gulp/hugo.js
index a61ce81..10bb3a3 100755
--- a/src/main/assets/gulp/hugo.js
+++ b/src/main/assets/gulp/hugo.js
@@ -30,7 +30,7 @@ function runHugo(publish) {
let cmd = hugo + ' --config=' + conf + ' -s ' + src + ' -d ' + dst;
if (publish) {
- cmd += ' --baseUrl="http://cayenne.apache.org/" ';
+ cmd += ' --baseUrl="' + argv.prod_host + '" ';
} else {
cmd += ' --baseUrl="http://' + argv.host + ':' + argv.port + '/" '
+ ' --buildDrafts=true --verbose=true';
http://git-wip-us.apache.org/repos/asf/cayenne-website/blob/f2963e1b/src/main/site/content/docs/3.1/_index.md
----------------------------------------------------------------------
diff --git a/src/main/site/content/docs/3.1/_index.md b/src/main/site/content/docs/3.1/_index.md
new file mode 100644
index 0000000..198d3d3
--- /dev/null
+++ b/src/main/site/content/docs/3.1/_index.md
@@ -0,0 +1,5 @@
+---
+cayenneVersion: "3.1"
+---
+
+Documentation, the JavaDoc API, examples and articles for Cayenne 3.1 can all be found here.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cayenne-website/blob/f2963e1b/src/main/site/content/docs/4.1/_index.md
----------------------------------------------------------------------
diff --git a/src/main/site/content/docs/4.1/_index.md b/src/main/site/content/docs/4.1/_index.md
new file mode 100644
index 0000000..10dda72
--- /dev/null
+++ b/src/main/site/content/docs/4.1/_index.md
@@ -0,0 +1,5 @@
+---
+cayenneVersion: "4.1"
+---
+
+Documentation, the JavaDoc API, examples and articles for Cayenne 4.1 can all be found here.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cayenne-website/blob/f2963e1b/src/main/site/static/.htaccess
----------------------------------------------------------------------
diff --git a/src/main/site/static/.htaccess b/src/main/site/static/.htaccess
index ee92fb7..c735229 100644
--- a/src/main/site/static/.htaccess
+++ b/src/main/site/static/.htaccess
@@ -21,15 +21,25 @@ Redirect permanent /release-guide.html /dev/release-guide.html
Redirect permanent /running-unit-tests.html /dev/running-unit-tests.html
# Remaping old -> new cayenne site
-Redirect permanent /support.html /about/support/index.html
-Redirect permanent /download.html /download/index.html
+Redirect permanent /support.html /about/support/
+Redirect permanent /download.html /download/
-# 4.0 docs
-Redirect permanent /docs/4.0/tutorial /docs/4.0/getting-started/index.html
-RedirectMatch permanent /docs/4\.0/tutorial/(.*)\.html$ /docs/4.0/getting-started/index.html
+# Remaping docbook based docs to asciidocs based
+RedirectMatch permanent ^/docs/([0-9\.]+)/tutorial/(.*)\.html$ /docs/$1/getting-started-guide/\#$2
+RedirectMatch permanent ^/docs/([0-9\.]+)/tutorial-rop/(.*)\.html$ /docs/$1/getting-started-rop/\#$2
+# Redirect all except index.html to exclude cyclic redirection
+RedirectMatch permanent ^/docs/([0-9\.]+)/cayenne-guide/(?!index)(.*)\.html$ /docs/$1/cayenne-guide/#$2
+RedirectMatch permanent ^/docs/([0-9\.]+)/upgrade-guide/(?!index)(.*)\.html$ /docs/$1/upgrade-guide/#$2
-# 4.1 docs
-RedirectMatch permanent /docs/4\.1/tutorial/(.*)\.html$ /docs/4.1/getting-started/index.html
+# Links without direct replacement in new site
+Redirect permanent /docs/legacy.html /docs/3.0/
+Redirect permanent /about.html /
+Redirect permanent /collaboration.html /
+Redirect permanent /thanks.html /
+Redirect permanent /release-guide-2.0.html /dev/release-guide.html
+RedirectMatch permanent ^/legacy(.*).html$ /
# Custom 404 error page
ErrorDocument 404 /404.html
+# Disable .git related content
+RedirectMatch 404 /\.git
\ No newline at end of file