Giter VIP home page Giter VIP logo

jekyll-asciidoc-quickstart's Introduction

Jekyll AsciiDoc Quickstart

The Jekyll AsciiDoc Quickstart project provides a quick way to set up an AsciiDoc-based website using GitHub’s publishing infrastructure. This project combines the power of AsciiDoc with an elegant CSS foundation and a blog-ready template. Since it’s a repository template, all you need to do is create a new repository from this repository to create your website.

The project provides a GitHub Actions workflow that publishes your website whenever changes are pushed to the repository. The workflow watches for commits on the main (or master branch), automatically runs the Jekyll build with the AsciiDoc plugin enabled, and pushes the generated content to the gh-pages branch, from which it is hosted.

You can find a live website created from this repository at https://asciidoctor.github.io/jekyll-asciidoc-quickstart.

Create Your Website

Use the Template and Activate GitHub Pages

  1. Click the green Use this template button in the upper right corner of GitHub and select Create a new repository to create your own copy of this repository (i.e., fork).

    • After the process is complete, you’ll be directed to your fork.

    • The first GitHub Actions workflow will fail since GitHub Pages is not yet enabled in your fork.

  2. Access the Settings tab, then the Pages menu on the left.

  3. In the Source field, select the Github Actions option.

  4. Click the Save button to apply the changes.

  5. Navigate to Actions tab, click "Publish to GitHub Pages", click Run Workflow, then click Run workflow.

Verify the Build/Publish

After every push, the GitHub Action workflow is automatically started to build and publish your website. That takes a while. You can look for ✅ at the top of your repository home page.

If you can load the URL at https://github-username.github.io/name-of-repository, then you have successfully completed the basic configuration. Start writing blog posts and enjoy the AsciiDoc difference, regardless of what device you choose: computer, tablet, or mobile.

Run your Website Locally

You must install some software to build and serve your website locally. The requirements on the Jekyll Installation page describe how to install both Ruby and RubyGems.

If you would like to work offline first, consider checking your Gemfile for the versions of your gem sources. If the jekyll serve command fails, it likely means you don’t have the necessary gems installed You can check whether the jekyll gem is installed locally by running gem list --local | grep "jekyll".

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 published like Markdown posts do. However, the only additional thing we need is the publish.yml workflow which is already configured in this repository. You don’t have to change it, unless you want to perform some customization in the build/publish process.

Help Get AsciiDoc Whitelisted for GitHub Pages

You can help change the lack of native AsciiDoc support by creating a support case through https://github.com/support. This way, we won’t need a GitHub Action workflow anymore to publish AsciiDoc websites.

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:

  • main or master (legacy), for markup sources and configuration. This branch can be named anything you choose, however main is a general standard used in Jekyll blogs.

  • .github/workflows/publish.yml GitHub Action workflow to build the site and publish it to GitHub Pages.

jekyll-asciidoc-quickstart's People

Contributors

bitskri3g avatar helaili avatar jaredmorgs avatar jirutka avatar johncarl81 avatar manoelcampos avatar maxandersen avatar mojavelinux avatar tchaikov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jekyll-asciidoc-quickstart's Issues

Release Readiness

Just opening a thread to track status. Unless there's a better way, I figured a thread with a terse summary of remaining tasks could help watchers keep tabs.

We could set milestones, but I gather you guys are so close to release that a running list might be easier.

When you consider it ready for release, I'll fork it and do a real life test following the readme.

Thoughts?

Provide screenshots of the expected output

I'm setting up a workflow for GitLab-CI using the Jekyll-theme you provide.

In order to check if everything went right, it would be nice to have screenshots showing the expected output (e.g. in the README).

Here are screenshots (made with FireFox 48.0.2) of the output my workflow produced. Please let me know if this is the expected layout.

jekyll asciidoc quickstart
jekyll asciidoc quickstart_smaller
jekyll asciidoc quickstart_smallest

Step 7 - Error: unable to auto-detect email address

Hi, I followed the walkthrough and after step 6 Travis starts building, but I'm getting this error:

Can you help? On my local machine GIT ofcourse knows my name and e-mail, but it seems on the Travis server it is not known, but should be.

Run
  git config --global user.email "[email protected]"
  git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
fatal: unable to auto-detect email address (got 'travis@testing-docker-0ae8e4c3-04a6-490c-aadf-812e6f11d678.(none)')

