Skip to content

Commit

Permalink
Merge pull request barryclark#9 from johncarl81/tweaks
Browse files Browse the repository at this point in the history
[WIP] Tweaks
  • Loading branch information
johncarl81 committed Feb 19, 2015
2 parents f68171c + 6d26240 commit cdf5deb
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 68 deletions.
103 changes: 55 additions & 48 deletions README.adoc
Original file line number Diff line number Diff line change
@@ -1,72 +1,48 @@
= Jekyll AsciiDoc Quickstart
:toc:

== Congratulations!
The Jekyll AsciiDoc Quickstart project is a leg-up in starting your own website hosted on Github with content based in AsciiDoc. This project combines the power of AsciiDoc with a beautiful CSS framework and blog-ready template on top of Github's existing publishing infrastructure.

You've taken the first step down an easy path of blogging with Jekyll. Not only that, you've chosen AsciiDoc over Markdown which will give you fine control of the structure of your posts, and will make them display beautifully when you publish them using the default mobile-first stylesheets included in this repository.

== GitHub Pages and AsciiDoc

GitHub Pages does not (yet) whitelist the jekyll-asciidoc plug-in, so you can not write `.adoc` posts and have them instantly publish like Markdown posts do.

Unlike some "fork and write" repositories that exist for Markdown blogs, you need to initially configure this repository fork with a computer to publish using AsciiDoc.

=== How We Work Around The Limitation

For this repository, the https://travis-ci.org/[Travis CI] Continuous Integration (CI) server emulates GitHub Pages staging automation, and pushes your blog live upon committing any change to the repository.

After initially configuring the repository, you can use Git command-line on your computer, or even a Git client on your tablet or smartphone to write, commit, and automatically publish blog posts.

=== Help Get AsciiDoc Whitelisted for GitHub Pages

You can help change the lack of native AsciiDoc support by creating a support case through http://github.com/support.

Tell the GitHub team that you want the choice to write in AsciiDoc, and have it handled the same way Markdown is when pushed to your GitHub Page.

Your voice counts: make it heard!

== Repository Structure

The repository requires the following structure to work correctly:

* **master**, for markup sources and configuration. This branch can be named anything you choose, however **master** is a general standard used in Jekyll blogs.
* **gh-pages**, for the generated static content produced by Travis CI. This branch is the username.github.io GitHub Pages domain, which is created automatically for you when the Travis CI job runs.

== Configuring the Repository for Publishing
== Directions

The goal of this procedure set is to configure a Travis CI job to listen for commits on the _master_ branch, automatically run the Jekyll build, and push the generated content to the _gh-pages_ branch.

=== Install Minimum Jekyll Requirements
=== 1. Install Minimum Jekyll Requirements

You must install some software to execute commands in subsequent procedures. Meet the Requirements on the http://jekyllrb.com/docs/installation/[Jekyll Installation] page, which links to pages describing how to install:

* ruby
* rubygems
You must install some software to execute commands in subsequent procedures. The Requirements on the http://jekyllrb.com/docs/installation/[Jekyll Installation] page describe how to install both ruby and rubygems.

For yum-based package managers, the command to run is:

$ sudo yum install ruby rubygems

=== Install Travis Gem
=== 2. Install Travis Gem

When you install rubygems, you can use the gem internal package management system to install the Travis CI gem. This gem contains--among other things--a command-line tool for easily encrypting GitHub tokens.

Run the following command to install the Travis gem:

$ gem install travis

=== Enable Travis CI
=== 3. Fork this Repository and Clone

To create your own copy of this repository, start by clicking the fork button in the upper right corner of the Github page.

Next, open a command line window and make a clone of your new repository:

$ git clone https://github.com/YOUR-USERNAME/jekyll-asciidoc-quickstart

=== 4. Enable Travis CI

Travis CI is configured initially through a browser.

To activate Travis CI for the Repository:

. Open https://travis-ci.org and create an account.
. Open your https://travis-ci.org/profile/[profile page] on Travis.
. Find the Jekyll repositorysitory, and turn on the switch.
. Click on repositorysitory settings (next to the switch) and enable “Build only if .travis.yml is present.”
. Find the Jekyll repository, and turn on the switch.
. Click on repository settings (next to the switch) and enable “Build only if .travis.yml is present.”

=== Generate a GitHub Personal Access Token
=== 5. Generate a GitHub Personal Access Token

Once the repository is activated in Travis, you need a GitHub token to pass into the Travis keytool.

Expand All @@ -76,11 +52,11 @@ To generate a new personal access token on GitHub:
. Select the scope _public_repository_, and add a terse description.
. Confirm and save the settings.

=== Encrypt the GitHub Token for Travis CI
=== 6. Encrypt the GitHub Token for Travis CI

With the GitHub token created, you can now pass it to the Travis command-line tool, which adds the encryped value to a file in your repository.
With the GitHub token created, you can now pass it to the Travis command-line tool, which adds the encrypted value to a file in your repository.

