Commit Graph
527 Commits
Author SHA1 Message Date
George Cushen d9ff93a1c2 feat: make media library dir configurable
Move default media library from static/img/ to static/media/ as it can now contain audio, video, and other kinds of media in addition to images.

BREAKING CHANGE:
Either rename your site's static/img/ to static/media/ (and update any references to this folder in your Markdown files);

Or, add `media_dir = "img"` to `params.toml` to continue using the legacy location.
2020-07-29 18:54:28 +01:00
George Cushen 9421994179 demo: bump Hugo v for Netlify 2020-07-27 23:07:51 +01:00
George Cushen 5456b6decd fix: Book layout
Fixes prev/next direction
2020-07-27 13:39:01 +01:00
George Cushen 42696869c1 perf: disable Academicons integration by default
Increase performance.

To enable, add the following to bottom of `params.toml`:

[icon.pack]
  ai = true  # Academicons icon pack https://jpswalsh.github.io/academicons/
2020-07-25 20:42:21 +01:00
George Cushen 64f921f141 fix: Book layout
Add anchor links from Docs layout
2020-07-25 20:39:30 +01:00
George Cushen 0b9cbc4150 feat: add Book layout
Similar to the Docs layout but much easier to use.

Add `type: book` to a page's front matter and place Markdown files within a folder hierarchy to automatically create the book sidebar navigation.

Introduces {{< list_children >}} shortcode for listing children of a book chapter.
2020-07-25 01:47:37 +01:00
George Cushen 34dcc6f9d3 feat: preload pages
Preload pages and remove gradual fade in animation on pages to increase performance and make pages appear to load more instantly.
2020-07-23 13:14:32 +01:00
George Cushen c4f0317cdf feat: enable non-rectangular widget styles
Introduces `design.clip_path` widget option.

Refer to CSS docs on `clip-path` for use.

E.g. to create a slanted bottom to a widget:

```
[design]
clip_path = "polygon(0 0,100% 0,100% 80%,0% 100%)"

[design.background]
color = "navy"
text_color_light = true
```
2020-07-12 19:36:37 +01:00
George Cushen ba401912b8 fix: more consistent search input:focus rendering
...across browsers and devices
2020-07-10 19:34:04 +01:00
Jacques Supcik cd023168da feat: add support for Google Fonts API v2
See #1767
Close #1714
2020-07-01 23:30:04 +01:00
George Cushen 486c70c216 feat: add Netlify form options to Contact widget
Help reduce spam
2020-06-30 19:53:06 +01:00
George Cushen 8d75e9e27a feat: add options to highlight active links and show current language
`highlight_active_link` and `show_language` added to `main_menu` in `params.toml`:

`main_menu = {align = "l", show_logo = true, highlight_active_link = true, show_language = false}`

For example, enables disabling highlighting active main menu links on scroll if it's found to be inaccurate in a certain case, such as towards the end of a homepage with lots of very short widgets that are linked in the menu.
2020-06-17 20:29:03 +01:00
George Cushen 4efb4d3ab0 refactor: link page summary block rather than text
Enables the visitor to easily click anywhere on the summary (even between lines) rather than having to click exactly on the text.

Close #1751
2020-06-17 19:14:02 +01:00
George Cushen 033e1bd32c feat: link page summary to page
Provides an experience similar to popular blogging platforms.

Make it easier for the visitor to click through and more obvious that it's just a excerpt of the page.

Close #1751
2020-06-17 18:47:01 +01:00
George Cushen 0db000a841 feat: add options to add author notes + highlight superuser
To highlight the site author (superuser) in author lists, set the following in `params.toml`:

highlight_superuser = true

Author notes can be added to a page's front matter in the form:

author_notes:
- "Equal contribution"
- "Equal contribution"
2020-06-07 20:02:12 +01:00
George Cushen ff252a6a74 fix: copyright license logic for derivatives
Attempts to align logic with that used at https://chooser-beta.creativecommons.org/

Fix b4901e3
Fix 1729
Close #1730
2020-06-03 12:20:30 +01:00
Dan Kortschak cae1088586 fix: parsing copyright license attributes
Fix b4901e3fd2
Fix #1726
See #1727
2020-06-02 15:41:16 +01:00
George Cushen a5f4b872c5 fix: prevent errors if show_related hasn't been added to params.toml
Fix 9e562fc076
2020-05-30 11:12:51 +01:00
George Cushen dfae6dca85 feat: add slides translation for search result content type label
Fallback to `btn_slides` translation for language packs which don't yet have a `slides` translation.

Close #1716
2020-05-28 21:45:32 +01:00
George Cushen 9e562fc076 feat: add show_related option to control related content
The following option has been added to `params.toml` to control related content on pages:

`show_related = {docs = true, page = false, post = true, project = true, publication = true, talk = true}`
2020-05-27 01:23:10 +01:00
Nicholas Nadeau, Ph.D., P.Eng ca0b898cbf feat: increase accessibility with alts and labels
Can increase accessibility score in Google Lighthouse from 97% to 100% (exact score may vary depending on the site).

