diff --git a/CHANGELOG.md b/CHANGELOG.md index 6bcd035a..3e4e1209 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,19 @@ +## [4.0.6](https://github.com/mmistakes/minimal-mistakes/releases/tag/4.0.6) + +### Enhancements + +- Add [`figure` helper](https://mmistakes.github.io/minimal-mistakes/docs/helpers/#figure) to make generating a `
` element with a single image and caption easier. [#572](https://github.com/mmistakes/minimal-mistakes/pull/572) +- Add structured data markup for `itemprop="person"` in author profile sidebar. [#647](https://github.com/mmistakes/minimal-mistakes/pull/647) + +### Bug Fixes + +- Fix improper YAML formatting of some locales. [#651](https://github.com/mmistakes/minimal-mistakes/pull/651) + +### Maintenance + +- Clarify "migrating to gem-theme" instructions in **Quick Start Guide**. +- Add `rake preview` task for testing `/test` during theme development. + ## [4.0.5](https://github.com/mmistakes/minimal-mistakes/releases/tag/4.0.5) ### Enhancements diff --git a/README.md b/README.md index d070a9d2..84f7d316 100644 --- a/README.md +++ b/README.md @@ -94,6 +94,12 @@ To help me out try to avoid creating pull requests on `master` and instead branc Theme documentation and demo pages can be found in the [`/docs`](docs) if submitting improvements, typo corrections, etc. +## Development + +To set up your environment to develop this theme, run `bundle install`. + +To test the theme, run `bundle exec rake preview` and open your browser at `http://localhost:4000/test/`. This starts a Jekyll server using your theme and the contents of the `test/` directory. As you make modifications to your theme and to the example site, your site will regenerate and you should see the changes in the browser after a refresh. + --- ## Credits diff --git a/Rakefile b/Rakefile new file mode 100644 index 00000000..e50d89f8 --- /dev/null +++ b/Rakefile @@ -0,0 +1,75 @@ +require "bundler/gem_tasks" +require "jekyll" +require "listen" + +def listen_ignore_paths(base, options) + [ + /_config\.ya?ml/, + /_site/, + /\.jekyll-metadata/ + ] +end + +def listen_handler(base, options) + site = Jekyll::Site.new(options) + Jekyll::Command.process_site(site) + proc do |modified, added, removed| + t = Time.now + c = modified + added + removed + n = c.length + relative_paths = c.map{ |p| Pathname.new(p).relative_path_from(base).to_s } + print Jekyll.logger.message("Regenerating:", "#{relative_paths.join(", ")} changed... ") + begin + Jekyll::Command.process_site(site) + puts "regenerated in #{Time.now - t} seconds." + rescue => e + puts "error:" + Jekyll.logger.warn "Error:", e.message + Jekyll.logger.warn "Error:", "Run jekyll build --trace for more information." + end + end +end + +task :preview do + base = Pathname.new('.').expand_path + options = { + "source" => base.join('test').to_s, + "destination" => base.join('test/_site').to_s, + "force_polling" => false, + "serving" => true, + "theme" => "minimal-mistakes-jekyll" + } + + options = Jekyll.configuration(options) + + ENV["LISTEN_GEM_DEBUGGING"] = "1" + listener = Listen.to( + base.join("_includes"), + base.join("_layouts"), + base.join("_sass"), + base.join("assets"), + options["source"], + :ignore => listen_ignore_paths(base, options), + :force_polling => options['force_polling'], + &(listen_handler(base, options)) + ) + + begin + listener.start + Jekyll.logger.info "Auto-regeneration:", "enabled for '#{options["source"]}'" + + unless options['serving'] + trap("INT") do + listener.stop + puts " Halting auto-regeneration." + exit 0 + end + + loop { sleep 1000 } + end + rescue ThreadError + # You pressed Ctrl-C, oh my! + end + + Jekyll::Commands::Serve.process(options) +end diff --git a/_data/ui-text.yml b/_data/ui-text.yml index c423109b..da4bd210 100644 --- a/_data/ui-text.yml +++ b/_data/ui-text.yml @@ -342,14 +342,14 @@ zh: &DEFAULT_ZH comment_success_msg : "Thanks for your comment! It will show on the site once it has been approved." comment_error_msg : "Sorry, there was an error with your submission. Please make sure all required fields have been completed and try again." loading_label : "Loading..." - zh-CN: - <<: *DEFAULT_ZH - zh-HK: - <<: *DEFAULT_ZH - zh-SG: - <<: *DEFAULT_ZH - zh-TW: - <<: *DEFAULT_ZH +zh-CN: + <<: *DEFAULT_ZH +zh-HK: + <<: *DEFAULT_ZH +zh-SG: + <<: *DEFAULT_ZH +zh-TW: + <<: *DEFAULT_ZH # German / Deutsch # ----------------- diff --git a/_includes/author-profile.html b/_includes/author-profile.html index 97261f32..6b849a3f 100644 --- a/_includes/author-profile.html +++ b/_includes/author-profile.html @@ -1,5 +1,7 @@ {% if page.author and site.data.authors[page.author] %} - {% assign author = site.data.authors[page.author] %}{% else %}{% assign author = site.author %} + {% assign author = site.data.authors[page.author] %} +{% else %} + {% assign author = site.author %} {% endif %}
@@ -7,95 +9,182 @@ {% if author.avatar %}
{% if author.avatar contains "://" %} - {{ author.name }} + {{ author.name }} {% else %} - {{ author.name }} + {{ author.name }} {% endif %}
{% endif %}
-

