-
-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation improvements - Bundler, front matter #24
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,5 @@ | |
/*.gem | ||
/pkg/ | ||
/Gemfile.lock | ||
.idea | ||
*.iml |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,39 +21,52 @@ You can install the gem using: | |
|
||
$ gem install asciidoctor | ||
|
||
If you are using Bundler to manage the dependencies in your Jekyll project, then add the Asciidoctor gem instead to your `Gemfile` (below the Jekyll gem, named jekyll): | ||
If you are using Bundler to manage the dependencies in your Jekyll project, then add the Asciidoctor gem to your `Gemfile` (below the Jekyll gem, named jekyll): | ||
|
||
[source,ruby] | ||
---- | ||
source 'https://rubygems.org' | ||
|
||
gem 'jekyll' | ||
gem 'asciidoctor' | ||
---- | ||
|
||
Then, run the Bundler install command, `bundle`: | ||
|
||
$ bundle | ||
|
||
=== Using a release | ||
|
||
First, install the Jekyll AsciiDoc gem (named `jekyll-asciidoc`): | ||
Then, run the Bundler install command | ||
|
||
$ gem install jekyll-asciidoc` | ||
$ bundle install | ||
|
||
If you are using Bundler to manage the dependencies, add the `jekyll-asciidoc` gem to your `Gemfile`: | ||
=== Installing a released version of the plugin | ||
|
||
Using Bundler:: | ||
+ | ||
Add `jekyll-asciidoc` plugin gem to your `Gemfile` | ||
+ | ||
[source,ruby] | ||
gem 'jekyll-asciidoc' | ||
|
||
---- | ||
group :jekyll_plugins do | ||
gem "jekyll-asciidoc" | ||
end | ||
---- | ||
+ | ||
Then, run the Bundler command to install it: | ||
|
||
$ bundle | ||
|
||
Finally, add the `jekyll-asciidoc` gem to the list of gems for Jekyll to load in your site's `_config.yml` file: | ||
$ bundle install | ||
|
||
Without Bundler:: | ||
+ | ||
If you are not using Bundler for managing Jekyll then install gems manually | ||
+ | ||
$ gem install jekyll-asciidoc | ||
+ | ||
And then, add `jekyll-asciidoc` gem to the list of gems for Jekyll to load in your site's `_config.yml` file: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think the part about adding There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not really, when you're using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah. I did not realize that. I'm not sure I agree that's the best way for Jekyll to handle it, but I now see it is the recommended way. |
||
+ | ||
[source,yaml] | ||
---- | ||
gems: | ||
- jekyll-asciidoc | ||
---- | ||
|
||
=== Using the development version | ||
=== Installing development version of the plugin | ||
|
||
To install the development version of this plugin, copy `lib/asciidoc_plugin.rb` to the `_plugins` directory in the root of your site source. | ||
|
||
|
@@ -81,7 +94,7 @@ puts "Hello, World!" | |
---- | ||
.... | ||
|
||
IMPORTANT: The AsciiDoc file must have a Markdown-style front matter header or else it won't be recognized as a page. | ||
IMPORTANT: The AsciiDoc file must have a http://jekyllrb.com/docs/frontmatter/[YAML front matter] header or else it won't be recognized as a page. | ||
You can use an empty front matter header, as shown above, or you can define all your document metadata (e.g., document title) in the front matter instead of AsciiDoc attributes. | ||
|
||
You can now build your site using: | ||
|
@@ -91,6 +104,11 @@ You can now build your site using: | |
and preview it using: | ||
|
||
$ jekyll serve | ||
|
||
If you are using Bundler then use following commands to do the same | ||
|
||
$ bundle exec jekyll build | ||
$ bundle exec jekyll serve | ||
|
||
IMPORTANT: If you use the `--safe` option, the AsciiDoc plugin will not be activated. | ||
The `--safe` flag disables third-party plugins such as this one. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically the "install" part is not required. "install" is the default action for the
bundle
command.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Absolutely agree, but in this case my intention was to make command line to be more 'self-explanatory', for instance for people not familiar with
Bundler
.Although, I can delete
install
if you prefer.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please choose what you feel is best. I was just pointing it out. It was only recently I learned this trick.