env.global not present

I'm going through the instructions and got to section 6 ("Encrypt the GitHub Token for Travis CI"). #1 says to move to the directory with env.global, but I do not see that file.

I continued with the instructions and things seemed to work ok, but when I went to travis-ci.org to check on the build, it died with the following:

fatal: unable to auto-detect email address (got 'travis@testing-docker-4a9268cb-1d71-4fd1-a68f-ecb6023742e9.(none)')

rake aborted!

not sure if this is related to not having the env.global file? Or I am doing something stupid? Sorry I'm not too familiar with travis-ci.

Baseline style and content

I'd like to include a set of basic styles and content for user's to have as an example. The benefits of this is highlighting the features of jekyll-asciidoc and getting the user up and going with a good looking site with little or no effort. The drawback is that this content and style will probably be applied to a high percentage of the user's sites. Therefore we need to strike a balance between what to include and what to not include. Im thinking we should include the following:

  • Base css and layout - Bootstrap or another css framework along with the basic Asciidoctor css
  • Home page - Includes the steps to get up and running, much like the README should
  • Initial blog post - Maybe a bit less necessary, but this is a really neat feature of jekyll

Thoughts?

Upgrade to Jekyll 3

Now that the jekyll-asciidoc gem has been released with Jekyll 3 support, we can update this quickstart to Jekyll 3.

Note that GitHub Pages now runs Jekyll 3, so it's the mainstream version at this point.

cc: @mkobit

Consolidate stylesheets

The default page layout should not be loading both the default Asciidoctor stylesheet (asciidoctor.css) and Foundation (foundation.css). The default Asciidoctor stylesheet already includes Foundation (and Normalizer), so this combination includes a tremendous number of redundant (and potentially conflicting) styles.

What needs to be done is to create a combined stylesheet that includes Foundation and just the parts of the Asciidoctor stylesheet that supplement Foundation. This is essentially the use case that asciidoctor/asciidoctor-stylesheet-factory#18 is proposing to address.

The other approach is to simply start writing a new stylesheet for AsciiDoc components that includes only what is needed to style them within a Jekyll site. Admittedly, this is more time consuming, but will likely produce the most concise result in the end.

Gemfile is not up-to-date

The Gemfile has not the current jekyll and jekyll-asciidoc versions, resulting in error message:

WARN: Unresolved specs during Gem::Specification.reset:
      eventmachine (>= 0.12.9)
      ffi (< 2, >= 0.5.0)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
/usr/lib/ruby/vendor_ruby/bundler/resolver.rb:354:in `block in verify_gemfile_dependencies_are_found!': Could not find gem 'jekyll-asciidoc (~> 2.0.1)' in any of the gem sources listed in your Gemfile or available on this machine. (Bundler::GemNotFound)
	from /usr/lib/ruby/vendor_ruby/bundler/resolver.rb:330:in `each'
	from /usr/lib/ruby/vendor_ruby/bundler/resolver.rb:330:in `verify_gemfile_dependencies_are_found!'
	from /usr/lib/ruby/vendor_ruby/bundler/resolver.rb:199:in `start'
	from /usr/lib/ruby/vendor_ruby/bundler/resolver.rb:183:in `resolve'
	from /usr/lib/ruby/vendor_ruby/bundler/definition.rb:198:in `resolve'
	from /usr/lib/ruby/vendor_ruby/bundler/definition.rb:137:in `specs'
	from /usr/lib/ruby/vendor_ruby/bundler/definition.rb:182:in `specs_for'
	from /usr/lib/ruby/vendor_ruby/bundler/definition.rb:171:in `requested_specs'
	from /usr/lib/ruby/vendor_ruby/bundler/environment.rb:18:in `requested_specs'
	from /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:13:in `setup'
	from /usr/lib/ruby/vendor_ruby/bundler.rb:92:in `setup'
	from /home/mango/gems/gems/jekyll-3.8.3/lib/jekyll/plugin_manager.rb:50:in `require_from_bundler'
	from /home/mango/gems/gems/jekyll-3.8.3/exe/jekyll:11:in `<top (required)>'
	from /home/mango/gems/bin/jekyll:23:in `load'
	from /home/mango/gems/bin/jekyll:23:in `<main>'

to work locally with jekyll the Gemfile should look like:

source 'https://rubygems.org'

