forked from spring-projects/spring-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate documentation to asciidoctor
This commit migrates to asciidoctor to ease writing documentation. Issues: SPR-10960
- Loading branch information
Showing
57 changed files
with
37,268 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
= How to contribute to the reference | ||
|
||
The Spring reference now uses http://asciidoctor.org/[asciidoctor]. This document describes how to contribute documentation updates to the Spring reference. | ||
|
||
== Building with Gradle | ||
|
||
You can build the documentation using gradle using the `asciidoc` task. For example, from the project root execute the following command: | ||
|
||
gradlew asciidoc | ||
|
||
the output will be available at `spring-framework/build/asciidoc/index.html` | ||
|
||
== Live editing | ||
|
||
One of the nice features about using asciidoctor is the support for live editing. | ||
|
||
You will find a Guardfile already present at `spring-framework/src/asciidoc/Guardfile`. Then ensure to follow the setup instructions within the http://asciidoctor.org/docs/editing-asciidoc-with-live-preview/[Editing AsciiDoc with Live Preview] document. | ||
|
||
When running `guard start` within the `src/asciidoc/` folder, any changes to the `src/asciidoc/index.adoc` file will automatically be written at `src/asciidoc/build/index.html`. | ||
|
||
== Documentation notes | ||
|
||
Some notes on documentation | ||
|
||
* It is important to keep whitespaces to a minimum to make it simple to edit files. This means use an editor with line wrapping rather than manually inserting hard returns. | ||
* http://asciidoctor.org/docs/asciidoc-syntax-quick-reference/[Asciidoctor Quick Reference] | ||
* http://asciidoctor.org/docs/user-manual/[Asciidoctor Manual] | ||
* http://asciidoctor.org/docs/asciidoc-writers-guide/[Asciidoctor Writers Guide] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
require 'asciidoctor' | ||
require 'erb' | ||
require 'fileutils' | ||
|
||
FileUtils.mkdir_p('build') | ||
FileUtils.cp_r('images','build') | ||
|
||
guard 'shell' do | ||
watch(/^.*\.adoc$/) {|m| | ||
Asciidoctor.render_file(m[0], :to_dir => "build", :safe => Asciidoctor::SafeMode::UNSAFE, :attributes=> {'idprefix' => '', 'idseparator' => '-', 'copycss' => '', 'icons' => 'font', 'source-highlighter' => 'prettify', 'sectanchors' => '', 'doctype' => 'book','toc2' => '', 'spring-version' => '4.0.0.BUILD-SNAPSHOT', 'revnumber' => '4.0.0.BUILD-SNAPSHOT' }) | ||
} | ||
end | ||
|
||
guard 'livereload' do | ||
watch(%r{build/.+\.(css|js|html)$}) | ||
end |
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Large diffs are not rendered by default.
Oops, something went wrong.