You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geode.apache.org by metatype <gi...@git.apache.org> on 2017/02/24 20:13:14 UTC
[GitHub] geode-site pull request #1: GEODE-2507 Add gradle tasks for compile and view
GitHub user metatype opened a pull request:
https://github.com/apache/geode-site/pull/1
GEODE-2507 Add gradle tasks for compile and view
Add gradle tasks to make it really simple to compile and view
the website. The gradle task relies on a docker container,
apachegeode/geode-site-build that has the build chain preinstalled.
There's also a preliminary cut at improvements for publishing the
site content.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/metatype/geode-site master
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/geode-site/pull/1.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1
----
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] geode-site pull request #1: GEODE-2507 Add gradle tasks for compile and view
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/geode-site/pull/1
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] geode-site pull request #1: GEODE-2507 Add gradle tasks for compile and view
Posted by scmbuildguy <gi...@git.apache.org>.
Github user scmbuildguy commented on a diff in the pull request:
https://github.com/apache/geode-site/pull/1#discussion_r103038157
--- Diff: README.md ---
@@ -20,3 +20,58 @@ limitations under the License.
[](https://travis-ci.org/apache/geode-site) [](https://www.apache.org/licenses/LICENSE-2.0)
# Apache Geode Site
+
+This directory contains the source files for the project [website](https://geode.apache.org). Website content is written in [Markdown](https://help.github.com/articles/markdown-basics) and the site files are generated from that source by a tool called [Pandoc](http://johnmacfarlane.net/pandoc).
+
+Source files for the website are in `website/content`. Generated files for the website are in `build/content`.
+
+**NOTE:** To make changes to the [Apache Geode User Guide](http://geode.apache.org/docs/), which is published to the website:
+
+- Review [CONTRIBUTING](https://github.com/apache/geode/blob/develop/geode-docs/CONTRIBUTE.md) for information about contributing to the documentation source files.
+- Follow the [README](https://github.com/apache/geode/blob/develop/geode-book/README.md) for information about building a local version of the guide and adding it to the website.
+
+The website is updated by a "sync" tool that monitors the __asf-site__ branch
+of our Git repo, so after making changes you must place your updated source
+and generated files on the __asf-site__ branch and push.
+The content will be published to the
+[Geode website](http://geode.apache.org) after a 5-20 minute delay.
+
+## Prerequisites
--- End diff --
Looks like Bash is needed, so does that mean this is linux flavors only?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] geode-site pull request #1: GEODE-2507 Add gradle tasks for compile and view
Posted by scmbuildguy <gi...@git.apache.org>.
Github user scmbuildguy commented on a diff in the pull request:
https://github.com/apache/geode-site/pull/1#discussion_r103041344
--- Diff: build.gradle ---
@@ -16,10 +16,50 @@
*/
plugins {
- id "org.nosphere.apache.rat" version "0.3.0"
+ id 'org.nosphere.apache.rat' version '0.3.0'
+ id 'org.ajoberstar.grgit' version '1.6.0'
}
-apply plugin: "org.nosphere.apache.rat"
+apply plugin: 'org.ajoberstar.grgit'
+
+task clean << {
+ delete buildDir
+}
+
+def dockerCmd = "docker run -v '${projectDir}':/geode-site -p 3000:3000 -w /geode-site/website apachegeode/geode-site-build "
+
+task compile(type:Exec, dependsOn: rat) {
+ inputs.dir "${projectDir}/website"
+ outputs.dir "${buildDir}/content"
+ executable 'bash'
+ args "-c", dockerCmd + "nanoc compile"
+}
+
+task view(type:Exec, dependsOn: compile) {
+ executable 'bash'
+ args "-c", dockerCmd + "nanoc view"
+}
+
+task publish(dependsOn: compile) {
--- End diff --
Sounds good.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] geode-site pull request #1: GEODE-2507 Add gradle tasks for compile and view
Posted by metatype <gi...@git.apache.org>.
Github user metatype commented on a diff in the pull request:
https://github.com/apache/geode-site/pull/1#discussion_r103040225
--- Diff: README.md ---
@@ -20,3 +20,58 @@ limitations under the License.
[](https://travis-ci.org/apache/geode-site) [](https://www.apache.org/licenses/LICENSE-2.0)
# Apache Geode Site
+
+This directory contains the source files for the project [website](https://geode.apache.org). Website content is written in [Markdown](https://help.github.com/articles/markdown-basics) and the site files are generated from that source by a tool called [Pandoc](http://johnmacfarlane.net/pandoc).
+
+Source files for the website are in `website/content`. Generated files for the website are in `build/content`.
+
+**NOTE:** To make changes to the [Apache Geode User Guide](http://geode.apache.org/docs/), which is published to the website:
+
+- Review [CONTRIBUTING](https://github.com/apache/geode/blob/develop/geode-docs/CONTRIBUTE.md) for information about contributing to the documentation source files.
+- Follow the [README](https://github.com/apache/geode/blob/develop/geode-book/README.md) for information about building a local version of the guide and adding it to the website.
+
+The website is updated by a "sync" tool that monitors the __asf-site__ branch
+of our Git repo, so after making changes you must place your updated source
+and generated files on the __asf-site__ branch and push.
+The content will be published to the
+[Geode website](http://geode.apache.org) after a 5-20 minute delay.
+
+## Prerequisites
--- End diff --
You might be able to run under cygwin.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] geode-site pull request #1: GEODE-2507 Add gradle tasks for compile and view
Posted by scmbuildguy <gi...@git.apache.org>.
Github user scmbuildguy commented on a diff in the pull request:
https://github.com/apache/geode-site/pull/1#discussion_r103036407
--- Diff: README.md ---
@@ -20,3 +20,58 @@ limitations under the License.
[](https://travis-ci.org/apache/geode-site) [](https://www.apache.org/licenses/LICENSE-2.0)
# Apache Geode Site
+
+This directory contains the source files for the project [website](https://geode.apache.org). Website content is written in [Markdown](https://help.github.com/articles/markdown-basics) and the site files are generated from that source by a tool called [Pandoc](http://johnmacfarlane.net/pandoc).
+
+Source files for the website are in `website/content`. Generated files for the website are in `build/content`.
+
+**NOTE:** To make changes to the [Apache Geode User Guide](http://geode.apache.org/docs/), which is published to the website:
+
+- Review [CONTRIBUTING](https://github.com/apache/geode/blob/develop/geode-docs/CONTRIBUTE.md) for information about contributing to the documentation source files.
+- Follow the [README](https://github.com/apache/geode/blob/develop/geode-book/README.md) for information about building a local version of the guide and adding it to the website.
+
+The website is updated by a "sync" tool that monitors the __asf-site__ branch
+of our Git repo, so after making changes you must place your updated source
+and generated files on the __asf-site__ branch and push.
+The content will be published to the
+[Geode website](http://geode.apache.org) after a 5-20 minute delay.
+
+## Prerequisites
+
+To generate the site locally, you need to install java and docker.
+
+## How to change/update the website
+
+### 1. Find and edit the source files you need to change
+
+Source files for the website are in ``website/content``. When changing the content of the site, find the Markdown files that you
+need to edit and make your change. If you need to change the layout or styling of the site, then you will probably need to change
+an HTML, JS or CSS file.
+
+### 2. Locally generate the site and test your changes
+
+To generate the site content, run the `nanoc` compiler:
+
+ $ ./gradlew compile
+
+To view the generated site, run:
+
+ $ ./gradlew view
+
+and point your browser at `http://localhost:3000`. To make further changes, stop the build, edit files, recompile, and view again.
+
+### 3. Publish your changes to the site
+
+Once you are happy with your changes, commit them to the __master__ branch.
+The changes also need to be propagated to the __asf-site__ branch. Run the
+gradle command
+
+ $ ./gradlew publish
+
+to checkout the __asf-site__ branch and copy the website files. You will
+need to manually commit and push your changes on the __asf-site__ branch.
+
+The site should update in 5-10 minutes. If it does not,
--- End diff --
Earlier in the document it states update will have in 5-20 minutes, looking for consistency
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] geode-site pull request #1: GEODE-2507 Add gradle tasks for compile and view
Posted by metatype <gi...@git.apache.org>.
Github user metatype commented on a diff in the pull request:
https://github.com/apache/geode-site/pull/1#discussion_r103039403
--- Diff: README.md ---
@@ -20,3 +20,58 @@ limitations under the License.
[](https://travis-ci.org/apache/geode-site) [](https://www.apache.org/licenses/LICENSE-2.0)
# Apache Geode Site
+
+This directory contains the source files for the project [website](https://geode.apache.org). Website content is written in [Markdown](https://help.github.com/articles/markdown-basics) and the site files are generated from that source by a tool called [Pandoc](http://johnmacfarlane.net/pandoc).
+
+Source files for the website are in `website/content`. Generated files for the website are in `build/content`.
+
+**NOTE:** To make changes to the [Apache Geode User Guide](http://geode.apache.org/docs/), which is published to the website:
+
+- Review [CONTRIBUTING](https://github.com/apache/geode/blob/develop/geode-docs/CONTRIBUTE.md) for information about contributing to the documentation source files.
+- Follow the [README](https://github.com/apache/geode/blob/develop/geode-book/README.md) for information about building a local version of the guide and adding it to the website.
+
+The website is updated by a "sync" tool that monitors the __asf-site__ branch
+of our Git repo, so after making changes you must place your updated source
+and generated files on the __asf-site__ branch and push.
+The content will be published to the
+[Geode website](http://geode.apache.org) after a 5-20 minute delay.
+
+## Prerequisites
+
+To generate the site locally, you need to install java and docker.
+
+## How to change/update the website
+
+### 1. Find and edit the source files you need to change
+
+Source files for the website are in ``website/content``. When changing the content of the site, find the Markdown files that you
+need to edit and make your change. If you need to change the layout or styling of the site, then you will probably need to change
+an HTML, JS or CSS file.
+
+### 2. Locally generate the site and test your changes
+
+To generate the site content, run the `nanoc` compiler:
+
+ $ ./gradlew compile
+
+To view the generated site, run:
+
+ $ ./gradlew view
+
+and point your browser at `http://localhost:3000`. To make further changes, stop the build, edit files, recompile, and view again.
+
+### 3. Publish your changes to the site
+
+Once you are happy with your changes, commit them to the __master__ branch.
+The changes also need to be propagated to the __asf-site__ branch. Run the
+gradle command
+
+ $ ./gradlew publish
+
+to checkout the __asf-site__ branch and copy the website files. You will
+need to manually commit and push your changes on the __asf-site__ branch.
+
+The site should update in 5-10 minutes. If it does not,
--- End diff --
Thanks!
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] geode-site pull request #1: GEODE-2507 Add gradle tasks for compile and view
Posted by scmbuildguy <gi...@git.apache.org>.
Github user scmbuildguy commented on a diff in the pull request:
https://github.com/apache/geode-site/pull/1#discussion_r103036769
--- Diff: build.gradle ---
@@ -16,10 +16,50 @@
*/
plugins {
- id "org.nosphere.apache.rat" version "0.3.0"
+ id 'org.nosphere.apache.rat' version '0.3.0'
+ id 'org.ajoberstar.grgit' version '1.6.0'
}
-apply plugin: "org.nosphere.apache.rat"
+apply plugin: 'org.ajoberstar.grgit'
+
+task clean << {
+ delete buildDir
+}
+
+def dockerCmd = "docker run -v '${projectDir}':/geode-site -p 3000:3000 -w /geode-site/website apachegeode/geode-site-build "
+
+task compile(type:Exec, dependsOn: rat) {
+ inputs.dir "${projectDir}/website"
+ outputs.dir "${buildDir}/content"
+ executable 'bash'
+ args "-c", dockerCmd + "nanoc compile"
+}
+
+task view(type:Exec, dependsOn: compile) {
+ executable 'bash'
+ args "-c", dockerCmd + "nanoc view"
+}
+
+task publish(dependsOn: compile) {
--- End diff --
Should the publish task also do the 'push' as well? When I think I am going to publish something, I would think it do all the steps.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] geode-site pull request #1: GEODE-2507 Add gradle tasks for compile and view
Posted by metatype <gi...@git.apache.org>.
Github user metatype commented on a diff in the pull request:
https://github.com/apache/geode-site/pull/1#discussion_r103039387
--- Diff: build.gradle ---
@@ -16,10 +16,50 @@
*/
plugins {
- id "org.nosphere.apache.rat" version "0.3.0"
+ id 'org.nosphere.apache.rat' version '0.3.0'
+ id 'org.ajoberstar.grgit' version '1.6.0'
}
-apply plugin: "org.nosphere.apache.rat"
+apply plugin: 'org.ajoberstar.grgit'
+
+task clean << {
+ delete buildDir
+}
+
+def dockerCmd = "docker run -v '${projectDir}':/geode-site -p 3000:3000 -w /geode-site/website apachegeode/geode-site-build "
+
+task compile(type:Exec, dependsOn: rat) {
+ inputs.dir "${projectDir}/website"
+ outputs.dir "${buildDir}/content"
+ executable 'bash'
+ args "-c", dockerCmd + "nanoc compile"
+}
+
+task view(type:Exec, dependsOn: compile) {
+ executable 'bash'
+ args "-c", dockerCmd + "nanoc view"
+}
+
+task publish(dependsOn: compile) {
--- End diff --
I thought about that, but I'm hesitant to go all the way (git add/commit/push) since that would require a clean workspace and we'd have to figure out `git rm` cases. At least this can be used as a starting point and is less confusing than the prior `tar` instructions.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---