See #1694
2020-05-27 01:04:11 +01:00
George Cushen 3cb96be5c6 feat: rename custom icon pack from svg to custom
# To use custom SVG icons.
# Place custom SVG icon in `assets/images/icon-pack/`, creating folders if necessary.
[[feature]]
  icon = "beach-sunset"
  icon_pack = "custom"
  name = "Surfing"
  description = "90%"

See #1692
2020-05-14 23:46:31 +01:00
George Cushen a357b09682 feat: enable emoji and custom SVG icons in Featurette widget
# To use emoji icons.
[[feature]]
  icon = "😄"
  icon_pack = "emoji"
  name = "Emojiness"
  description = "100%"

# To use custom SVG icons.
# Place custom SVG icon in `assets/images/icon-pack/`, creating folders if necessary.
[[feature]]
  icon = "beach-sunset"
  icon_pack = "svg"
  name = "Surfing"
  description = "90%"

Close #1149
Close #1692
2020-05-14 23:42:44 +01:00
George Cushen b4901e3fd2 feat: add copyright license option
Enables adding Creative Commons copyright licenses on both site wide and per page basis with the new option:

`copyright_license = {enable = false, allow_derivatives = false, share_alike = true, allow_commercial = false, notice = "This work is licensed under {license}"}`

Close #1670
2020-05-14 22:45:23 +01:00
George Cushen 48b39f8550 fix: workaround Hugo Page.GetTerms bug
Hugo bug causes authors not to be listed in the order in which they were defined in the front matter.

See Hugo bug report at https://github.com/gohugoio/hugo/issues/7213

This commit partially reverts f78feefee9 where the code was refactored to use Page.GetTerms for authors.
2020-05-01 00:03:57 +01:00
George Cushen f78feefee9 feat: add support for non-ASCII tags, authors, and categories
For example, now Chinese can be used in the names of tags, authors, and categories.

Previously, this was blocked due to bugs in Hugo.

As of Hugo v0.65, new functionality for taxonomies was introduced. The Hugo taxonomy feature powers authors, categories, and tags in Academic.

BREAKING CHANGE:
Requires Hugo v0.65+
2020-04-24 20:32:58 +01:00
George Cushen 601620c7a6 feat: make taxonomy URLs singular
- make taxonomy URLs singular, consistent with other Academic pages (workaround Hugo attempting to publish taxonomy URLs with plural names). This requires the breaking change below.
- Fix extra space/lines appearing in the author cards underneath page content as reported at https://spectrum.chat/academic/help/publication-widget-adds-additional-lines-at-bottom-of-the-page~315f77d8-7cc8-44a9-a431-5b64b7556c53

BREAKING CHANGE:
Rename `name` to `title` in author profiles within `author/` folder.
2020-04-15 01:17:56 +01:00
George Cushen 42d0e5f8cd fix: 5738cdd41e 2020-04-08 22:31:35 +01:00
George Cushen 5738cdd41e feat: integrate Netlify CMS support
Adds a `[cms]` section in `params.toml` to configure CMS integration.

Supports editing posts, talks, and pages (terms & privacy pages) in Netlify CMS.
2020-04-08 22:29:07 +01:00
George Cushen 9d842f584f fix: social sharing image for author pages
The social sharing logic was attempting to use the legacy system of defining the avatar image name in `site.Params.avatar`, however since the author system was added to Academic, `site.Params.avatar` is now a group of params and the avatar itself is stored in the author's page bundle.

Hence, use the avatar in the author's page bundle (if it exists) to represent an author page.

This bug could affect the image used to represent a page in social sharing and RSS.
2020-04-05 12:27:00 +01:00
Mike Arpaia adb09f8dab fix: parse error when loading widget_page.html
```
Error: add site dependencies: load resources: loading templates: "/Users/marpaia/git/website/themes/academic/layouts/partials/widget_page.html:21:1": parse failed: template: partials/widget_page.html:21: unterminated quoted string
```

Fix 8d25dbc
See #1621
Fix #1618
2020-03-29 11:15:21 +01:00
George Cushen 8d25dbc61f refactor: clarify error message when Hugo fails to load a Widget Page
See #1595
See #1599
2020-03-28 20:49:23 +00:00
George Cushen eceb8b6312 feat: clarify day/night modes in appearance chooser
Rather than a 3-way icon-based toggle through light, dark, and automatic modes, present the user with a dropdown list of modes displayed in full textual representation.

Adds language pack options for translating `theme_light`, `theme_dark`, and `theme_auto`.

See #1596
2020-03-15 21:40:00 +00:00
George Cushen ebfb1d9fff feat: support alt-text for featured images
An optional `alt_text` parameter can be added when specifying a featured `image` in a page's front matter.

Alt text is used to describe the image when the page is read via a screen reader.

This commit also changes profile photo alt text from "avatar" to the person's name in alignment with major CMS and social sites.

Close #1592
2020-03-14 01:05:25 +00:00
George Cushen 58c8bc4609 feat: add options to customise length of listing summaries
When `summary` is defined, the full summary text is now shown in listings.

