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:44 UTC
[1/2] cayenne-website git commit: Add 3.1 docs Link to apache repo in
publish profile
Repository: cayenne-website
Updated Branches:
refs/heads/master b81e46fbc -> f2963e1be
Add 3.1 docs
Link to apache repo in publish profile
Project: http://git-wip-us.apache.org/repos/asf/cayenne-website/repo
Commit: http://git-wip-us.apache.org/repos/asf/cayenne-website/commit/b69a24bd
Tree: http://git-wip-us.apache.org/repos/asf/cayenne-website/tree/b69a24bd
Diff: http://git-wip-us.apache.org/repos/asf/cayenne-website/diff/b69a24bd
Branch: refs/heads/master
Commit: b69a24bdbcd39d8c5ec6b7aa69e988838ce5d450
Parents: b81e46f
Author: Nikita Timofeev <st...@gmail.com>
Authored: Mon Jan 8 10:26:44 2018 +0300
Committer: Nikita Timofeev <st...@gmail.com>
Committed: Mon Jan 8 10:26:44 2018 +0300
----------------------------------------------------------------------
pom.xml | 2 +-
src/main/site/static/docs/3.1/api/script.js | 30 ++++++++++++++++++++++++
2 files changed, 31 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cayenne-website/blob/b69a24bd/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 33ff2c0..cb82662 100644
--- a/pom.xml
+++ b/pom.xml
@@ -132,7 +132,7 @@
<configuration>
<content>target/site/public</content>
<checkinComment>${msg}</checkinComment>
- <pubScmUrl>scm:git:git@github.com:stariy95/cayenne-website-demo.git</pubScmUrl>
+ <pubScmUrl>scm:git:https://git-wip-us.apache.org/repos/asf/cayenne-website.git</pubScmUrl>
<scmBranch>asf-site</scmBranch>
</configuration>
<executions>
http://git-wip-us.apache.org/repos/asf/cayenne-website/blob/b69a24bd/src/main/site/static/docs/3.1/api/script.js
----------------------------------------------------------------------
diff --git a/src/main/site/static/docs/3.1/api/script.js b/src/main/site/static/docs/3.1/api/script.js
new file mode 100644
index 0000000..b346356
--- /dev/null
+++ b/src/main/site/static/docs/3.1/api/script.js
@@ -0,0 +1,30 @@
+function show(type)
+{
+ count = 0;
+ for (var key in methods) {
+ var row = document.getElementById(key);
+ if ((methods[key] & type) != 0) {
+ row.style.display = '';
+ row.className = (count++ % 2) ? rowColor : altColor;
+ }
+ else
+ row.style.display = 'none';
+ }
+ updateTabs(type);
+}
+
+function updateTabs(type)
+{
+ for (var value in tabs) {
+ var sNode = document.getElementById(tabs[value][0]);
+ var spanNode = sNode.firstChild;
+ if (value == type) {
+ sNode.className = activeTableTab;
+ spanNode.innerHTML = tabs[value][1];
+ }
+ else {
+ sNode.className = tableTab;
+ spanNode.innerHTML = "<a href=\"javascript:show("+ value + ");\">" + tabs[value][1] + "</a>";
+ }
+ }
+}
[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
Posted by nt...@apache.org.
- 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