Code Monkey home page Code Monkey logo

pages-gem's Introduction

GitHub Pages Ruby Gem

A simple Ruby Gem to bootstrap dependencies for setting up and maintaining a local Jekyll environment in sync with GitHub Pages.

Gem Version Build Status

Usage

One may opt for the conventional approach of using the pages-gem or the containerized approach in which a Docker container is used to provide an environment with most dependencies pre-installed.

Conventional

Important: Make sure you have Bundler > v1.14 by running gem update bundler in your terminal before following the next steps.

  1. Add the following to your project's Gemfile:  
gem 'github-pages', group: :jekyll_plugins
  1. Run bundle install

Note: You are not required to install Jekyll separately. Once the github-pages gem is installed, you can build your site using jekyll build, or preview your site using jekyll serve. For more information about installing Jekyll locally, please see the GitHub Help docs on the matter.

Docker

Provided that Docker is installed, one may avoid the setup of additional tools within the environment by simply spawning a Docker container.

  1. Run make image from the root of the pages-gem directory to build an image which will be tagged as gh-pages
  • Alternatively use make image_alpine for a smaller alpine-based image
  1. Start an instance of the server by running either:
  • SITE=PATH_TO_YOUR_PROJECT make server from the root of the gh-pages repository (where the Makefile resides) or
  • SITE=PATH_TO_YOUR_PROJECT docker run --rm -p 4000:4000 -v `realpath ${SITE}`:/src/site gh-pages from any directory or
  • github-pages $PATH_TO_YOUR_PROJECT from any directory when func.sh has been sourced into your terminal session or
  • github-pages from the directory of the Jekyll site to be previewed when func.sh has been sourced into your terminal session.

Note: the github-pages function may be enabled by sourcing func.sh. This can be done by appending

source $PATH_TO_THIS_DIRECTORY/contrib/func.sh

to the scripts that load on initiation of a terminal session (usually ~/.bashrc on bash or ~/.zshrc on zsh).:

Running of github-pages inside a directory of a Jekyll site spawns a server on port 4000. One may explicitly provide a path to a Jekyll site and a port by running github-pages $PATH $PORT. This approach is provided as a user-friendlier alternative to the make server or docker run invocations mentioned as the first options in step 2.

The ordering of the arguments for the github-pages function is based on the assumption that it is more likely to need to specify a custom path rather than a custom port.

Command line usage

The GitHub Pages gem also comes with several command-line tools, contained within the github-pages command.

List dependency versions

$ bundle exec github-pages versions
+---------------------------+---------+
| Gem                       | Version |
+---------------------------+---------+
| jekyll                    | x.x.x   |
| kramdown                  | x.x.x   |
| liquid                    | x.x.x   |
| ....                      | ....    |
+---------------------------+---------+

Note, you can also pass the --gemfile flag to get the dependencies listed in a valid Gemfile dependency format. You can also see a list of the live dependency versions at pages.github.com/versions.

Health check

Checks your GitHub Pages site for common DNS configuration issues.

$ github-pages health-check
Checking domain foo.invalid...
Uh oh. Looks like something's fishy: A record points to deprecated IP address

See the GitHub Pages Health Check documentation for more information.

Bypassing the plugin whitelist

If you'd like to run a Jekyll plugin locally that's not whitelisted for use on GitHub Pages, you can do so by prefixing the jekyll build or jekyll serve command with DISABLE_WHITELIST=true. This will allow your site to use any plugin listed in your site's gems configuration flag. Please note, however, this option is only available when previewing your Jekyll site locally.

Updating

To update to the latest version of Jekyll and associated dependencies, simply run gem update github-pages, or if you've installed via Bundler, bundle update github-pages.

Project Goals

The goal of the GitHub Pages gem is to help GitHub Pages users bootstrap and maintain a Jekyll build environment that most closely matches the GitHub Pages build environment. The GitHub Pages gem relies on explicit requirements shared between both users' computers and the build servers to ensure that the result of a user's local build is consistently also the result of the server's build.

Additional tools, such as tools that integrate with the GitHub API to make managing GitHub Pages sites easier are not the primary goal, but may be within the project's scope.

What's versioned

The GitHub Pages gem seeks to version two aspects of the build environment:

1. Ruby

The version of Ruby with which Jekyll is executed. Although Jekyll itself may be compatible with prior or future versions of Ruby, different execution environments yield different results. Ruby 1.8.7 parses YAML differently than 1.9.3, for example, and Kramdown has trouble processing mailto links prior to 1.9.3. In order to ensure that building locally consistently results in the same build as what appears when published, it's essential that Ruby itself is versioned along side the Gem, despite no known incompatibilities.

2. Dependencies

This includes Markdown processors, and any other Jekyll dependency for which version incongruency may produce unexpected results. Traditionally, Maruku, Kramdown, RedCloth, liquid, rdiscount, and redcarpet have been strictly maintained due to known breaking changes.

Changelog