gem 'jekyll', '~> 3.8.3'
gem 'coderay', '~> 1.1.0'
gem 'rake-jekyll', '~> 1.1.0'

group :jekyll_plugins do
  gem 'jekyll-asciidoc', '~> 2.1.0'
end

maybe you could mention this in the wiki or/and in the "Edit content" section of the quickstart page.
Cheers!

GH-Pages site

It would be a great example to have a fork of the master repository, with the edits prescribed by the instructions, to actually work.

Sites that don't have '/' as a baseurl don't have working post links in the sidebar.

If your baseurl is anything except '/' (the default) the current code in default.html won't work:

        <h4>Posts</h4>
        <ul id="posts" class="posts nav">
            {% for post in site.posts limit: 5 %}
            <li><a href="{{ post.url }}">{{ post.navtitle }}</a></li>
            {% endfor %}
        </ul>

This used to be dealt with by using .{{ post.url }}, but that was removed because it double-prepended when you were browsing on a post. I think the correct fix is this:

<li><a href="{{ post.url | prepend:site.baseurl }}">{{ post.navtitle }}</a></li>

It appears to resolve both the old issue and the current one.

Generating the Encryption Key Using Methods Other Than the Travis CLI

From what I can see, the step in the Readme.adoc that shows you how to get your Travis key is the only barrier for folks who want to never touch a PC to configure this repo.

Undoubtably, the Travis CLI is the logical and safest way to get the key. http://docs.travis-ci.com/user/encryption-keys/ details the CLI way, but there is text on there that suggests there are other ways to do it.

I've opened a support request with Travis-CI to see if there is another way users can do this. If it is possible, we can achieve the command-line free solution for folks that either:

  1. Are restricted to only a tablet computer like an Android Tablet, iOS or Windows Tab
  2. Only want to use the tablet and do not want to touch the command line at all.

This would bring our forkable repo in line with jekyll-now functionality.

  1. Fork
  2. Configure (without a PC)
  3. Deploy

It might be impossible to avoid this one step on the PC, but it's worth asking the question anyway.

Oh no! Your permissions are insufficient to access this repository's settings

Hello,

I am trying to follow the steps in this doc and get an error at following step:

Click on repository settings (next to the switch) and enable “Build only if .travis.yml is present.”

This is the error:

Oh no! Your permissions are insufficient to access this repository's settings

and here are screenshots explaining what I did. I went to this screen:

travis-settings

and then clicked on settings gear icon. That gives me this screen:

error

what can I do to fix this? Thanks.

Ruby Sass has reached end-of-life and should no longer be used

When calling bundle install, i get:

Post-install message from sass:

Ruby Sass has reached end-of-life and should no longer be used.

* If you use Sass as a command-line tool, we recommend using Dart Sass, the new
  primary implementation: https://sass-lang.com/install

* If you use Sass as a plug-in for a Ruby web framework, we recommend using the
  sassc gem: https://github.com/sass/sassc-ruby#readme

* For more details, please refer to the Sass blog:
  https://sass-lang.com/blog/posts/7828841

Repurpose JAQ for Mini Docs Sites

@johncarl81 and I have been talking about how we can use the work done already with JAQ to help folks stand-up an AsciiDoc Docs Portal

This has come about from my work on the http://jaredmorgs.github.io/Pinball_Arcade_Users_Guide_Android/ which lives in https://github.com/jaredmorgs/Pinball_Arcade_Users_Guide_Android

I'm currently publishing this guide on the computer using Asciidoctor then pushing the index.html to the gh-pages branch. @johncarl81 created a PR on the repo that uses JAQ to publish the guide automatically on commit, very similar to how JAQ does it for blog posts.

The current status of the PR is published at http://johncarl81.github.io/Pinball_Arcade_Users_Guide_Android/

The vision we have is a "fork-and-go" repo with:

  • a dynamically created navigation for the docs.
  • docs stored in sub-folders in the repo for separation.
  • Foundation as the base L&F (because it is so responsive)

What we're having issues with:

  • Getting the TOC to work using JAQ.
  • Working out how to dynamically make the navigation.

Does anyone have any ideas how we might solve the issues we've seen to date?

Post Link `First Entry` is broken

The First Entry post link is broken. The link is set to https://asciidoctor.github.io/2015/01/01/first-entry.html but should be https://asciidoctor.github.io/jekyll-asciidoc-quickstart/2015/01/01/first-entry.html

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.