To encrypt the token and add it to the `.travis.yml` file:
To encrypt the token and add it to the `.travis.yml` file in your cloned repository:

. Move into the same directory as `env.global`.
. Run the following command, replacing `<token>` with the GitHub token from the previous step.
Expand All @@ -98,14 +74,45 @@ env:
+
. Commit all changes, and push to GitHub.

=== Verify the Configuration
$ git push

To verify if you have configured the repository correctly, open https://travis-ci.org and verify that Travis starts, and subsequenty finishes processing the job.
=== 6. Verify the Configuration

Travis places the built site into the _gh-pages_ branch upon completion.
To verify if you have configured the repository correctly, open https://travis-ci.org and verify that Travis starts, and subsequently finishes processing the job.

Travis should place the built site into the _gh-pages_ branch upon completion.

== Summary

If you can load the `[username].github.io/index.html/` home page, you have successfully completed basic configuration.
If you can load the `[username].github.io/jekyll-asciidoc-quickstart/index.html/` home page, you have successfully completed basic configuration.

Start writing blog posts and enjoy the AsciiDoc difference, regardless of what device you choose: computer, tablet, or mobile.

= Details

== GitHub Pages and AsciiDoc

GitHub Pages does not (yet) whitelist the jekyll-asciidoc plug-in, so you can not write `.adoc` posts and have them instantly publish like Markdown posts do.

Unlike some "fork and write" repositories that exist for Markdown blogs, you need to initially configure this repository fork with a computer to publish using AsciiDoc.

=== How We Work Around The Limitation

For this repository, the https://travis-ci.org/[Travis CI] Continuous Integration (CI) server emulates GitHub Pages staging automation, and pushes your blog live upon committing any change to the repository.

After initially configuring the repository, you can use Git command-line on your computer, or even a Git client on your tablet or smartphone to write, commit, and automatically publish blog posts.

=== Help Get AsciiDoc Whitelisted for GitHub Pages

You can help change the lack of native AsciiDoc support by creating a support case through http://github.com/support.

Tell the GitHub team that you want the choice to write in AsciiDoc, and have it handled the same way Markdown is when pushed to your GitHub Page.

Your voice counts: make it heard!

== Repository Structure

The repository requires the following structure to work correctly:

* **master**, for markup sources and configuration. This branch can be named anything you choose, however **master** is a general standard used in Jekyll blogs.
* **gh-pages**, for the generated static content produced by Travis CI. This branch is the username.github.io GitHub Pages domain, which is created automatically for you when the Travis CI job runs.
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# jekyll configuration

title: "Jekyll-asciidoc-quickstart"
pygments: true
highlighter: true

asciidoctor:
attributes:
Expand Down
16 changes: 0 additions & 16 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,22 +36,6 @@ <h1>
</li>
<li class="toggle-topbar menu-icon"><a href="#"><span>Menu</span></a></li>
</ul>

<section class="top-bar-section">
<!-- Left Nav Section -->
<ul class="right">
<li class="divider"></li>
<li class="has-dropdown">
<a class="active" href="#">Main Item 1</a>
<ul class="dropdown">
<li><label>Section Name</label></li>
<li><a href="#" class="">Dropdown Level 1</a></li>
<li><a href="#">Dropdown Option</a></li>
<li><a href="#">Dropdown Option</a></li>
</ul>
</li>
</ul>
</section>
</nav>
<!-- End Nav -->

Expand Down
9 changes: 6 additions & 3 deletions index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ You've successfully set up and deployed an Jekyll website powered by Asciidoc us

Now that you've set up your website to run with Asciidoc you have a ton of options available to you.

==== Update Look and feel
The layout provided with the https://github.com/asciidoctor/jekyll-asciidoc-quickstart[Jekyll-Asciidoc Quickstart] project is based on http://foundation.zurb.com[Foundation], a responsive design css framework. You're free to update the layout by editing the `_layouts/default.html` file and css under the `css` directory.

==== Edit content
Editing content is very simple. The easiest way to update your blog is to clone your repository, fire up your favorite text editor and run the content locally. To do this run the `jekyll serve` command and open a web browser to http://localhost:4000. Jekyll will automatically process and host changes to the content.

Expand All @@ -35,6 +32,12 @@ To display a list of posts, use Jekyll syntax similar to the following:
{% endraw %}
--


==== Update Look and feel
The layout provided with the https://github.com/asciidoctor/jekyll-asciidoc-quickstart[Jekyll-Asciidoc Quickstart] project is based on http://foundation.zurb.com[Foundation], a responsive design css framework. You're free to update the layout by editing the `_layouts/default.html` file and css under the `css` directory.

This blog layout is based on the http://foundation.zurb.com/templates/blog.html[Blog template].

==== Reference documentation
The following links will help with detailed explanations on Jekyll and Asciidoc.

Expand Down

0 comments on commit cdf5deb

Please sign in to comment.