{{ author.name }}

- {% if author.bio %}

{{ author.bio }}

{% endif %} +

{{ author.name }}

+ {% if author.bio %} +

+ {{ author.bio }} +

+ {% endif %}
diff --git a/_includes/figure b/_includes/figure new file mode 100644 index 00000000..da829e48 --- /dev/null +++ b/_includes/figure @@ -0,0 +1,12 @@ +
+ {% if include.alt %}{{ include.alt }}{% endif %} + {% if include.caption %} +
{{ include.caption | markdownify | remove: "

" | remove: "

" }}
+ {% endif %} +
diff --git a/docs/_data/ui-text.yml b/docs/_data/ui-text.yml index 21c31532..da4bd210 100644 --- a/docs/_data/ui-text.yml +++ b/docs/_data/ui-text.yml @@ -342,14 +342,66 @@ zh: &DEFAULT_ZH comment_success_msg : "Thanks for your comment! It will show on the site once it has been approved." comment_error_msg : "Sorry, there was an error with your submission. Please make sure all required fields have been completed and try again." loading_label : "Loading..." - zh-CN: - <<: *DEFAULT_ZH - zh-HK: - <<: *DEFAULT_ZH - zh-SG: - <<: *DEFAULT_ZH - zh-TW: - <<: *DEFAULT_ZH +zh-CN: + <<: *DEFAULT_ZH +zh-HK: + <<: *DEFAULT_ZH +zh-SG: + <<: *DEFAULT_ZH +zh-TW: + <<: *DEFAULT_ZH + +# German / Deutsch +# ----------------- +de: &DEFAULT_DE + page : "Seite" + pagination_previous : "Vorherige" + pagination_next : "Nächste" + breadcrumb_home_label : "Home" + breadcrumb_separator : "/" + toc_label : "Auf dieser Seite" + ext_link_label : "Direkter Link" + less_than : "weniger als" + minute_read : "Minuten zum lesen" + share_on_label : "Teilen auf" + meta_label : + tags_label : "Tags:" + categories_label : "Kategorien:" + date_label : "Aktualisiert:" + comments_label : "Hinterlassen sie einen Kommentar" + comments_title : "Kommentare" + more_label : "Mehr anzeigen" + related_label : "Ihnen gefällt vielleicht auch" + follow_label : "Folgen:" + feed_label : "Feed" + powered_by : "Powered by" + website_label : "Webseite" + email_label : "E-Mail" + recent_posts : "Aktuelle Beiträge" + undefined_wpm : "Undefinierter Parameter words_per_minute in _config.yml" + comment_form_info : "Ihre E-Mail Adresse wird nicht veröffentlicht. Benötigte Felder sind markiert" + comment_form_comment_label : "Kommentar" + comment_form_md_info : "Markdown wird unterstützt." + comment_form_name_label : "Name" + comment_form_email_label : "E-Mail Addresse" + comment_form_website_label : "Webseite (optional)" + comment_btn_submit : "Kommentar absenden" + comment_btn_submitted : "Versendet" + comment_success_msg : "Danke für ihren Kommentar! Er wird auf der Seite angezeigt, nachdem er geprüft wurde." + comment_error_msg : "Entschuldigung, es gab einen Fehler. Bitte füllen sie alle benötigten Felder aus und versuchen sie es erneut." + loading_label : "Lade..." +de-DE: + <<: *DEFAULT_DE +de-AT: + <<: *DEFAULT_DE +de-CH: + <<: *DEFAULT_DE +de-BE: + <<: *DEFAULT_DE +de-LI: + <<: *DEFAULT_DE +de-LU: + <<: *DEFAULT_DE # Another locale # -------------- diff --git a/docs/_docs/14-helpers.md b/docs/_docs/14-helpers.md index f30141b4..325b8b9b 100644 --- a/docs/_docs/14-helpers.md +++ b/docs/_docs/14-helpers.md @@ -30,7 +30,7 @@ feature_row: - image_path: /assets/images/unsplash-gallery-image-3-th.jpg title: "Placeholder 3" excerpt: "This is some sample content that goes here with **Markdown** formatting." -modified: 2016-11-03T11:15:48-04:00 +modified: 2016-11-15T12:11:48-05:00 --- {% include toc icon="gears" title="Helpers" %} @@ -64,6 +64,33 @@ The Liquid based taxonomy archives found amongst the demo pages rely on this hel [tag-array]: https://github.com/{{ site.repository }}/blob/master/docs/_pages/tag-archive.html [tag-array-demo]: {{ "/tags/" | absolute_url }} +## Figure + +Generate a `
` element with a single image and caption. + +| Include Parameter | Required | Description | +| ---- | -------- | ----------- | +| **image_path** | **Required** | Full path to image eg: `/assets/images/filename.jpg`. Use absolute URLS for those hosted externally. | +| **alt** | Optional | Alternate text for image. | +| **caption** | Optional | Figure caption text. Markdown is allowed. | + +Using the `figure` include like so: + +```liquid +{% raw %}{% include figure image_path="/assets/images/unsplash-image-10.jpg" alt="this is a placeholder image" caption="This is a figure caption." %}{% endraw %} +``` + +Will output the following: + +{% include figure image_path="/assets/images/unsplash-image-10.jpg" alt="this is a placeholder image" caption="This is a figure caption." %} + +```html +
+ this is a placeholder image +
This is a figure caption.
+
+``` + ## Gallery Generate a `
` element with optional caption of arrays with two or more images. @@ -73,7 +100,7 @@ To place a gallery add the necessary YAML Front Matter. | Name | Required | Description | | ---- | -------- | ----------- | | **url** | Optional | URL to link gallery image to (eg. a larger detail image). | -| **image_path** | **Required** | Full path to image eg: `assets/images/filename.jpg`. Use absolute URLS for those hosted externally. | +| **image_path** | **Required** | Full path to image eg: `/assets/images/filename.jpg`. Use absolute URLS for those hosted externally. | | **alt** | Optional | Alternate text for image. | | **title** | Optional | Title text for image. Will display as a caption in a Magnific Popup overlay when linked to a larger image with `url`. | @@ -120,7 +147,7 @@ To add a feature row containing three content blocks with text and image, add th | Name | Required | Description | Default | | ---- | ----------- | ----------- | ------- | -| **image_path** | **Required** | Full path to image eg: `assets/images/filename.jpg`. Use absolute URLS for those hosted externally. | | +| **image_path** | **Required** | Full path to image eg: `/assets/images/filename.jpg`. Use absolute URLS for those hosted externally. | | | **alt** | Optional | Alternate text for image. | | | **title** | Optional | Content block title. | | | **excerpt** | Optional | Content block excerpt text. Markdown is allowed. | | diff --git a/docs/_docs/18-history.md b/docs/_docs/18-history.md index dc1512da..20330adc 100644 --- a/docs/_docs/18-history.md +++ b/docs/_docs/18-history.md @@ -4,9 +4,25 @@ permalink: /docs/history/ excerpt: "Change log of enhancements and bug fixes made to the theme." sidebar: nav: docs -modified: 2016-11-04T12:36:05-04:00 +modified: 2016-11-16T11:40:00-05:00 --- +## [4.0.6](https://github.com/mmistakes/minimal-mistakes/releases/tag/4.0.6) + +### Enhancements + +- Add [`figure` helper](https://mmistakes.github.io/minimal-mistakes/docs/helpers/#figure) to make generating a `
` element with a single image and caption easier. [#572](https://github.com/mmistakes/minimal-mistakes/pull/572) +- Add structured data markup for `itemprop="person"` in author profile sidebar. [#647](https://github.com/mmistakes/minimal-mistakes/pull/647) + +### Bug Fixes + +- Fix improper YAML formatting of some locales. [#651](https://github.com/mmistakes/minimal-mistakes/pull/651) + +### Maintenance + +- Clarify "migrating to gem-theme" instructions in **Quick Start Guide**. +- Add `rake preview` task for testing `/test` during theme development. + ## [4.0.5](https://github.com/mmistakes/minimal-mistakes/releases/tag/4.0.5) ### Enhancements diff --git a/docs/_includes/figure b/docs/_includes/figure new file mode 100644 index 00000000..da829e48 --- /dev/null +++ b/docs/_includes/figure @@ -0,0 +1,12 @@ +
+ {% if include.alt %}{{ include.alt }}{% endif %} + {% if include.caption %} +
{{ include.caption | markdownify | remove: "

" | remove: "

" }}
+ {% endif %} +
diff --git a/docs/_pages/home.md b/docs/_pages/home.md index fee47dcc..663abe12 100644 --- a/docs/_pages/home.md +++ b/docs/_pages/home.md @@ -7,7 +7,7 @@ header: cta_label: " Install Now" cta_url: "/docs/quick-start-guide/" caption: -excerpt: 'A flexible two-column Jekyll theme. Perfect for personal sites, blogs, and portfolios hosted on GitHub or your own server.
Latest release v4.0.5

{::nomarkdown} {:/nomarkdown}' +excerpt: 'A flexible two-column Jekyll theme. Perfect for personal sites, blogs, and portfolios hosted on GitHub or your own server.
Latest release v4.0.6

{::nomarkdown} {:/nomarkdown}' feature_row: - image_path: /assets/images/mm-customizable-feature.png alt: "customizable" diff --git a/minimal-mistakes-jekyll.gemspec b/minimal-mistakes-jekyll.gemspec index 858d6b0d..77125d9a 100644 --- a/minimal-mistakes-jekyll.gemspec +++ b/minimal-mistakes-jekyll.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |spec| spec.name = "minimal-mistakes-jekyll" - spec.version = "4.0.5" + spec.version = "4.0.6" spec.authors = ["Michael Rose"] spec.summary = %q{A flexible two-column Jekyll theme.} diff --git a/package.json b/package.json index 963e5e65..120db144 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "minimal-mistakes", - "version": "4.0.5", + "version": "4.0.6", "description": "Minimal Mistakes Jekyll theme npm build scripts", "repository": { "type": "git", diff --git a/test/_config.yml b/test/_config.yml index ee2135d3..8f614a4d 100644 --- a/test/_config.yml +++ b/test/_config.yml @@ -14,7 +14,7 @@ title_separator : "-" name : "Your Name" description : "Minimal Mistakes theme test." url : # the base hostname & protocol for your site e.g. "https://mmistakes.github.io" -baseurl : # the subpath of your site, e.g. "/blog" +baseurl : "/test" repository : # GitHub username/repo-name e.g. "mmistakes/minimal-mistakes" teaser : # path of fallback teaser image, e.g. "/assets/images/500x300.png" # breadcrumbs : false # true, false (default) @@ -57,7 +57,7 @@ yandex_site_verification : # Social Sharing twitter: - username : + username : "mmistakes" facebook: username : app_id : @@ -102,7 +102,7 @@ author: stackoverflow : # "123456/username" (the last part of your profile url, e.g. http://stackoverflow.com/users/123456/username) steam : tumblr : - twitter : + twitter : "mmistakes" vine : weibo : xing :