Add `summaryLength = 30` (length in words) to `config.toml` to customise automatic summaries from using `<!--more-->` tag or full content (when `summary` and `abstract` are not defined).

Add `abstract_length = 135` (length in characters) to `params.toml` to customise truncation when `abstract` is used as the summary.

Close #1374
2020-03-06 21:05:17 +00:00
George Cushen 63918091fb feat: show profile cards for all page authors, not just first author
If `site.Params.profile` is set to `true`, an author profile card will be displayed at the end of the page for every author (assuming that a profile has been setup for them under `content/authors/`).

Close #1481
2020-03-06 20:18:06 +00:00
George Cushen 90aca0659c feat: filter by author in Pages and Featured widgets
To use, just set an `author` filter to a username in instances of the Pages or Featured widget:

```
[content.filters]
    tag = ""
    category = ""
    publication_type = ""
    author = "admin"
```

Close #1422
2020-03-06 19:51:04 +00:00
George Cushen 4ed72d85b2 fix: revert "fix: workaround Hugo GetPage/urlize bug with non-ASCII usernames"
This commit completes 94e6169320 in reverting commit 03af4df

Ensure `removePathAccents = true` in `config.toml` to workaround the Hugo bug: gohugoio/hugo#5687

Fix #1575
Fix #1563
2020-03-05 20:53:26 +00:00
George 337a554a25 feat(widget): add option to link to archive from Feature widget (#1557)
To add a "See all" link underneath featured content, set `link_to_archive = true` under the `[content]` section in the front matter of the Featured widget.
2020-03-05 20:37:58 +00:00
George 4834058bfe fix: remove space after author names in MLA citation list (#1536)
This commit removes the space after the author names and before the period when using the MLA citation style.
2020-03-05 20:21:48 +00:00
George Cushen 94e6169320 fix: revert "fix: workaround Hugo GetPage/urlize bug with non-ASCII usernames"
This reverts commit 03af4df1

Ensure `removePathAccents = true` in `config.toml` to workaround the Hugo bug: https://github.com/gohugoio/hugo/issues/5687

Fix #1575
Fix #1563
2020-03-05 19:54:20 +00:00
George Cushen c5b26892a9 feat: add support for SVG logo format + fix logo URL in JSONLD
Can now upload an SVG logo to `assets/images/logo.svg`.

If your site is for an organization, Google currently requires that the logo is PNG rather than SVG otherwise the site may not receive rich search results based on the JSONLD (see https://developers.google.com/search/docs/data-types/logo).

Also, this commit fixes the logo URL in the site's JSONLD metadata - irrespective of the above feature, the logo URL metadata broke when adding the new automated logo detection system in #1439.

Close #1512
Fix #1516
Fix #1439
2020-02-09 00:53:02 +00:00
George Cushen 5e62b09331 fix: day/night mode and enable reverting to the default auto day/night mode
Fixes:
- There is no easy way for a user to reset their day/night preference back to automatic (currently, they must use their web browser to clear the local storage data for the site)
- When changing the theme variation is disabled by admin (by setting `day_night` to `false` in `params.toml`), the operating system's day/night preference is still applied
- If the admin removes the option to change the theme variation, the preference for a user who already visited the site is still read from the localstorage and applied. For example, this could result in the user seeing a theme variation with poor contrast that was not intended to be shown as the site's theme was optimized for the other variation.

Fix #1385
Fix #1526
Fix #1534
2020-02-09 00:10:45 +00:00
George Cushen 1f6beec9f7 fix: GA outbound link tracking
Fixes external links opening both in current tab and new tab when `google_analytics` enabled.

Fix #1511
2020-01-26 16:38:01 +00:00
George Cushen c74f07dd01 refactor: docs menu name detection logic
Enables streamlining Academic docs front matter with just `menu: "updates"` for example.
2020-01-24 00:57:50 +00:00
George Cushen 242479c5ed feat: add support for displaying square avatars
Simplify generated avatar resources and commit.

See #1509
2020-01-12 14:35:59 +00:00
George Cushen 1a3efac296 feat: add support for displaying square avatars
Also, make About widget avatar responsive, appearing larger on large devices.

BREAKING CHANGE:
`gravatar` option moved under new `[avatar]` section in `params.toml`.
`shape` option added under new `[avatar]` section in `params.toml`.

Close #1509
2020-01-12 14:27:27 +00:00
George Cushen d995e4d14d fix: 0cc80f90ee
Fix logo in navbar transforming into site title on mobile.

See #1439
Fix #1507
2020-01-04 18:00:33 +00:00
George Cushen 48397fb6d4 fix: multilingual mode with different baseURLs
With Hugo v0.60+, the translation menu in the navbar is broken when a different baseURL is set for each multilingual site. This update attempts to fix that.

See #1503
2020-01-02 11:19:30 +00:00
George Cushen 1990134455 fix: add author name to profile page title
Author name now appears in browser tab when visiting an author's profile page.
2019-12-30 00:59:34 +00:00