See all releases.

Releasing

To release a new version of this gem, run script/release from the master branch.

This will create and tag the release.

It will also create prs in the relevant repos and assign them to you. It is your responsibility to

  1. update the version of the gem in those repos
  2. deploy those services as needed

The relevant repos are:

  1. github-pages
  2. jekyll-build-pages
  3. pages.github.com

License

Distributed under the MIT License.

pages-gem's People

Contributors

agnostic-apollo avatar ain avatar benbalter avatar casperdcl avatar cetinajero avatar dehli avatar dependabot[bot] avatar dirtyf avatar felipesu19 avatar gjtorikian avatar hubot avatar jamesmgreene avatar jbarnette avatar jcudit avatar jldec avatar jriggins avatar kivikakk avatar matteeyah avatar mikemcquaid avatar mlinksva avatar parkr avatar pchaigno avatar spraints avatar stargator avatar toshimaru avatar tsusdere avatar vidbina avatar xhmikosr avatar yimysty avatar yoannchaudet 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  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

pages-gem's Issues

Github pages requires an older version of jekyll while my site requires a newer version

I have the following output for my github-pages:

$ github-pages versions
+-----------------------+---------+
| Gem                   | Version |
+-----------------------+---------+
| jekyll                | 2.4.0   |

Yet my site needs required_from_bundler which wasn't introduced until Jekyll 2.5.0. How do I tell github-pages to use Jekyll 2.5.0 so it's compatible with the rest of my site?

I've placed Jekyll version >= 2.5.0 in my gemfile but get this when I try to update:

$ bundle update jekyll
Fetching gem metadata from https://rubygems.org/.........
Resolving dependencies...
Bundler could not find compatible versions for gem "jekyll":
  In Gemfile:
    jekyll (>= 2.5.0) ruby

    github-pages (= 33) ruby depends on
      jekyll (2.4.0)

Support for GitHub metadata when developing locally?

As far as I can tell, there is no way to test parts of a Jekyll site that uses site.github.* variables locally without pushing them to GitHub. Am I missing something there?

If not, I think that that feature would be a great addition to this gem. It would simply perform the same function that the build server's configuration performs in adding those metadata variables, but do it locally.

Is this a feature that you would be willing to include if I wrote the code for it?

Failed to build gem native extension

Hello, all

I met a snag as the following:

root@ubuntu:/home/eduOSS# gem install github-pages
Building native extensions.  This could take a while...
ERROR:  Error installing github-pages:
    ERROR: Failed to build gem native extension.

    /usr/bin/ruby2.1 -r ./siteconf20150418-11838-636jct.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h

extconf failed, exit code 1

Gem files will remain installed in /var/lib/gems/2.1.0/gems/fast-stemmer-1.0.2 for inspection.
Results logged to /var/lib/gems/2.1.0/extensions/x86_64-linux/2.1.0/fast-stemmer-1.0.2/gem_make.out

The version of Ruby installed is ruby 2.1.5p273 (2014-11-13 revision 48405) [x86_64-linux-gnu]

Could anyone please tell me why and how to tackle it? Thanks very much.

Doesn't install on Ruby 2.0.0

$ ruby --version
ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.4.0]
$ gem install github-pages
Fetching: RedCloth-4.2.9.gem (100%)
Building native extensions.  This could take a while...
Successfully installed RedCloth-4.2.9
Fetching: rdiscount-1.6.8.gem (100%)
Building native extensions.  This could take a while...
Successfully installed rdiscount-1.6.8
Fetching: github-pages-1.gem (100%)
ERROR:  Error installing github-pages:
    github-pages requires Ruby version ~> 1.9.3.

Please try out Maruku 0.7.0.beta1

Hi GitHub,

I've just released a new beta of Maruku, which is used by GitHub pages. This is the first new release in over 4 years, and a lot has changed in the meantime. I'd really appreciate it if you'd try out the new version and file any issues you find at https://github.com/bhollis/maruku. I'd rather find out about problems before releasing the final version.

Thanks!

Support relative links with both markdown as well as jekyll

