Skip to content
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

Upgrade to Jekyll 3.x #1193

Merged
merged 1 commit into from
Jan 16, 2016
Merged

Upgrade to Jekyll 3.x #1193

merged 1 commit into from
Jan 16, 2016

Conversation

harding
Copy link
Contributor

@harding harding commented Jan 7, 2016

Update to Jekyll 3.x

This commit updates the site from Jekyll 1.3.0 to 3.0.1 (anagram unintended). This catches us up on a couple years of technical debt from not upgrading and makes it easier to fulfill feature requests like #1147.

A diff of the HTML compared to the current site is provided below. I'm sorry it's so large: as part of the upgrade, the syntax highlighter was changed from Pygments to Rouge and so every code span and block on the site was changed. (And, gosh, we had a lot of 'em.)

There should be no changes to any javascript, CSS, or links. I think there's only one user-visible change to the site: the Bitcoin Core releases are now shown in date order rather than version order (but the highest version number is still the version offered for download on the Download page).

Explanations of all the changes in the commit are available in the commit message. Sorry it's one giant commit---everything seemed to be interdependent. Site developers should be able update to the latest Ruby gems after checking out this branch by running, bundle install

I'm aiming to merge this early morning on Saturday the 16th. (I want to merge on a Saturday so I'm available to fix any upgrade issues.)

Gemfile:

  - Upgrade to Jekyll 3.x (3.0.1 tested).  This brings several new
    features I want to use, most notably *collections* which allows us
    to add blog-like collections. I've converted the `_releases` and
    `_alerts` pages into collections, although their plugins are
    maintained to handle the Download and Active Alert features.

  - Upgrade to latest Kramdown.

  - Lock Less at 2.4.0.  This prevents breaking our Less plugin.  Jekyll
    3.x provides native support for SCSS, so we may want to switch to
    that in time.

  - Lock HTML Proofer at 2.1.0.  The most recent version was taking
    forever to check our pages (I never actually got it to complete).
    I'll look into it when I get more time.

Makefile:

  - New `make clean` command.  Jekyll 3.x by default attempts to do
    incremental rebuilds.  The new `jekyll clean` command cleans up the
    metadata necessary for than so that a full build is performed, and
    this new `make clean` command is a wrapper around it so that we
    automatically do full rebuilds in the relevant cases.  Note: our
    plugins aren't fully compatible with the incremental rebuilds, but
    I'd like to fix that in the future.

  - Remove WEBrick hack to enable previewing with default URL paths (/
    instead of /index.html).

  - Filter out compliants from Rouge

README.md:

  - Now that Alerts (_alerts) are part of a collection, the file names
    are no longer parsed for dates, so instructions on adding the date
    to the YAML metadata have been added.

_alerts/*:

  - Now that alerts are part of a collection, the file names are no
    longer parsed to provide dates, so a `date:` field has been added to
    the YAML metadata.

_config.yml:

  - Some variables renamed per upgrade instructions.

  - Switched from old default syntax highlighter Pygments to new default
    Rouge.  I tried to use Rouge options to keep new output as similar
    to old output as possible to making diffing easy, but Rouge adds
    extra CSS class info.

  - Move `_alerts` and `_releases` into Jekyll 3.x "collections", which
    provide the organizational features we were using plugins to
    manange.  I haven't removed the old plugins because we still use
    some of their features (alerts.rb provides active issue and banner
    features; releases.rb provides info to Download page)

  - _layouts/* can no longer provide default global metadata; that is now
    provided in the new `defaults:` section in _config.yml.

_layouts/*:

  - Default metadata can no longer be provided in the layout files for
    collections, so I've removed it and left a message to see
    _config.yml.

_plugins/*:

  - Remove filter_for.rb. It's completely broken on Jekyll 3.x because
    of changes to Liquid which prevent adding new arguments to the
    inherited Liquid::For class. Existing uses of filter_for have been
    migrated to built-in for loops prefaced by sorts.

  - Remove remove-html-extension.rb: at it said in the comments, this
    was a temporary hack to get us to Jekyll 3.0.

_releases/*:

  - Rename all the files: prefix a v to the file name so the output html
    (e.g. v10.0.0.html) is the same as the source filename (e.g.
    v10.0.0.md).  This is necessary to migrate them to a Jekyll collection.

  - Remove %v from titles: we have to explicitly set the title, like we
    used to.  Again required for migration to collections.

_templates/events.html & en/rss/events.rss:

  - Sort events by date and then loop with regular for loop rather than
    filter_for

en/alerts.html & en/rss/alerts.rss:

  - Sort alerts by date and then loop with regular for loop rather than
    filter_for

en/bitcoin-core/index.md & en/version-history.html & en/rss/releases.rss:

  - Sort alerts by date and then loop with regular for loop rather than
    filter_for
@harding harding self-assigned this Jan 7, 2016
@btcdrak
Copy link
Contributor

btcdrak commented Jan 11, 2016

ACK

@harding
Copy link
Contributor Author

harding commented Jan 16, 2016

Note to owners/other maintainers: I'm beginning the upgrade now; please don't make any other merges until I post here that I'm done. If you need me, I'll be checking IRC periodically.

@harding harding merged commit 7d98f79 into bitcoin-dot-org:master Jan 16, 2016
harding added a commit that referenced this pull request Jan 16, 2016
@harding
Copy link
Contributor Author

harding commented Jan 16, 2016

Upgrade complete. I watched the build and didn't see any problems in the logs, and I've spot checked a few dozen pages in several different languages without seeing any problems. If you do spot a problem, please post here or open a new issue. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants