/scalate-website/src/site.page

http://github.com/scalate/scalate · Visualforce Page · 88 lines · 63 code · 25 blank · 0 comment · 0 complexity · c0da6d50e107b4926e956ba3f8bb77e1 MD5 · raw file

  1. ---
  2. title: Building
  3. --- name:overview
  4. # ${project_name} Site
  5. How the website works
  6. --- name:content pipeline:jade
  7. .left
  8. :markdown
  9. # How it works
  10. .right
  11. :&markdown
  12. The *#{project_name}* documentation and site is created using Scalate and is stored in git in the same [source control system as the code](source.html)
  13. **Note:** An [SBT build](sbt.html) is not necessary for contributions to documentation. The embedded webserver can display changes to page markup without re-compilation. An installation of [Maven](https://maven.apache.org/) is all that is required.
  14. **Note:** For code highlighting you will need to [install](http://pygments.org/download/) [http://pygments.org/](http://pygments.org). If the website project has been built without Pygments, it will need to be rebuilt.
  15. .left
  16. :markdown
  17. # Editing the source code
  18. .right
  19. :markdown
  20. If you [grab the source code](source.html), the site source is in the *scalate-website* directory.
  21. First the complete Scalate source must be (compiled and) installed. This pulls necessary code into Maven. In the Scalate [source code](source.html) directory
  22. {pygmentize:: text}
  23. mvn install
  24. {pygmentize}
  25. Then, using the .pom inside the folder, build the website as follows
  26. {pygmentize:: text}
  27. cd scalate-website
  28. mvn install
  29. {pygmentize}
  30. **Note:** Older versions of Scalate required Scalate to be [installed](documentation/installing.html). Current builds do not require this.
  31. If you want to edit the files in your text editor, and see the site re-rendered in a browser immediately, then run the embedded Jetty webserver
  32. {pygmentize:: text}
  33. mvn jetty:run
  34. {pygmentize}
  35. You can now surf the site on
  36. [http://0.0.0.0:8080/](http://0.0.0.0:8080/)
  37. Any changes to documentation will be seen on this server, immediately.
  38. If you are on OS X then we highly recommend [TextMate](http://macromates.com/) as a great editor which supports Textile and Markdown. Text editors which support either markup format are helpful. For example, EMACS has modes for Textile and Markdown in repository ("M-x package-list-packages" on EMACS versions > 24).
  39. .left
  40. :markdown
  41. # Deploying the site (new patches)
  42. .right
  43. :markdown
  44. You have a GitHub account, and are following the [contribution](http://scalate.fusesource.org/contributing.html) information. When you are happy, you need, on the [Scalate Github page](https://github.com/scalate/scalate), to click on the pull request button.
  45. .left
  46. :markdown
  47. # Deploying the site (known committer)
  48. .right
  49. :markdown
  50. The site is automatically deployed by the CI builds, so you can simply wait for the changes to be automatically pushed to the project site.
  51. You can manually deploy the site using Maven:
  52. {pygmentize:: text}
  53. mvn scalate:deploy
  54. {pygmentize}
  55. Though website deployment also occurs by default using the **deploy** goal in maven
  56. You will need to add the Scalate project's Web server to your Maven configuration:
  57. {pygmentize:: xml}
  58. <server>
  59. <id>website.fusesource.org</id>
  60. <username>xxxx</username>
  61. <password>xxxxx</password>
  62. </server>
  63. {pygmentize}