[I filed this issue originally as https://github.com/github/markup/issues/298]

I have a documentation for my project stored in markdown files, which is served and rendered fine through github.

I'd like to reuse those files to build my project website (using jekyll). However, there is no way to write links such that they work directly with markdown as well as with the generated html.
In other words, right now I have to edit my markdown files before I can incorporate them into the website.
(A related but likely out-of-scope issue is that ideally I would like for my website (which uses a gh-pages branch of my repo) to pull the markdown out of the master branch automatically, so the website gets updated automatically whenever I add to my documentation on the master branch...)

maraku gem not found

I'm trying to use https://github.com/robwierzbowski/generator-jekyllrb to run my github pages site. I added the github pages gem to the end of the gemfile this generator created

source "http://rubygems.org"

gem 'jekyll', '~>1.4.0'
gem 'redcarpet'
gem 'compass', '>=0.12'
gem 'github-pages'

running bundle renders

Fetching gem metadata from http://rubygems.org/........
Fetching additional metadata from http://rubygems.org/..
Resolving dependencies...
Bundler could not find compatible versions for gem "maruku":
  In Gemfile:
    github-pages (>= 0) ruby depends on
      maruku (= 0.6.1) ruby

    jekyll (~> 1.4.0) ruby depends on
      maruku (0.7.1)

any help?

Jekyll 3?

Any ETA on new Jekyll updates for GitHub Pages?

Relax pygments.rb dependency

Please modify the pygments.rb dependency version from 0.6.1 to ~>0.6.1 or better yet >=0.6.3 for the following reasons:

I'm trying to use this one:

source 'https://rubygems.org'
# for some reason omitting the verison defaults to 0
gem 'github-pages', '>=37'
# contains fix for https://github.com/tmm1/pygments.rb/pull/90
gem 'pygments.rb', '>=0.6.3'
# temporarily while wdm 0.1 merges https://github.com/Maher4Ever/wdm/pull/16
gem 'wdm', :git => 'git://github.com/lowjoel/wdm.git' if Gem.win_platform?

and result is:

Bundler could not find compatible versions for gem "pygments.rb":
  In Gemfile:
    github-pages (>= 37) x64-mingw32 depends on
      pygments.rb (= 0.6.1) x64-mingw32

    pygments.rb (~> 0.6.0) x64-mingw32

    pygments.rb (>= 0.6.3) x64-mingw32

Why not use etag of date modified in header?

I'm wondering why there isn't better caching? For example: curl -I http://www.sowhatsbitcoin.com has no etag and instead uses an expiry date.

Seems since the sites are static it would be straightforward to use etags based on modified time so clients would pull from cache when content is unchanged.

`encode': "\xE9" from ASCII-8BIT to UTF-8 (Encoding::UndefinedConversionError)

:!bundle exec jekyll build

This error is from terminal vim when I excute command above. I'm surprised that the same command works well in terminal.

Configuration file: /Users/hilojack/www/jek/_config.yml
   Source: /Users/hilojack/www/jek
   Destination: /Users/hilojack/www/jek/_site
  Generating...  
Conversion error: There was an error converting '_posts/2013-1-1-code-rmb.md/#excerpt'.
/Library/Ruby/Gems/2.0.0/gems/kramdown-1.3.1/lib/kramdown/parser/base.rb:92:in `encode': "\xE9" from ASCII-8BIT to UTF-8 (Encoding::UndefinedConversionError)
from /Library/Ruby/Gems/2.0.0/gems/kramdown-1.3.1/lib/kramdown/parser/base.rb:92:in `adapt_source'
from /Library/Ruby/Gems/2.0.0/gems/kramdown-1.3.1/lib/kramdown/parser/kramdown.rb:89:in `parse'
from /Library/Ruby/Gems/2.0.0/gems/kramdown-1.3.1/lib/kramdown/parser/base.rb:67:in `parse'
from /Library/Ruby/Gems/2.0.0/gems/kramdown-1.3.1/lib/kramdown/document.rb:107:in `initialize'
from /Library/Ruby/Gems/2.0.0/gems/jekyll-1.5.1/lib/jekyll/converters/markdown/kramdown_parser.rb:23:in `new'
from /Library/Ruby/Gems/2.0.0/gems/jekyll-1.5.1/lib/jekyll/converters/markdown/kramdown_parser.rb:23:in `convert'
from /Library/Ruby/Gems/2.0.0/gems/jekyll-1.5.1/lib/jekyll/converters/markdown.rb:39:in `convert'
from /Library/Ruby/Gems/2.0.0/gems/jekyll-1.5.1/lib/jekyll/convertible.rb:57:in `transform'
from /Library/Ruby/Gems/2.0.0/gems/jekyll-1.5.1/lib/jekyll/convertible.rb:153:in `do_layout'
from /Library/Ruby/Gems/2.0.0/gems/jekyll-1.5.1/lib/jekyll/post.rb:256:in `render'
from /Library/Ruby/Gems/2.0.0/gems/jekyll-1.5.1/lib/jekyll/site.rb:239:in `block in render'
from /Library/Ruby/Gems/2.0.0/gems/jekyll-1.5.1/lib/jekyll/site.rb:238:in `each'
from /Library/Ruby/Gems/2.0.0/gems/jekyll-1.5.1/lib/jekyll/site.rb:238:in `render'
from /Library/Ruby/Gems/2.0.0/gems/jekyll-1.5.1/lib/jekyll/site.rb:39:in `process'
from /Library/Ruby/Gems/2.0.0/gems/jekyll-1.5.1/lib/jekyll/command.rb:18:in `process_site'
from /Library/Ruby/Gems/2.0.0/gems/jekyll-1.5.1/lib/jekyll/commands/build.rb:23:in `build'
from /Library/Ruby/Gems/2.0.0/gems/jekyll-1.5.1/lib/jekyll/commands/build.rb:7:in `process'
from /Library/Ruby/Gems/2.0.0/gems/jekyll-1.5.1/bin/jekyll:77:in `block (2 levels) in <top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/commander-4.1.6/lib/commander/command.rb:180:in `call'
from /Library/Ruby/Gems/2.0.0/gems/commander-4.1.6/lib/commander/command.rb:180:in `call'
from /Library/Ruby/Gems/2.0.0/gems/commander-4.1.6/lib/commander/command.rb:155:in `run'
from /Library/Ruby/Gems/2.0.0/gems/commander-4.1.6/lib/commander/runner.rb:422:in `run_active_command'
from /Library/Ruby/Gems/2.0.0/gems/commander-4.1.6/lib/commander/runner.rb:82:in `run!'
from /Library/Ruby/Gems/2.0.0/gems/commander-4.1.6/lib/commander/delegates.rb:8:in `run!'
from /Library/Ruby/Gems/2.0.0/gems/commander-4.1.6/lib/commander/import.rb:10:in `block in <top (required)>'

shell returned 1

Update kramdown to 1.3.0?

Hi I've an existing Jekyll site which I want to convert to using Kramdown (mainly for its footnote support), but it converts line breaks into <br> which is not intended, and it would be time consuming to change all posts to remove the right line breaks.

Since 1.3.0 there is an option in Kramdown to turn this off (hard_wrap), but GitHub Pages uses 1.2.0 so this option is not available there. Would be cool if Kramdown could be updated to 1.3.0, AFAIK there were no BC breaks introduced (http://kramdown.gettalong.org/news.html).

Sigentation fault after upgrade to github-pages-38

After upgrade from github-pages-35 to github-pages-38, bundle exec jekyll serve will fail
as Segmentation fault:

*** Error in `ruby': free(): invalid pointer: 0x0000000003d92520 ***
/home/fge/.gem/ruby/gems/celluloid-0.16.0/lib/celluloid.rb:478: [BUG] Segmentation fault
ruby 2.0.0p598 (2014-11-13) [x86_64-linux]

-- Control frame information -----------------------------------------------
c:0020 p:---- s:0081 e:000080 CFUNC  :require
c:0019 p:0242 s:0077 e:000076 TOP    /home/fge/.gem/ruby/gems/celluloid-0.16.0/lib/celluloid.rb:478 [FINISH]
c:0018 p:---- s:0075 e:000074 CFUNC  :require
c:0017 p:0007 s:0071 e:000070 TOP    /home/fge/.gem/ruby/gems/listen-2.10.1/lib/listen.rb:1 [FINISH]
c:0016 p:---- s:0069 e:000068 CFUNC  :require
c:0015 p:0009 s:0065 e:000064 METHOD /home/fge/.gem/ruby/gems/jekyll-watch-1.2.1/lib/jekyll/watcher.rb:26
c:0014 p:0028 s:0060 e:000059 METHOD /home/fge/.gem/ruby/gems/jekyll-watch-1.2.1/lib/jekyll/watcher.rb:7
c:0013 p:0031 s:0053 e:000052 METHOD /home/fge/.gem/ruby/gems/jekyll-2.4.0/lib/jekyll/commands/build.rb:67
c:0012 p:0115 s:0048 e:000047 METHOD /home/fge/.gem/ruby/gems/jekyll-2.4.0/lib/jekyll/commands/build.rb:37
c:0011 p:0049 s:0043 e:000042 BLOCK  /home/fge/.gem/ruby/gems/jekyll-2.4.0/lib/jekyll/commands/serve.rb:25 [FINISH]
c:0010 p:---- s:0039 e:000038 CFUNC  :call
c:0009 p:0012 s:0034 e:000033 BLOCK  /home/fge/.gem/ruby/gems/mercenary-0.3.5/lib/mercenary/command.rb:220 [FINISH]
c:0008 p:---- s:0031 e:000030 CFUNC  :each
c:0007 p:0044 s:0028 e:000027 METHOD /home/fge/.gem/ruby/gems/mercenary-0.3.5/lib/mercenary/command.rb:220
c:0006 p:0082 s:0023 e:000022 METHOD /home/fge/.gem/ruby/gems/mercenary-0.3.5/lib/mercenary/program.rb:42
c:0005 p:0037 s:0017 e:000016 METHOD /home/fge/.gem/ruby/gems/mercenary-0.3.5/lib/mercenary.rb:19
c:0004 p:0104 s:0012 E:000fe8 TOP    /home/fge/.gem/ruby/gems/jekyll-2.4.0/bin/jekyll:18 [FINISH]
c:0003 p:---- s:0010 e:000009 CFUNC  :load
c:0002 p:0118 s:0006 E:0017b8 EVAL   /home/fge/bin/jekyll:23 [FINISH]
c:0001 p:0000 s:0002 E:000308 TOP    [FINISH]

-- Ruby level backtrace information ----------------------------------------
/home/fge/bin/jekyll:23:in `<main>'
/home/fge/bin/jekyll:23:in `load'
/home/fge/.gem/ruby/gems/jekyll-2.4.0/bin/jekyll:18:in `<top (required)>'
/home/fge/.gem/ruby/gems/mercenary-0.3.5/lib/mercenary.rb:19:in `program'
/home/fge/.gem/ruby/gems/mercenary-0.3.5/lib/mercenary/program.rb:42:in `go'
/home/fge/.gem/ruby/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `execute'
/home/fge/.gem/ruby/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `each'
/home/fge/.gem/ruby/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `block in execute'
/home/fge/.gem/ruby/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `call'
/home/fge/.gem/ruby/gems/jekyll-2.4.0/lib/jekyll/commands/serve.rb:25:in `block (2 levels) in init_with_program'
/home/fge/.gem/ruby/gems/jekyll-2.4.0/lib/jekyll/commands/build.rb:37:in `process'
/home/fge/.gem/ruby/gems/jekyll-2.4.0/lib/jekyll/commands/build.rb:67:in `watch'
/home/fge/.gem/ruby/gems/jekyll-watch-1.2.1/lib/jekyll/watcher.rb:7:in `watch'
/home/fge/.gem/ruby/gems/jekyll-watch-1.2.1/lib/jekyll/watcher.rb:26:in `build_listener'
/home/fge/.gem/ruby/gems/jekyll-watch-1.2.1/lib/jekyll/watcher.rb:26:in `require'
/home/fge/.gem/ruby/gems/listen-2.10.1/lib/listen.rb:1:in `<top (required)>'
/home/fge/.gem/ruby/gems/listen-2.10.1/lib/listen.rb:1:in `require'
/home/fge/.gem/ruby/gems/celluloid-0.16.0/lib/celluloid.rb:478:in `<top (required)>'
/home/fge/.gem/ruby/gems/celluloid-0.16.0/lib/celluloid.rb:478:in `require'

-- C level backtrace information -------------------------------------------
<command hang and require kill -9>

OS is RHEL 7.1 with ruby-2.0.0.598-25.el7_1.x86_64 and rubygem-bundler-1.3.1-3.el7.noarch.

Tried new install on debian 8.1(ruby 2.1.5+deb8u1), got the same error.

bundle install fails: public_suffix requires Ruby version >= 2.0 (and Ruby 2.2 installed)

I'm getting an error with bundle install:

Installing public_suffix (1.5.1)
Gem::InstallError: public_suffix requires Ruby version >= 2.0.
An error occurred while installing public_suffix (1.5.1), and Bundler cannot
continue.
Make sure that `gem install public_suffix -v '1.5.1'` succeeds before bundling.

It would appear that I have Ruby >= 2.0 installed:

➜  jkodroff.github.io git:(master) ✗ ruby -v
ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-darwin14]

It would also appear that the command above does succeed when I run it by itself:

➜  jkodroff.github.io git:(master) ✗ gem install public_suffix -v '1.5.1'
Successfully installed public_suffix-1.5.1
Parsing documentation for public_suffix-1.5.1
Done installing documentation for public_suffix after 0 seconds
1 gem installed

Looking at a similar issue in the public_suffix repo, it looks like the output of gem env is relevant, so here's that info:

RubyGems Environment:
  - RUBYGEMS VERSION: 2.4.5
  - RUBY VERSION: 2.2.1 (2015-02-26 patchlevel 85) [x86_64-darwin14]
  - INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/2.2.0
  - RUBY EXECUTABLE: /usr/local/opt/ruby/bin/ruby
  - EXECUTABLE DIRECTORY: /usr/local/bin
  - SPEC CACHE DIRECTORY: /Users/jkodroff/.gem/specs
  - SYSTEM CONFIGURATION DIRECTORY: /usr/local/Cellar/ruby/2.2.1/etc
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-darwin-14
  - GEM PATHS:
     - /usr/local/lib/ruby/gems/2.2.0
     - /Users/jkodroff/.gem/ruby/2.2.0
     - /usr/local/Cellar/ruby/2.2.1/lib/ruby/gems/2.2.0
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - https://rubygems.org/
  - SHELL PATH:
     - /usr/local/bin
     - /Users/jkodroff/.rbenv/shims
     - /Users/jkodroff/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/bundler/gems/jekyll-ebfc466729e9/bin
     - /Users/jkodroff/.rbenv/bin
     - /usr/bin
     - /bin
     - /usr/sbin
     - /sbin
     - /usr/local/bin
     - /usr/local/share/npm/bin
     - /Users/jkodroff/go/bin

So, I'm now pretty confused. Can anyone lend a hand?

Amend `site.url` to Pages configuration

Not sure what the possibility of this is, but it'd be cool to see the config file that the Pages build process passes in to Jekyll to set site.url based on the CNAME or repo name. This would make it easier to use site.url locally then push up and have them change.

Considering Pages (through DynDNS) controls the FQDNs for Pages sites, this seems reasonable.

The only downside is that it requires runtime input of the entries in DynDNS.

Possibilities, depending upon the repo:

# no CNAME
url: http://parkr.github.io
# no CNAME, no CNAME for user pages
url: http://parkr.github.io/project-name

# CNAME for user pages
url: http://blog.parkermoore.de
# No CNAME, CNAME for user pages
url: http://blog.parkermoore.de/project-name

Feedback request: proposal to drop Rdiscount and Redcarpet support

As we're preparing to upgrade to Jekyll 3.0.x, we're looking for ways to make things even easier for new users to get started. One point of unnecessary cognitive burden is choosing a markdown interpreter.

Kramdown? Rdiscount? Redcarpet? What's the difference? How do I choose? Why can't you just pick the best for me? When I fire up WordPress or Microsoft Word or my phone, I don't choose the rendering engine. I trust the publisher to make that choice for me. Using Jekyll should be no different.

There used to be a lot of difference between the various Markdown rendering engines. Some supported some features, others implemented different features in different ways. Today, they've largely converged on a standard feature set, with Kramdown implementing most, if not all features (maybe not options), across all renderers.

My question

Other than speed, is there anything Rdiscount or Redcarpet does that Kramdown doesn't? Would you miss them terribly, or would your site fail to render if GitHub Pages dropped support for any markdown renderer other than Kramdown?

If there are any specific examples of features or syntaxes that RedCarpet or Rdiscount supports that Kramdown does not (rather than personal experience or preference), it'd go a long way to help inform our decision.

Rdiscount and Redcarpet breakdown:

As a baseline:

For open source projects I normally like to optimize for the 80% use case (not edge cases or power users), but here this means that 95%+ of users are using Kramdown (and 90%+ don't care enough to specify). For these numbers, you can assume 1M+ public sites.

To note, this proposed change would only affect GitHub Pages. Users would be free to use any rendering engine they'd like when running Jekyll locally or on their own server.

Pages served only under URLs like PageName.html, not as PageName

I have an organization GitHub page (repo: https://github.com/selite/selite.github.io), which contains .md files. When accessing it on GitHub at http://selite.github.io, it serves all .md files that have YAML Front matter (i.e. all .md files, except for TableOfContents.md) well, under URLs either without an extension or with .html extension. E.g. SeleniumIDE.md can be accessed as http://selite.github.io/SeleniumIDE or http://selite.github.io/SeleniumIDE.html.

However, when I run it locally via Jekyll as per https://help.github.com/articles/using-jekyll-with-pages/#troubleshooting, the files only work under .html URLs - e.g. http://localhost:4000/SeleniumIDE.html.

Is this a bug or am I doing something wrong? If a bug, is it the same as #69?

I have ruby 2.0.0p353 (2013-11-22 revision 43784) [x86_64-linux] and (I believe) current gems. My Gemfile is:
source 'https://rubygems.org'
gem 'github-pages'

gem "therubyracer"

gem 'thin'

Sitemap showing information for draft pages

When setting up site maps through simply adding the gem to the _config.yml file the site map shows all my draft pages. Even though visiting the links included in the sitemap will return a 404 response.
I have added the following to my config.yml

gems:
  - jekyll-sitemap

Github Hosted versions.json file is out of date

Within the Jekyll doc page for Github-Pages, it states:

To use the currently-deployed version of the gem in your project, add the following to your Gemfile:

source 'https://rubygems.org'

require 'json'
require 'open-uri'
versions = JSON.parse(open('https://pages.github.com/versions.json').read)

gem 'github-pages', versions['github-pages']

This will ensure that when you run bundle install, you have the correct version of the github-pages gem.

The versions.json file it points to on github lists github-pages version 37 instead of the current 38.

Is there a way to automate that? Maybe have versions.json pulled from this repo. Which would mean adding in a file not used by the gem.

liquid-2.6.1 gives warning: duplicated key at line 46 ignored: "ind

Hi,

I am just trying to use the github-pages gem. After installing the gem liquid-2.6.1 was also installed as dependency.

When I run jekyll serve or bundle exec jekyll serve I am getting the following warning:

/Users/{removed}/.rvm/gems/ruby-2.2.1/gems/liquid-2.6.1/lib/liquid/htmltags.rb:43: warning: duplicated key at line 46 ignored: "index0"

Having look up for outdated gems I am seeing quite a few gems have been updated:

$ bundle outdated
Fetching gem metadata from https://rubygems.org/...........
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies...

Outdated gems included in the bundle:
  * jekyll (2.5.3 > 2.4.0)
  * jekyll-redirect-from (0.7.0 > 0.6.2)
  * blankslate (3.1.3 > 2.1.2.4)
  * html-pipeline (1.11.0 > 1.9.0)
  * jekyll-sass-converter (1.3.0 > 1.2.0)
  * kramdown (1.7.0 > 1.5.0)
  * liquid (3.0.2 > 2.6.1)
  * maruku (0.7.2 > 0.7.0)
  * parslet (1.7.0 > 1.5.0)
  * pygments.rb (0.6.3 > 0.6.1)
  * rdiscount (2.1.8 > 2.1.7)
  * redcarpet (3.2.3 > 3.1.2)

Looking at https://pages.github.com/versions/ liquid-2.6.1 is the correct dependency. I am wondering why I am getting this warning?

pygments rdoc failure

On Mac OS X 10.8.4
rvm use 1.9.3
gem install github-pages

...

Installing ri documentation for posix-spawn-0.3.6
unable to convert "\xE9" from ASCII-8BIT to UTF-8 for vendor/pygments-main/tests/examplefiles/example.cpp, skipping

RDoc::Parser::Ruby failure around line 1 of
vendor/pygments-main/tests/examplefiles/ruby_func_def.rb

Before reporting this, could you check that the file you're documenting
has proper syntax:

.rvm/rubies/ruby-1.9.3-p448/bin/ruby -c vendor/pygments-main/tests/examplefiles/ruby_func_def.rb

RDoc is not a full Ruby parser and will fail when fed invalid ruby programs.

The internal error was:

(NoMethodError) undefined method `name' for #<RDoc::RubyToken::TkLPAREN:0x007fbd95dcd890>

ERROR: While executing gem ... (NoMethodError)
undefined method `name' for #RDoc::RubyToken::TkLPAREN:0x007fbd95dcd890

divided_by liquid filter strange behavior on github pages

Since last Jekyll bump on gh-pages, divided_by Liquid filter is broken.

It is no longer always returning a numerical value.

this works

{% assign number = 200 %}
{{ number | divided_by: 10 }}

outputs 20

this doesn't work

{% assign text = "a text with words" %}
{% assign division = text | number_of_words | divided_by: 3 %}
{{ division }}

{% assign postsnb = site.posts | size  %}
{% assign division = postsnb | divided_by: 3 %}
{{ division }}

{% assign number = 4 %}
{{ number | divided_by: 3 }}

outputs things like string representation of the operation : 4/3

My code is here: https://github.com/djacquel/JekyllTest/blob/gh-pages/10-index.md
Github page result is here: http://pygmeeweb.com/JekyllTest/

I filled a bug report on Jekyll repository here: jekyll/jekyll#2702

I'm not an expert in ruby, so I can't solve this right away. But from what I understand from bug reports, this can be a Jekyll problem.

Expert advice needed.

Jekyll doesn't work when setting markdown to redcarpet

my blog already exists with markdown set to redcarpet on githubpages(http://johncai.github.io)

today I set up local environment using gem install github-pages,
then I run jekyll serve from my blog dir, it says: Conversion error: There was an error converting '_post/blabla.md', the _sites is generated, but all html are empty.

if I set markdown to rdiscount: markdown: rdiscount, it works, but fenced code block is broken.

is there any issue? or am I doing things wrong?

Markdown tables ignored

I installed this gem today as I had a few issues with my Jekyll-Now forked blog and I wanted some error output when building the site on github. I have fixed all problems but this one.

The tables in my existing md docs seem to be ignored and output as plain text in

tags. I was previously using Marked to generate the html for the pages which worked fine. I thought kramdown may have its own syntax but it seems the format I have used is compatible. I pulled one the example kramdown tables from the docs and that dosent work either. Is there any configuration in this gem that is disabling tables, or is this an issue with kramdown 1.5.0?

This is my table

| PS doc dpi* | PS doc res | designing FOR Android density | PS Pt size | Formula            | Android Dp/Sp  |
|-------------|------------|-------------------------------|------------|--------------------|----------------|
| 72dpi       | 320x480    | MD (160 dpi) 1x               | 10         | (72/72) * 1 * 10   | 10             |
| 72dpi       | 480x720    | HD (240 dpi) 1.5x             | 15         | (72/72) / 1.5 * 15 | 10             |
| 72dpi       | 480x960    | XHD (320 dpi) 2x              | 20         | (72/72) / 2 * 20   | 10             |
| 160dpi      | 320x480    | MD (160dpi) 1x                | 10         | (160/72) / 1 * 10  | 22.2           |
| 320dpi      | 640x960    | XHD (320dpi) 2x               | 10         | (320/72) / 2 * 10  | 22.2           |

and this is the example i pulled from the doc that also does not work

|-----------------+------------+-----------------+----------------|
| Default aligned |Left aligned| Center aligned  | Right aligned  |
|-----------------|:-----------|:---------------:|---------------:|
| First body part |Second cell | Third cell      | fourth cell    |
| Second line     |foo         | **strong**      | baz            |
| Third line      |quux        | baz             | bar            |
|-----------------+------------+-----------------+----------------|
| Second body     |            |                 |                |
| 2 line          |            |                 |                |
|=================+============+=================+================|
| Footer row      |            |                 |                |
|-----------------+------------+-----------------+----------------|

Many thanks

Jekyll Archives on GitHub Pages

Hello GitHubbers (and everyone watching this repo)!

I (along with the Jekyll team & contributors) recently released the Archives plugin. The plugin generates archive pages based on tags, categories, and dates, similar to the behaviour of WordPress and other CMS's.

Do you think this gem would be useful enough for inclusion in GitHub Pages?

This issue was originally posted as jekyll/jekyll#2958. The original issue requesting such a feature is at jekyll/jekyll#870.

Includes from within subdirectories

I have a project where the structure looks a bit like this (with some parts omitted for brevity):

├── Gemfile
├── docs
│   ├── _includes
│   │   └── components
│   │       └── header.html
│   ├── _layouts
│   ├── bar.html
│   │   └── components
│   │       ├── one.html
│   │       └── two.html

Both one.html and two.html contain the line:

{% include components/header.html %}

Which works fine when running bundle exec jekyll serve, but when I push to my gh-pages branch, I just get the File is a symlink error. The file is not a symlink, and it definitely exists.

Does GitHub Pages not support includes from subdirectories? Thanks!

Ruby version of 2.1.0-github?

Jarring for people checking this out locally and building from there. Maybe that's not a use case - just didn't know if there was an easy way for this to work for non-Github staff.

Can't render pages where : are contained in H1 headers

Maruku fails to render H1 headers that contain colons (but not H2 headers!)

The following code crashes:

Test: Test
=========
test

The following code does not.

Test: Test
---------
test

Here is the error output:

 ___________________________________________________________________________
| Maruku tells you:
+---------------------------------------------------------------------------
| Ignoring line '=========' type = header1
| At line 1
|    header1 --> |=========|
|       text     |tset|
|
+---------------------------------------------------------------------------
!/var/lib/gems/1.9.1/gems/maruku-0.7.0/lib/maruku/input/parse_block.rb:104:in `parse_blocks'
!/var/lib/gems/1.9.1/gems/maruku-0.7.0/lib/maruku/input/parse_block.rb:22:in `parse_text_as_markdown'
!/var/lib/gems/1.9.1/gems/maruku-0.7.0/lib/maruku/input/parse_doc.rb:35:in `parse_doc'
!/var/lib/gems/1.9.1/gems/maruku-0.7.0/lib/maruku/maruku.rb:10:in `initialize'
\___________________________________________________________________________

I'm using the latest github-pages gem available from rubygems.org as of 12/18/13.

Maruku warning in v28

I suspect that this line of the Gem lockfile:

"maruku" => "0.7.0",

Is causing me to get the following warning message on Pages builds on a latest GitHub enterprise (GHE.io) instance when my Gemfile only declares Pages v28.

The page build completed successfully, but returned the following warning:

Your site is using Maruku, the default Markdown interpreter. Maruku is now obsolete and may cause builds to fail for sites with invalid Markdown or HTML. See https://help.github.com/articles/migrating-your-pages-site-from-maruku for more information on upgrading to a newer Markdown interpreter. 

For information on troubleshooting Jekyll see:

 https://help.github.com/articles/using-jekyll-with-pages#troubleshooting

If you have any questions please contact us at https://ghe.io/contact.

I'm seeing this as I work with @jordanmccullough's https://github.com/jordanmccullough/slidedown

JS: Support ES6

Heyo,

I know generally plugin requests are not allowed here. Just want to get a reading on what supporting other JavaScripts would be like. We already opened the door by allowing jekyll-coffeescript. What about ES6? (jekyll/jekyll#3863)

@thejameskyle wrote a plugin for this. How do you measure success and willingness to support these other plugins?

Does this include github site tags?

I'm trying to build a site that uses the repository metadata feature of github pages and was wondering if there was a way to trigger the "site.github" namespace with the appropriated metadata.

Adding themes

Is it possible to use a different theme with this gem? I searched for themes in http://jekyllthemes.org/, but usually the installation is through forking the theme project on github. How can I do that with github-pages gem?

Its necessary the script/release?

With bundler we have the following tasks:

$ rake -T
rake build   
rake install  
rake release

I think we can remove the /script with a Rakefile:

#!/usr/bin/env rake
require "bundler/gem_tasks"

"Prettylights" development.

Hi, i like to know is there any beta of the "Prettylights" highlighter which can be tested.

Since the mention in a forum about include rogue in pages-gem in March, there is no more info about it.

Regards.

Security alert for redcarpet gem

I'm told by gemnasium that there's a critical security fix contained in redcarpet 3.2.3. However, github-pages has that gem locked at 3.1.2. If possible, that gem should be updated as quickly as possible. More information available on osvdb or on gemnasium.

Would I be right in thinking that if a site is using kramdown, that there's some protection from this security vulnerability?

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.