Tested with Hugo v0.135.0
Addresses recent breaking changes in Hugo:
ERROR deprecated: .Site.GoogleAnalytics was deprecated.
WARN deprecated: site config key paginate was deprecated in Hugo v0.128.0 and will be removed in a future release. Use pagination.pagerSize instead
Addresses Hugo 0.135 breaking change:
WARN deprecated: site config key paginate was deprecated in Hugo v0.128.0 and will be removed in a future release. Use pagination.pagerSize instead
`site.GoogleAnalytics` variable is deprecated since Hugo ~v0.133 (a warning was shown since v0.120.0+) and Hugo now introduced a breaking change without any backwards compatibility causing all existing sites to break. Theis Hugo variable would need to be changed to `site.Config.Services.GoogleAnalytics.ID`, however that then breaks compatibility with all the sites on earlier Hugo versions. Thus, omit fetching this configuration variable since it should be set via the dedicated Analytics sections in `params.yaml` anyway.
Also
- Fixes Tailwind safelist/whitelistPatterns given change in Tailwind v3 config structure
- Renames new `resume-biography-2` to `resume-biography-3` due to clash
Resolves following Hugo issue:
INFO deprecated: data.GetCSV was deprecated in Hugo v0.123.0 and will be removed in a future release. use resources.Get or resources.GetRemote with transform.Unmarshal.
Note to override default syntax highlighting style, custom CSS must now be used - the `params.yaml` options for choosing syntax themes are deprecated.
Fixes#3030
add `header.navbar.fixed_to_top` bool option
make biography blox compatible with dark section class
center views in Collections and List tpl
add features and feature_icon options to cta-image-paragraph view
We tried to simplify the process by automatically determining icon name, but in some cases with complex org names containing slashes etc, it may not work so well.
Closes#3006
Hugo does not namespace modules by default, leading to conflicts. Hence, load partials from a namespaced sub-folder to prevent conflicts with similarly named files in other modules.
Hugo does not namespace modules by default, leading to conflicts. Hence, load partials from a namespaced sub-folder to prevent conflicts with similarly named files in other modules.
Hugo does not namespace modules by default, leading to conflicts. Hence, load partials from a namespaced sub-folder to prevent conflicts with similarly named files in other modules.
Hugo team changed behaviour of relURL/relLangURL, requiring removal of slash prefix to path
Fix built-in search results are empty when deploying site to domain's sub-folder
Fix#2985
It has been reported that recent Hugo versions broke user's configuration of Headroom JS via the `header.on_scroll` option.
With this PR, Headroom JS configuration is working again.
Fixes#2935
Shortcodes in the new block system do not get access to the correct .Page variable (see #2918 ). The problem is the use of markdownify function to parse $block.content.text, since it actually is an alias to site.Home.RenderString since v 0.93.0 (see gohugoio/hugo#9959 (comment)).
This causes the shortcodes to always get the Homepage as .Page variable. The fix is to substitute markdownify with $page.RenderString, which gives the correct context.
Fixes#2918
Both site header and footer now use dynamic block system.
E.g. for custom header at `layouts/partials/components/headers/simple.html:
```
---
header:
navbar:
block: simple
---
```
Also, Params.footer.widget changed to Params.footer.block
Hooks replaced custom_js.html and custom_head.html
However, custom_js/custom_head remain supported for legacy purposes.
Despite commit acd74954b5 mentioning that the custom.html is still supported for now, I don't think it's being picked up at the moment. This PR resolves this issue.
- rename widgets/ folder to blocks/
- rename Blank block to Markdown
- rename Pages block to Collection
- replace Featured block with Collection block, filtered with `featured_only: true`
- standardise block variables to .wcPage and .wcBlock
- check requested block exists before loading
- refactor block parser to parse_block.html
E.g. a custom view (views/custom.html) can be wrapped with:
views/custom-start.html
views/custom-end.html
This allows for custom grid-based views (cards, etc.)
Adding `site.GetPage /privacy.md` to reflect the absolute path to `privacy.md`, as per the Hugo documentation for GetPage.
This should force Hugo to only link to a `/privacy.md` page at the root of the site and prevent Hugo searching for unrelated pages with `privacy` in the name (as it currently does, if for example you also have a /tags/privacy/ page).
Note that currently there's a Hugo bug where Hugo does not respect absolute paths in `site.GetPage`. Hence, Hugo can still return other unrelated pages (for example any other pages that have `privacy....` in the filename) until this bug is fixed: https://github.com/gohugoio/hugo/issues/10243
Adds support for loading featured image from media library via `image.filename` param as an alternative to placing a `featured.*` image in the page folder.
Supports setting a default feature image for all pages via Hugo Cascade in Hugo Config.
Supports featured image reuse without duplicating the image within each page folder.
github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy/v5
github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-plugins-netlify-cms/v1
See #2754
Slider examples:
To scale the image to fit within the slide:
background:
fit: contain
To fill the slide with the image (default behavior):
background:
fit: cover
1. Use more standard hook names:
- head-start
- head-end
- body-end
- footer-start
- toc-start
- toc-end
2. Enable multiple files per hook. For example, a starter template may have `hooks/head-end/tpl.html` and a user may have customizations in `hooks/head-end/user.html`
custom_head.html -> hooks/head-end/custom.html
custom_js.html -> hooks/body-end/custom.html
Deprecates custom_head.html and custom_js.html but they remain supported for now.
Stylelint added many new default rules
Added some temp rule exclusions until code can be refactored
Ran ESlint and Stylelint auto-fixer to fix any new errors which can be auto-fixed
The Academic repo branch was renamed from master to main so when netlify creates a new repo based on this template, the default branch is named 'main' instead of 'master'.
Leaving the default cms branch param as 'master' will result in a credentials error whenever a user tries to login using the /admin page. Renaming this to 'main' fixes the error.
Add content.filters.folders and content.filters.tags to filter on folders or tags.
Add content.sort_by (str) and content.sort_ascending (bool) options.
Close#2666
Currently, PostCSS can optionally be run on the main CSS bundle. This commit allows PostCSS to also be run on the vendor CSS. This can greatly reduce the size of the vendor CSS bundle when combined with PurgeCSS since most of the Font Awesome CSS is unused.
BREAKING CHANGES:
site.Params.icon.pack.ai -> site.Params.extensions.academicons.enable
site.Params.map -> site.Params.features.map
site.Params.features.privacy_pack -> site.Params.features.privacy_pack.enable
site.Params.marketing and site.Params.seo combined and restructured.
Performance improvements:
Only include pub JS and cite model if site has publications.
Only include carousel JS if site uses Slider widget.
Only include map JS if site uses maps (sets map provider).
BREAKING CHANGES:
The editable and show_related options must now be controlled from front matter, either directly or cascaded from Hugo config
Move breadcrumb option from params.yaml to front matter `show_breadcrumb: true`
Can reduce image sizes by > 5x on a typical site that previously output JPGs and PNGs
(Facilitated now that Hugo reliably supports WEBP)
Also, adds some missing image Heights and Widths to help improve SEO and reduce CLS.
Third party, community views can be added to the new community folder, e.g. by creating a file at layouts/partials/views/community/MY_VIEW.html
And referencing it as `view: community/MY_VIEW`
Small update to fix error re: Google fonts on Classic font set. Without this change Hugo raises the following ERROR:
"There is a new version of Google Fonts. Learn how to upgrade your font pack at https://wowchemy.com/docs/customization/#custom-font
Error: Error building site: logged 1 error(s)"
Setting the private attribute on pages currently prevents them from showing up in Wowchemy search.
This change instructs search engines to also ignore pages set to private.
Fixes#2444
Part 2/2.
See unresolved Hugo issue: gohugoio/hugo#3700
Workaround is to manually define SVG size:
site.Params.header.image.width
site.Params.header.image.height
See unresolved Hugo issue: https://github.com/gohugoio/hugo/issues/3700
Workaround is to manually define SVG size:
site.Params.header.image.width
site.Params.header.image.height
Figures can now be created by using the standard, portable Markdown syntax:
![screen reader text](image.jpg "caption")
Where the image is in the page folder, the media library, or is a remote URI.
The fullback list view for archive pages did not previously support the `view` option, instead presenting lists in one specific format.
If a user creates a custom section name (e.g. `content/prj/`) that doesn't correspond with a built-in page type, they now have the option not to use the default list view by defining `view` in the associated `_index.md` file.
See https://github.com/wowchemy/wowchemy-hugo-modules/discussions/2323
resources.PostProcess delays processing of a resource until the rest of the build has finished.
This allows the public folder or Hugo's hugo_stats.json file to be used as the content for PurgeCSS, so that only CSS that is used on the final website will be included.
Close#2318
Add gallery `order` with options "asc" or "desc"
Add gallery `resize_options` which supports Hugo image processing options.
BREAKING CHANGE:
Move gallery album folders to `assets/media/albums/`. Album name should be defined in shortcode as `album`.
Fix#2245
Prevent Hugo ordering weighted pages higher in the "latest" content list.
Also include course/docs index pages (Hugo "sections") and remove private pages (although Hugo render option is preferred equiv to "private:true")
To use, add SVG brand logo in lowercase to your `assets/media/icons/brands/` folder
BREAKING CHANGE:
Rename `assets/media/icon-pack/` to `assets/media/icons/`
Close#2259Close#1781
Language name doesn't appear when LanguageCode has a sub-code
The issue appears to be an inconsistency/bug with Hugo's `.Translations` lowercasing zh-Hant to zh-hant without offering a way to get the language code as it was defined.
We can workaround it for now by converting to lowercase to align with Hugo's current implementation.
Fix#2256
Refactor:
- business JSON-LD
- site_head
- Slider
- Gallery
- Video
Gallery is now intended only for local images in the page bundle (so that they can be optimized by Hugo).
Close#2119
Page's ID applied to body as `data-wc-page-id`. Can be accessed via CSS and JS to perform page-specific styling or integrations.
Also, introduces new page parameters, similar to widget params:
design.css_style
design.css_class
Close#1975
New options:
`theme="light"` inverts image when browsing in dark mode
`theme="dark"` inverts image when browsing in light mode
`max_width="300px"` sets an image max width
Also, improves use of Figure in `{{%` Markdown shortcodes (e.g. Callout) by further stripping HTML indentation.
Based on user request to parse both Markdown and nested HTML shortcodes (Figures) within Callout shortcode: https://discord.com/channels/722225264733716590/742863504515793149/813105748283883570
Uses `{{-` to unindent HTML so that Figure shortcode can be nested within a `{{%` Markdown shortcode, such as Callout, without the HTML being rendered as a Markdown code block. This way we utilise Hugo's HTML in Markdown approach (aka Goldmark `unsafe`) rather than separating HTML from Markdown.
Previously, Figure could only be nested within a `{{<` HTML shortcode.
The file uploader in Wowchemy CMS has also been updated to reflect the change.
BREAKING CHANGES:
- rename assets/images/ to assets/media/
- move default social sharing image (if any) to assets/media/sharing.*
Workaround HasShortcode detection issue by defaulting to requiring fancybox. Can temporarily be disabled by setting `site.Params.require_fancybox` to `false`
Cacheable, zoomable, and lazily loaded.
Also, prevents conflicts if admin attempts to include multiple inline SVGs which unintentionally reuse each other's components.
New shortcode supports
- enable re-usable *optimized* image assets from new primary media library location at `assets/images/`
- new behavior: load image from page dir falling back to media library at `assets/images/` and then to remote URI.
- multi-res support. leading to increased perf.
- custom ID for cross-refs
- efficient, vanilla (non-jQuery), MIT licensed image zooming
- FancyBox now only loaded for Gallery shortcode
- themeable SVG support
- native lazy loading
Experimental, may change.
BREAKING CHANGE:
Move any figure images (i.e. not the `sharing.*` image) from `static/media/` to `assets/images/`
See #2164
Firefox console notice: Cookie “_ga” will be soon rejected because it has the “SameSite” attribute set to “None” or an invalid value, without the “secure” attribute.
Use provider names rather than integers.
BREAKING CHANGE:
- Rename `site.Params.comments.engine` to `site.Params.comments.provider`
- Rename `site.Params.search.engine` to `site.Params.search.provider`
- Rename `site.Params.map.engine` to `site.Params.map.provider`
- Use provider name (string) rather than integer
- For built-in search, provider is "wowchemy"
- For leaflet maps, the provider is "mapnik" or "mapbox"
Also:
- refactor Bootstrap JS out of wowchemy.js for easier maintenance
- refactor lengthy env checks to hugo.IsProduction
- refactor window.PlotlyConfig from inline JS to the init script
- no longer prevent loading GA if GTM provided, in case user wants both
Adds some default security headers.
CSP is configurable via Params.security.csp.policy (string) and Params.security.csp.report_only (boolean).
To enable, add `headers` to config.toml > outputs > home
Dedicated Netlify redirects file can also now be generated from front matter `aliases` by adding `redirects` to config.toml > outputs > home, and `disableAliases = true` to config.toml.
For example, if a blog post has an attachment, it will now be linked in the listing as well as in its page header.
May also reduce excess spacing by preventing empty attachment DIV in the case of no attachments/buttons since it now checks if a page has buttons.
For example, if a blog post has an attachment, it will now be linked in the listing as well as in its page header.
May also reduce excess spacing by preventing empty attachment DIV in the case of no attachments/buttons since it now checks if a page has buttons.
Example: `courses/learn-x/` will have a new item added to the book menu to link back to `courses/` whereas a site with just a first-level book e.g. `docs/` won't see any change to the menu.
Fix recent refactor that migrated to Hugo's best practice of js.Build.
js.Build was performing excessive caching, only running the pipeline once even though the pipeline parameters changed for each multilingual site.
Useful for long pages with large ToCs and/or on small screens.
Also add `hide_on` and `show_on` options accepting Bootstrap responsive breakpoints.
Useful for setting `{{< toc hide_on="xl" >}}` in conjunction with Book layout which only shows right sidebar ToC on XL screens and above.
Informed by Google Lighthouse insights.
The demo of the light Academic template now achieves 100% Accessibility, 100% Best Practices, and 100% SEO scores.
Hero image can now be moved from the media library to the widget page folder, e.g. `home/`, to become responsively sized.
Scope: the built-in search engine.
Provides one consistent interface for searching and thus surfacing common search queries to the user and in future typeahead.
Also, display the search keyboard shortcut and improve accessibility in Book TOC menu.
The set of conditions that can cause a flicker in this case are `day_night: true` (allow visitor to change theme mode) with a dark theme (`light: false`) and a user device which prefers dark themes.
Fix#2080
Common queries can be added to `data/search_queries.yaml` (experimental feature).
Refactor Wowchemy keyboard shortcut parser.
Fix JS/CSS assets being minified/fingerprinted in dev env.
Close#2060
Adds support for breadcrumb navigation on Book pages.
Consider this feature experimental for now as it may still change. Add the following to bottom of `params.toml` to use:
```
[breadcrumb]
page_types = {book = true}
```
Future work: prefix link title with page icon when set in order to be consistent with Book menu links (https://github.com/wowchemy/wowchemy-hugo-modules/pull/2009#discussion_r549530364)
Informed by user demand to support all event types rather than just talks.
Brings consistency to further align Academic and Research Group templates.
BREAKING CHANGE:
Rename `talk` folder to `event`
Remove `type` set to `talk` in any event front matter (if applicable)
To keep existing `/talk/` URLs, set the following in `config.toml`:
```
[permalinks]
events = "/talk/:slug/"
```
To use, add label and display options to superuser's `social` links:
```
social:
- icon: twitter
icon_pack: fab
link: https://twitter.com/<USERNAME>
label: Follow me on Twitter
display:
header: true
```
A recent refactor caused Mermaid and HLJS themes to not always be applied correctly, for example with theme pack default of light mode but user chosen Dark mode.
Toggle lists have now been standardized in HTML. Functions just like the toggle lists on Github.
Also now supports Markdown in title and works better with longer titles (unlike the previous button based component).
For sites using the `.js-github-release` feature to get the latest release of their project, prevent sending request to GitHub everytime Hugo Server reloads pages.
When sharing the page of an author profile (/author/author-name), the avatar image was no longer shown as the sharing image.
Hugo team made a breaking change in recent Hugo versions to rename the page `.Kind` to `term` instead of `taxonomy` in this case so the statement was no longer triggered.
Fix#1987
Mermaid and Plotly need to have their max-width constrained or they can overflow page width as they set their own fixed max-width in pixels, which can be wider than the page.
One workaround is to set `grid-template-columns` to `100%`. Another is to set a responsive fixed max-width on their parent elements or article-container.
Fix 1c05374
Hugo allows two ways to set a production environment.
The HUGO_ENV approach used by Netlify was working fine, but in case of running `hugo server -e production`, the CSS file wasn't fingerprinted.
Previously, in case of a site with multiple books in a folder, all books shared the same side bar menu listing ALL books and their pages.
List of books (aka book of books) is naturally supported by creating an `_index.md` of `type: page` in the parent folder which contains multiple book folders.
Also bump version to v5 Beta 1.
Previously email only shown if exists and the email form is disabled.
However, both Formspree and Netlify no longer use email address as a parameter, and received request to show email (if entered), in addition to email form, so visitors have the choice to use their usual email client to send a message.
Therefore, show the email address if it was entered.
In case of loading a page with a hash set and having multiple Portfolio widgets (Isotope instances) with images, scroll directly to the offset only once all Isotope instances have fully loaded their images and initialised.
Fixes issue with scrolling conflicts due to 600ms hash scroll on page load combined with 600m hash scroll on each Isotope widget loaded, whilst hash offset, if occurring after one or more Portfolio widgets, can be converging.
Replace JS approach for onload scroll to anchor with CSS scroll-padding-top, now that the CSS standard added support for scroll offsets.
Fix#1992
Commit 97606bf added support for show_organizations in the people widget. The original author forgot to add the definition of this variable at top of the widget, leading to hugo not being able to build the site because the variable was not initialized.
This commit adds a definition for show_organizations at the top of the widget and fixes the build error.
Fix 97606bf
The latest Hugo version, v0.78, enables support for JS ES6 module build support within Hugo/Go modules.
Initial refactor to ES6 modules with imports/exports. Further refactoring todo.
Refactor to use Hugo's new approach to JS param injection.
Refactor theming code from JQuery to vanilla JS.
Add fix for browser deprecation of the MediaQueryList listener.
Requires Hugo 0.78+
See #1929
See #1930
See #1402
Address "Formspree contact forms do not seem to work anymore for new projects as simple email forms are being deprecated"
New system provides a Form ID to enter in contact widget after registering at https://formspree.io/registerClose#1940
Issue was primarily noticed when setting a background image on the Hero or Portfolio widgets.
Also, fix background not showing in Firefox due to unsupported `fill-available`.
Fixes b647d7e81a
- support both 1 and 2 column variations for following widgets: "pages" "featured" "experience" "accomplishments" "contact" "blank" "tag_cloud"
- fix parallax conflict with new CSS page grid causing 100% entire page height for a section
- add dedicated child div for bg prevents parallax 100% height issue within new CSS grid page wrapper
- fix `.page-wrapper` min-height when no-navbar
- fix `.home-section.fullscreen` min-height when no-navbar
- refactor `contact-widget` styles to use existing `wg-contact` class
Pages with wide horizontal content could horizontally scroll on mobile due to `.page-wrapper` not having fixed width in f851142fb2
Re-add overflow-wrap which was removed in e6dba41f3d (in attempt to simplify logic).
Add horizontal scroll to unresponsive Plotly charts.
Also, refactor chart style and refactor callout styles into dedicated file.
This commit attempts to fix https://discord.com/channels/722225264733716590/742863504515793149/774343154949816350
The strategy appeared to affect hyphenation in inline code blocks.
Reduce wordwrap hyphenation, similar to wordwrap on blogging platforms like Medium etc.
If a site doesn't require Isotope Layout Engine (i.e. not using filter on publication archive page or the Portfolio widget), it can be disabled in params.toml for performance increase:
require_isotope = false
Also, disable HighlightJS and Netlify Identity by default to optimize performance.
Hugo restricts a module's own config file to only defining params, menu, outputformats, and mediatypes: https://gohugo.io/hugo-modules/theme-components/ . Lets define outputformats, and mediatypes directly in the module so there's one less thing for a user to add to their site's config file.
- Re-refactor code to use Hugo's `GetTerms` function now that Hugo fixed the unordered bug
- GetTerms may provide better support for names with unicode or spaces
- Make avatar pic linked (in addition to name)
Close#1750
- Re-refactor code to use Hugo's `GetTerms` function now that Hugo fixed the unordered bug
- GetTerms may provide better support for names with unicode or spaces
- Use Bootstrap's bundled PopoverJS for *instant* and more legible author note tooltips.
- Make author notes more intuitive and mobile friendly - use FA icon with left padding to discern touches.
- Add support for highlighting multiple author names (e.g. team members)
BREAKING CHANGE:
To highlight an author name, add `highlight_name: true` to the author's profile.
Close#1750Fix#1861Close#1864
- Re-refactor code to use Hugo's `GetTerms` function now that Hugo fixed the unordered bug
- GetTerms may provide better support for names with unicode or spaces
- Use Bootstrap's bundled PopoverJS for *instant* and more legible author note tooltips.
- Make author notes more intuitive and mobile friendly - use FA icon with left padding to discern touches.
- Add support for highlighting multiple author names (e.g. team members)
BREAKING CHANGE:
To highlight an author name, add `highlight_name: true` to the author's profile.
Close#1750Fix#1861Close#1864
Examples
Main button CTA:
{{< cta cta_link="https://..." cta_new_tab="true" cta_text="emoji 🚀" >}}
Alternative text CTA:
{{< cta cta_alt_link="./my-page/" cta_alt_text="Go to my page" >}}
Main button CTA and alternative text CTA:
{{< cta cta_link="https://..." cta_new_tab="true" cta_text="emoji 🚀" cta_alt_link="./my-page/" cta_alt_text="Go to my page" >}}
Adds id param to audio shortcode
Hashes are prefixed in the form `#audio-<ID>`
E.g. add `id="my-talk"` when calling the audio shortcode and then reference it using [link to my talk audio](#audio-my-talk)
- a static moon icon is currently commonly used by popular sites such as Facebook and Reddit to represent a light/dark chooser
- fix automatic light/dark theming when the chooser is hidden with `show_day_night` set to `false`
- add boolean `show_search` option to `main_menu` in `params.toml` to hide search button from main (still accessible from the standard / keyboard shortcut)
In params.toml, head to `main_menu` options and set `show_day_night=false` to hide the day/night chooser and theme automatically according to the user's day/night preference for their device.
Fixes issue with using Docs layout for sections that need reverse menu sorting, such as updates (v5, v4.9, ..).
Affected Docs site prior to conversion to Books layout.
Adds chart shortcode with support for Plotly JSON chart format.
Given Plotly formatted line-chart.json in page bundle, use
{{< chart data="line-chart" >}}
Close#1673
Fix by setting dark/light theme as soon as body tag exists.
Highlight JS and Mermaid JS theming must still occur later during page load.
Opportunity to refactor this fix and existing OnReady theme code to avoid duplicate JS and reuse code.
Fix#1601
Caused when `/` rather than an anchor or blank string used to represent homepage URL in a menu link.
Note: further improvement possible such as by applying similar logic to non-root widget pages which have menu links to root widget page and its anchors.
Fix#1812
BREAKING CHANGE:
Possible breaking change for sites using custom address formats.
Override `address_formats.toml` to add custom address formats for a site.
Enable single column centered layout for Pages and Contact widgets.
To use this feature, add the following to the widget front matter:
[design]
columns = "1"
See #984
Ability to define both light and dark color themes, rather than use the default settings for the alternative theme.
Add `[dark]` or `[light]` section to theme file to define the alternative theme.
Most vars supported except `primary`.
See #997
"In Go Modules, the /vendor directory in a module has a special meaning, so they delete it from the bundle"
Enables Academic to be installed as a Hugo Module.
See https://github.com/gohugoio/hugo/issues/6945
"In Go Modules, the /vendor directory in a module has a special meaning, so they delete it from the bundle"
Enables Academic to be installed as a Hugo Module.
See https://github.com/gohugoio/hugo/issues/6945
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.
Increase performance.
To enable, add the following to bottom of `params.toml`:
[icon.pack]
ai = true # Academicons icon pack https://jpswalsh.github.io/academicons/
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.
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
```
`class="lazyload"` was earlier removed but the `data-src` was not reverted to `src`.
Fixes gallery images not loading from `static/img/` or from remote URL.
Fix#1771
`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.
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
Fixes data type inconsistency between `isDarkTheme` (int) in `academic.js` and
`isSiteThemeDark` (bool) in `site_js.html` that might prevent proper initialization of Mermaid diagrams.
See #1745Fixes#1742
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"
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}`
# 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
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
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.
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+
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.
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
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
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
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
Generates linkable IDs for figures by anchorizing the caption and namespacing the figure ID by prefixing it with `figure-` to help prevent conflicts with other existing IDs.
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
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.
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#1512Fix#1516Fix#1439
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#1385Fix#1526Fix#1534
Fix Editorconfig auto-added EOF new line to render-link hook, causing whitespace to begin appearing after links - particularly noticeable when there is punctuation after a link.
Hugo v0.63 introduced breaking changes such as breaking templates that don't immediately begin with a `define` (even if the first line is just a code comment): https://gohugo.io/news/0.63.0-relnotes/
Adds compatibility with Hugo v0.63, fixing author pages rendering blank.
As of a recent update, gallery and figure images are lazy loaded. However, lazy loading without initial sizes defined can lead to inaccurate anchor scrolling and active link highlighting as the anchor offset changes after an uncached image occurring before the anchor is lazily loaded.
See https://github.com/gcushen/hugo-academic/issues/1199#issuecomment-577293818Fix#1199
Attempt improvement by moving the scroll to anchor logic to the end of window load and adding 1 to elementOffset in case of navbar border.
Appears to solve any issues that could arise (such as when clicking Courses and then Publications, but Projects being highlighted instead) in local testing.
See https://github.com/gcushen/hugo-academic/issues/1199#issuecomment-577293818
See #1199
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
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
Simplify the process of adding a logo to a site.
BREAKING CHANGE:
Removes param for logo from params.toml. Instead, move logo image to `assets/images/logo.png`, creating the folders if necessary.
See #1439
Calculate max value first since the list is mutable to Hugo's `Reverse` function - i.e. Hugo's `Reverse` function currently appears to operate in-place.
Moved the Cookie Consent asset definition to assets.toml so that it's possible for offline site to use local Cookie Consent assets.
Also upgraded Cookie Consent to 3.1.1.
Close#1495
The proportion of image data in the typical payload of a website can be significant. Lazy loading is a solution that lowers initial page payload and load time, without removing content. Non-critical resources are instead loaded at the moment that they are needed.
Also, load MathJax async in head if required, rather than at end of body.
Close#1106
Attempt to use anchorize rather than urlize for fetching user profiles for users with non-ASCII usernames. Apparently `anchorize` does not perform URL encoding unlike `urlize`, so may be better suited for use with `GetPage`.
See https://github.com/gohugoio/hugo/issues/5687
I thought this would be useful for people who need to create many authors. Instead of copying and pasting the `admin/_index.md`, they can simply use the hugo command `hugo new authors/FIRSTNAME-LASTNAME` and have an empty but commented _index.md file ready to be filled in for each author.
Close#1445
If you are using the Commento cloud service, you do not need to
change anything, but if you want to use a self hosted instance, you can now
provide the base url to your Commento instance.
Close#1446
For example, US sites can use the US address format and Chinese sites can use the Chinese address format.
A default address_format can be set in params.toml, which can be overriden on a per page basis using a parameter of the same name in a page's front matter. Optionally, multilingual sites may wish to add a default format for each site in languages.toml.
BREAKING CHANGES
- list_delimiter removed from params.toml
- address_format added to params.toml
- [address_formats] added to params.toml
Close#1344
To mention someone, type `{{% mention "username" %}}` where `username` corresponds to a user account in Academic. This will create a link to the user's profile page.
Close#1421
- On mobile, position toggle on left and logo in centre (adopt standard)
- Show Search, Day/Night, and Language icons in mobile menu bar
- Add option to align menu items to left, centre, or right
- Add option to remove logo image/text from menu
- Complete navbar SCSS redesign, making use of Bootstrap vars
- Add automatic menu dropdowns on mouseover (for desktop)
Also,
- Apply live day/night update on system prefs change (no need for refresh)
- Add Mermaid security level on init - a req. for latest Mermaid version
BREAKING CHANGES:
menu_align_right option removed from params.toml
main_menu option added to params.toml
Close#1418
- Upgrade MathJax from v2 to v3
- Updated Highlight, Leaflet, Fancybox, Mermaid, FontAwesome
- Fixed multilingual icon paths in Web App Manifest
- View Demo script now binds to all network I/F to enable testing on
other physical devices like smart phones
BREAKING CHANGES:
Removed `plugins_css` from `params.toml`.
Override `custom.scss` to add custom styling.
Close#1400
# Options are `cover` (default), `contain`, or `actual` size.
image_size = "actual"
# Options include `left`, `center` (default), or `right`.
image_position = "right"
# Use a fun parallax-like fixed background effect? true/false
image_parallax = true
See #1377
# Options are `cover` (default), `contain`, or `actual` size.
image_size = "actual"
# Options include `left`, `center` (default), or `right`.
image_position = "right"
# Use a fun parallax-like fixed background effect? true/false
image_parallax = true
See #1377
GT (gtag.js) and GTM are the modern Google analytics solutions.
New `[marketing]` config section added to `params.toml`.
GT will fall back to site.GoogleAnalytics if the new `[marketing]` param
for GT/GA isn't specified, so currently no breaking changes.
May deprecate site.GoogleAnalytics in future.
Close#1349
In Hugo v0.58, Hugo team made a breaking change to fix .Data.Pages to actually show home pages when on homepage. Previously, the function returned all of the site's pages.
Hence this PR adds compatibility for RSS feeds in Hugo v0.58.0+.
Fix#1355
Forms part of the transition from Microdata to JSON-LD.
BREAKING CHANGES
Upgrades to your `params.toml` file are required:
- Address field has been split into semantic parts
- Latitude and longitude have moved under `coordinates` option
- Map settings have moved under `[map]` section
- Office hours can now be specified more simply, as a list
- Added optional `list_delimiter` option for formatting addresses
See #413
Specify `font_size` as s, m, or l in `params.toml`.
Font size is now a site setting rather than theme setting.
Also:
Be less strict on user input of theme and font set names - allow lower
or upper case as well as spaces.
Fall back to Minimal theme and font set on user input error.
Keep category icon on same line as category links, otherwise context
lost.
Change search-header position in modal now that it overlays entire page
*including* navbar.
Rename `color_theme` to `theme`.
Default theme has been renamed from Default to Minimal.
The Font set is now set by the theme unless overrided by user in `params.toml`.
Font size is now set in `params.toml` rather than in the font set.
Options for `font_size` are now s,m, or l.
Enables the widget to be used for categories etc. and not only tags.
Also fix tag ordering by title rather than by count (d0ec05a).
Fix#1267
Fix d0ec05a
To use, set `commentable = {page = true, post = true, docs = true, project = true, publication = true, talk = true}` under the Comments section in `params.toml`.
To use, copy `themes/academic/exampleSite/content/terms.md` to `content/terms.md` in your site, add your legal terms, and remove the `draft` option to publish.
Also:
- Refactor List view to be consistent with the standard List views.
- This involved adding support for Project type and external links to
the standard
- Now, Portfolio's List and Compact views are just wrappers around the
standard List and Compact views.
- Fix summary in Showcase view not falling back to use Content.
Fix#1165
* Remove search-query id from 404 input.
Search query is propagated via the q parameter being added to the query
string when users hit enter.
The only reference to #search-query I found is for styling when dark
theme is enabled. The search widget on the page has the right background
color even when removing the id.
* Remove search-query from searchbox in docs layout.
Previously, the talk layout was intended for talks (intra-day events).
This commit adds support for more general events which can span multiple
days.
Close#1169
Search query is propagated via the q parameter being added to the query
string when users hit enter.
The only reference to #search-query I found is for styling when dark
theme is enabled. The search widget on the page has the right background
color even when removing the id.
Guidance for using math going forward:
- add `markup: mmark` to front matter
- no longer need to escape inline or block math in body
Also, fix Mmark task lists by removing bullet points.
Block math in body can now be wrapped in "<div>$$...$$</div>" tags
Inline math in body can now be wrapping in "`$...$`" backticks
Diagrams can now be created without shortcodes: "```mermaid ... ```"
Don't attempt to show Disqus comment count on page types that do not have corresponding Disqus comment block.
Currently, just Post and Page types support commenting.
See #1206
Fixes edge case caused due to responsive navbar height. More
specifically, a possible race condition between Scrollspy init and
updating its offset.
Fix#1199
Blackfriday automatically wraps Markdown `Content` text in `<p>` tags.
No need to wrap in additional `<p>` tags (which is also invalid HTML).
See #1197
Fixes some edge cases caused due to responsive navbar height and dynamic
Portfolio widget height, as well as case where offset was non-integer,
requiring float to be rounded up.
Fix#1199
`edit_page` option can be added to `params.toml`. For example,
`edit_page = {repo_url = "https://github.com/gcushen/hugo-academic", editable = {docs = true}}`
Currently works for GitHub repos and pages using the `docs` layout.
Placement options: 1 = Full column width, 2 = Out-set, 3 = Screen-width.
Defaults to 1, full column width.
Deprecates the split title/image style that was shown on XL displays.
Close#1175
Fixes image captions when the Gallery shortcode is used on Widget Pages.
The issue was caused by a path mismatch in the code.
Adds support for using Markdown and emojis in image gallery captions.
Close#1136 - the bug report.
To customise sharing buttons, override `themes/academic/data/page_sharer.toml` by copying the file to `data/page_sharer.toml` at the root of a site and editing the copy.
Close#1108Close#1131
The RSS template at layouts/index.xml was only applied to the website
root and not sections or taxonomies such as /post/.
For instance:
/index.xml used Academic's RSS template
/post/index.xml used the default template from Hugo
Fix#1120
Refactor pages as blocks of a base template rather than not using a base template and directly including all necessary elements on each page.
May make Academic more modular and maintainable whilst making it easier for users to apply advanced customizations.
See https://gohugo.io/templates/base/#define-the-base-templateClose#634Close#1115
To use, add `diagram: true` to a page's YAML front matter and create a
diagram from text in the body of the Markdown file using Mermaid syntax:
https://mermaidjs.github.ioClose#1111
Clean up code, add some defaults, and add error messages when the
specified font or color theme cannot be found.
Refactor `text-muted` color from CSS override to Bootstrap variable.
Close#680
Prior to this update, Hugo began displaying urlized tags like
`deep-learning` rather than `Deep Learning` in the Tag Cloud widget and
the list_tags/categories shortcodes.
Fix#1072
Unfortunately, the popular Markdown editors (VS Code and Typora) still
don't support the more human-friendly TOML front matter syntax.
Therefore, make it easier to edit content in popular editors by
converting the demo front matter from TOML to YAML.
Except for publications as they are primarily data based (rather than
content based) and are automatically generated by Academic Admin.
Also, continue to use TOML for configuration files.
See #1069
Also,
- Fix ScrollSpy link scrolling/highlighting not working on widget pages
except the home page
- Add `docs_section_pager = true` to `params.toml`.
- Add more demo tutorial pages and content to showcase the improved
navbar highlighting for child pages and the table of contents feature.
- Bump version in prep. for release
Close#991
The structure of some language packs is very outdated, leading to
missing user interface text when using these packs.
Developed a Python script to sync the structure of all language packs
against the master pack (English) so that each pack has the latest set
of localisation strings.
Note that synced items will still need translating, this commit just
ensures that all language packs have the same structure.
Fix#1062
* check if the Hugo generated author profile URL is valid
* works around the Hugo bug, preventing invalid links
* rename `author` folder to `authors`
* no need to GetPage authors/x and then GetPage author/x to check if
user account was created
* can just rename the folder and use `if .File` instead
* more aligned with how Hugo's taxonomy system was designed
* refactor all author code
BREAKING CHANGE: rename `author` folder to `authors`
Fix#1064
Disable docs prev/next pager unless `docs_section_pager = true` in
`params.toml`.
Requires setting `sections_weight = 01` in front matter of docs pages to
control the order of their appearance in the prev/next links. Otherwise,
prev/next links are generated by Hugo based on chronological date order
- which will be an invalid order in the case of docs.
See https://github.com/gohugoio/hugo/issues/2494
Remove Bootstrap from Header and assets.toml
Remove Bootstrap JS CDN version in footer and assets.toml
Add latest Bootstrap v4 SASS files locally
Include Bootstrap JS locally
Convert Academic's CSS to SASS (mainly SASS variables + Go templating)
Convert Academic's theming system to integrate with SASS
Parse SASS in header using Hugo and convert to CSS
Minify and md5 fingerprint bundled CSS
Fix Slider widget (reuses .wg-hero but animation and `clear` removed)
Add Bootstrap files to repo so that Node is not required
See #680
Recent changes to Hero widget added support for both light and dark
options for background and text (previously it only supported dark
backgrounds and light text).
Slider continues to only support dark style (dark bg and light text).
However, since it inherits some styling from Hero, it began displaying
dark background and dark text. This fix re-applies dark mode to the
Slider widget.
Whilst searching, the navbar is now hidden to prevent user attempting to
close dialog by clicking on navbar links. Otherwise, when clicking on an
in-page anchor link in navbar, the page content will not be reloaded and
will remain hidden underneath the dialog.
Fix#996
The .home-section.dark` selector blocks were not being applied by Chrome
and Firefox due to them not supporting CSS Selectors Level 4.
Selectors Level 4 allows the :not() pseudo-class to accept multiple
selectors. See https://stackoverflow.com/a/35993791
However, currently, it is only supported by Safari:
https://caniuse.com/#feat=css-not-sel-list
After the "Offset and Limit" section, `$query` would have length of `$items_count`, which makes `$count` always equal to `$items_count`. The later "if" condition for adding the "see all posts" link will never be met.
The fix is to record the length of `$query` into `$count` before any offset and limit.
See #963
date, time_start, time_end renamed to publishDate, date, date_end,
respectively.
BREAKING CHANGES: Rename above 3 options in front matter of all talks.
Also, refactor the 404 page so that it just lists the latest 10 pages
overall. This is a more flexible approach than separately listing the
latest pages for only a few different types of content.
See #721
Essentially, the Projects and Custom widgets have been renamed and their
front matter upgraded to be consistent with the new Pages and Featured
widgets.
Also, refactor the demo, changing the section order and converting the
Teaching section to a Demos section which can be used to walk the user
thought the available demos.
See #918
Also renames Hero Carousel widget to Slider.
BREAKING CHANGES:
- widget `[header]` options removed and replaced with `[background]`
- `hero_carousel` widget renamed to `slider`
Close#948
- Support multiple paragraphs
- Icon support for `[cta]` call-to-action button
- Add optional alternative call-to-action link `[cta_alt]`
- Add optional note underneath cta button
- Add optional image
- Refresh the demo's instance of the Hero widget
Close#935
- Consolidate the code for all compact views into a single file
- Make authors clickable in all compact views
- Improve archetypes
BREAKING CHANGES:
`abstract_short` field dropped in publications and talks in favour of
`summary` field.
See #918
See https://github.com/gcushen/hugo-academic/issues/916#issuecomment-462274214
Allows user to customize the style of a particular widget using the CSS
plugin feature. For example, the background of a widget could be changed
to an image or gradient.
Close#322
- add `authors` to set username in user account and force generation
of user profile page whether or not user has published content. This
is particularly useful for linking users from the People widget.
- People widget: only link to users which have profile pages generated -
prevents 404 error if user did not perform the point (1) above
- add i18n "user_profile_latest" to customize user profile text
Fix#274
- link author profile pages in listings
- display author name (rather than username) in metadata
- refactor `list_format` to `view` and use new consistent mappings
- add `citation_style` in `params.toml`
- re-order Accomplishments widget in Demo
- make params/comments more consistent in all widget front matter
- Author page: don't show username if profile exists as that will
already show the user's display name
- Publication card: move author and publication name to metadata bar to
be consistent with other listings
- Remove portrait.jpg from static as it was duplicated for Demo author
BREAKING CHANGES: See issue below.
See #909
- Add author taxonomy to config
- Restructure user data
- Add user profile pages
- Refactor author profile box
- Refactor author link in page metadata to point to author profile page
- Enable About widget to be re-used for different users
BREAKING CHANGES
See issue below and v4 release note for details
See #752
Dates in the experience widget don't currently right align if the location string is longer than the date string. This changes the widget so the dates are always right aligned.
See #858
Simplify code to get content name by using `.File.ContentBaseName` -
it gets content name irrespective of whether page is a bundle or not.
See #800
BREAKING CHANGE
`url_project` can now only be used to link pages to external websites.
To link a page to a project page, use `projects` option.
* Search icon added to navbar if search enabled in config
* New search dialog added which overlays current page when searching
* The docs search box now opens the new search dialog instead of
displaying results within the docs page itself
Close#784
BREAKING CHANGE:
Search widget is deprecated and `content/home/search.md` should be
removed
Remove fingerprinting from MathJax config JS to shorten its generated
filename. Reduces chance of JS filenames becoming too long for user's OS
to handle due to long Sha512 asset fingerprinting.
Minifies and fingerprints Academic's own JS for faster loading and to
prevent old versions getting cached by web browser.
Refactors Algolia search JS into its own file.
Close#768
See #794
To use:
1. Create a gallery album folder in page bundle
2. Add images to album folder
3. Paste `{{< gallery album="<ALBUM FOLDER>" >}}` in your page content
Close#786
* add project showcase layout, set `view = 2` in `projects.md` to use
* revert card view to use resized images rather than cropped images
* fix project filters for tags with non-ASCII (i18n) characters
* add single column wide layout for project widget, to use set
`widget_layout` in `projects.md`
* add `flip_alt_rows` widget option to flip alternate rows in showcase
mode
* `url_` link buttons can now be added for projects
* all link buttons now appear in page header rather than under a 'links'
section within the page
* Markdown slides can now be linked from any page by using new `slides`
option
* Isotope JS is now only activated when required (i.e. when using card
view or when filters are defined)
* `links` translation removed from i18n
* consolidate talk, pub., and new project links files into new single
`page_links.html` for all pages
* move project widget layouts to their own files
Close#764Close#785Close#776Close#645Close#326
BREAKING CHANGE:
CSS class names of project tags are now prefixed with `js-id-` to
namespace them and prevent clashes with existing CSS classes.
Migrate any filter `tag`s in `projects.md` that are prefixed `.` to the
new `.js-id-` prefix.
Netlify routes messages from contact form to its admin panel, so no
email address is required.
By not requiring email in this case, it is not revealed to any spam bots
which might try to scrape a website's public Git repository.
Close#775
Links to a homepage section from another page could scroll to the wrong
location if the linked section occurred below a project widget.
Cause: did not take into account dynamically loaded project images.
See #754
- featured image: Enable focal point to be set by user in front matter
- pages: Featured image responsively transforms to split view on XL monitors
- pages: Refactor page title, metadata, and image into one reusable module
- archetypes: Migrate to folder approach and update image options
- post widget: Refactor detailed layout to use featured image
- accessibility: Add alt tag to header and featured image
- accessibility: Improve text contrast based on Lighthouse audit
- publication: Entirely deprecate old `image` front matter option
- docs: Remove header image option (was never a documented feature)
- project widget: Add `noopener` to external links
See #708Fix#728Fix#704Fix#705
See #718
- Require Hugo v0.49
- Refactor project archetype to new Hugo v0.49 directory-based archetype
- Deprecate `image_preview` option
- Revise demo projects to use new functionality
See #708
To use:
1. Set `list_format = 2` in `content/home/posts.md`
2. Refactor a post named `X.md` to `content/post/X/index.md`
3. Add an image named `featured.*` to your post's new folder
* See `exampleSite/content/home/experience.md` for demo
* Add `present` to language pack
Also:
* Enable color theme packs to change link color
* Reduce font size in docs sidebar
Close#378
To reference file in page folder, simply use
`{{< figure src="a.png" >}}`
To reference file from `static/img/` media library, set `library=1`
in shortcode. E.g. `{{< figure src="a.png" library=1 >}}`
See #708
- Add title to Table of Contents (add `on_this_page` i18n)
- Add back to top link in Table of Contents (add `back_to_top` i18n)
- Enable custom HTML in Table of Contents
(create `layouts/partials/docs_toc_foot.html`)
- Revised alert shortcode style
- Enable icons as menu items in main navbar (use HTML in `Name` field)
- Enable `[[menu.main_right]]` options for having both left and right
aligned main menu links
- Close#405
- See #681 (improve consistency after #571 Bootstrap 4 migration)
- Add `search_results` to language file
- example site: Add example `tutorial` folder
- example site: Set privacy page to hidden (draft)
Complement existing integration of Algolia search engine with
alternative option of built-in search engine based on Fuse.
Setting `engine = 1` in `config.toml` will enable the built-in solution.
Close#635
Enable `summary = "your page summary"` to be set in a widget page's `_index.md`.
This metadata will then be used to enrich SEO, social sharing, and Academic's search.
Allows to create an entirely offline site.
To use, concatenate vendor JS to `static/js/vendor/main.min.js` and
concatenate vendor CSS to `static/css/vendor/main.min.css`.
See #489
Fix case where tag may contain spaces
Allow `tag` to be set directly to the name of an existing tag,
e.g. `tag = "Deep Learning"` rather than requiring the CSS class name
like `tag = ".deep-learning"`.
Close#602
Fix#594 - error was caused by case mismatch between case of tag in
content front matter and case of tag in name of custom tag page folder.
Rather than rename the tag folder from 'academic' to 'Academic' to match
the tag case in the content front matter, let's just delete it for now.
Close#594
- Sort list of talks by `time_start` rather than `date` (consistent with home page widget)
- Fix bug that made publications duplicate in talks list when there was no talk in a project
* Use automatic linebreak feature instead of CSS overflow scrolling
* Disable mathjax notifications
* Highlight any undefined macros within equations
* Load output processors with `-full` option rather than on demand
* Update MathJax version
Fix#496Fix#586
- To enable, set `privacy_pack = true` in `config.toml`
- Show a cookie consent message to visitors
- Anonymize IP in Google Analytics (if enabled)
See #507
- Figures are now unnumbered by default
- To number a figure, use the form:
- `{{< figure src="image.jpg" title="Caption" numbered="true" >}}`
- Add i18n translation for "Figure" in captions
- Update English and Chinese language packs
Close#328 and #513
* Example: `discussion = { name = "Discuss", url = "https://discourse.gohugo.io" }`
can be added to `[params]` section of `config.toml`
* Add noopener to links that open in new tab
See #351
* Add `time_format` variable to `config.toml`
* Enables customizing talk time between am/pm or 24h format
* Correct Go date format URL in documentation
* show start and end times on talk page
* add `time_start` to talk frontmatter, e.g. `2030-06-01T13:00:00`
* add `time_end` to talk frontmatter, e.g. `2030-06-01T15:00:00`
* update format of talk listings, adding time metadata
* add `[params.projects]` config section to `config.toml`
* add `projects = [""]` array to publication and talk frontmatter
* project page: Add backwards compatible child list which considers
both new `projects` array and`url_project`
* update archetypes
* update example site
* update publication button links to consider `projects` array
* update talk button links to consider `projects` array
* remove details button from talk links to be consistent with publication links
* Internationalize the page (string translation)
* Add 3 new language variables: page_not_found, 404_recommendations,
projects
* Show recent talks and projects
* For each content type, show most recent 5 items
* Only show content headings if content exists for each type of content
* About widget interests list
* Talk abstracts
* Breaking change: math in talk abstracts may require extra escaping
* Contact widget: support multiline address
* Talk page: Add noopener to _blank link target
* Add citation feature (#302)
* Remove detail button since all pub. titles are now linked (#310)
* Optimize order of pub. buttons and add more button options (#205)
* Use noopener for external URLs that open in new tabs (#286)
* Add APA citation style
* Change `list_format` in pub. widgets and pub. `_index.md` archive
* New options: 0 = Simple, 1 = Detailed, 2 = APA, 3 = MLA
* Change default `list_format` in exampleSite
* Link title in publication list items
* Open most related links (e.g. PDF) in new tab
* add `comment_count = true` to config
* add `section_pager = false` to config to disable pager by default
* move tags from post metadata bar to post footer
* Replace ids by classes
* Adapt click functions for filter links to filter only in the
relevant widget
* Hide project filter buttons, when there is only one
- Remove `organization` and `organization_url` options from config
- Add `organizations = [ {name="Org Name", url=""} ]`
- Continue to support legacy options
- Only show `role` if it is set
- Parameterize JS and CSS versions (no longer hardcoded)
- Highlight.js version moved from `config.toml` to `data/sri.toml`
- SRI applied to Highlight.js
description:Something isn't working as expected? Report your bugs here.
labels:['needs triage']
body:
- type:markdown
attributes:
value:|
# Welcome 👋
Thanks for taking the time to fill out this bug report.
We use GitHub Issues for project management, **NOT for support**.
🚑 For **help** and **questions**, search if your question has already been asked on the community **[chat](https://discord.gg/z8wNYzb)** and **[forum](https://github.com/HugoBlox/hugo-blox-builder/discussions)**, and if not, ask your question there instead.
Bug reports also shouldn't be used for support requests about a specific problem in your site, only if the issue can be reproduced on a fresh Hugo Blox Builder template.
Also, you can search and browse the extensive [Hugo Blox Builder](https://docs.hugoblox.com) and [Hugo](https://gohugo.io/documentation/) **documentation**.
For questions on _RStudio/Blogdown_, please reach out to the [RStudio/Blogdown community](https://github.com/rstudio/blogdown).
Please fill out each section below. This info allows Hugo Blox Builder contributors to diagnose (and fix!) your issue as quickly as possible. Otherwise we might need to close the issue (e.g. when it's missing clear steps to reproduce).
Also, please verify that your issue is present in the very latest `main` version.
- type:checkboxes
attributes:
label:Preliminary Checks
description:Please make sure that you verify each checkbox and follow the instructions for them.
options:
- label:"This issue is not a duplicate. Before opening a new issue, please search existing issues: https://github.com/HugoBlox/hugo-blox-builder/issues?q=is%3Aissue"
required:true
- label:"This issue is not a question, feature request, or anything other than a bug report directly related to Hugo Blox Builder. Please post those things on Discord: https://discord.gg/z8wNYzb"
required:true
- type:textarea
attributes:
label:Description
description:Describe the issue that you're seeing.
placeholder:Be as precise as you can. Feel free to share screenshots, videos, or data from the devtools of your browser.
Link to a minimal reproduction of the issue (GitHub repository).
**Ideally,create a minimal reproduction of the issue on a fresh template rather than linking to your site's repository:https://hugoblox.com/hugo-themes/
validations:
required:true
- type:textarea
attributes:
label:Steps to Reproduce
description:Clear steps describing how to reproduce the issue.
value:|
1.
2.
3.
...
validations:
required:true
- type:textarea
attributes:
label:Expected Result
description:Describe what you expected to happen.
validations:
required:true
- type:textarea
attributes:
label:Actual Result
description:Describe what actually happened.
validations:
required:true
- type:textarea
attributes:
label:What Hugo Module versions does your site use?
description:Paste your `go.mod` here.
validations:
required:true
- type:dropdown
id:os
attributes:
label:What operating system(s) are you seeing the problem on?
multiple:true
options:
- Windows
- macOS
- Android
- iOS
- Linux
validations:
required:true
- type:dropdown
id:browser
attributes:
label:What browser(s) are you seeing the problem on?
multiple:true
options:
- Chrome
- Safari
- Firefox
- Microsoft Edge
- Other
- type:input
id:hb-tpl
attributes:
label:Which Hugo Blox template are you using?
description:'For example, a template from https://hugoblox.com/templates/'
placeholder:'e.g., Academic CV'
validations:
required:true
- type:input
id:version-hugo
attributes:
label:What version of Hugo are you using?
description:'Run `hugo version` or check your `netlify.toml`'
Describe the purpose of this change. If there is an existing issue that is resolved by this pull request, please reference it in the form `Fixes #1234` where 1234 is the relevant issue number.
### Screenshots
If this is a GUI change, try to include screenshots of the change. If not, please delete this section.
### Documentation
If this is an enhancement, link to the relevant page on the documentation site and describe the necessary changes.
This issue is stale because it has not had any recent activity. The resources of the project maintainers are limited, and so we are asking for your help.
If this is a **bug** and you can still reproduce this error on the <code>main</code> branch, consider contributing a Pull Request with a fix.
If this is a **feature request**, and you feel that it is still relevant and valuable, consider contributing a Pull Request for review.
This issue will automatically close soon if no further activity occurs. Thank you for your contributions.
stale-pr-message:|
This PR is stale because it has not had any recent activity. The resources of the project maintainers are limited, and so we are asking for your help.
If you feel that the PR is still relevant in the latest release, consider making the PR easier to review and finding developers to help review the PR.
Please be _mindful_ that although we encourage PRs, we cannot expand the scope of the project in every possible direction. There will be requests that don't make the roadmap.
This PR will automatically close soon if no further activity occurs. Thank you for your contributions.
Thanks for being interested in contributing! We’re so glad you want to help!
We want contributing to Hugo Blox to be fun, enjoyable, and educational for anyone and everyone. All contributions are welcome, including new plugins (such as new widgets, shortcodes, theme packs, and language packs), templates, features, documentation as well as updates and tweaks, blog posts, YouTube tutorials, live streaming customizations, meetups, and more.
## Where to Start
Join the **Contributing** channel on the **[community Discord](https://discord.gg/z8wNYzb)**.
## General ways to help
Whether or not you're a developer, there are plenty of non-technical ways that you can help. We always need help with:
- Helping the Hugo Blox community via the live [chat](https://discord.gg/z8wNYzb) and [forum](https://github.com/HugoBlox/hugo-blox-builder/discussions)
- Investigating and reviewing open [Issues](https://github.com/HugoBlox/hugo-blox-builder/issues) and [Pull Requests](https://github.com/HugoBlox/hugo-blox-builder/pulls)
- Influence the roadmap! Give a thumbs up 👍 to upvote a feature request you would like to use
- Improving the [documentation](https://docs.hugoblox.com/) and writing tutorials
- Just click the _Edit_ button at the bottom of pages or open an issue with your proposed improvement
- Testing and quality assurance, such as checking the latest version of the templates work as you expect and fixing any dead-links etc.
- Translating the Hugo Blox templates or the Hugo Blox documentation
- Hosting local Hugo Blox themed events or meetups
- Promoting Hugo Blox to others by blogging, vlogging, code streaming, talking etc.
### For technical contributions
Repository structure:
- modules
- The components and layouts which form the Hugo Blox page building framework that the templates depend on
- scripts
- A collection of scripts for helping maintain the repository
- starters
- The collection of starter templates (aka Hugo themes)
- To contribute an improvement to a starter template, make your changes to the relevant template within this folder. **Do not submit PRs to the dedicated template repositories as they are read-only.**
- test
- a minimal site that is built by the CI on every commit to help test PRs
#### What are some good issues to contribute to?
If you're a developer looking to contribute, but you're not sure where to begin, check out the [help wanted](https://github.com/HugoBlox/hugo-blox-builder/labels/help%20wanted) label on Github, which contains issues which need some love.
#### How can I propose an improvement?
If you have a straightforward bug fix or improvement, feel free to contribute it in a [Pull Request](https://github.com/HugoBlox/hugo-blox-builder/pulls) for the community to review.
If you have an idea for a new feature, please start by [searching the issues](https://github.com/HugoBlox/hugo-blox-builder/issues) to check that the feature has not already been suggested and then suggest it by [opening a new issue](https://github.com/HugoBlox/hugo-blox-builder/issues/new/choose), as adding new features to Hugo Blox first requires some analysis around the design and spec.
Please be mindful of the project [scope](#scope).
#### How can I contribute an improvement?
Learn [how to contribute code on Github](https://codeburst.io/a-step-by-step-guide-to-making-your-first-github-contribution-5302260a2940).
**⚡️ To make quick and easy contributions, you can browse the repository on GitHub and edit your changes in GitHub's online editor. GitHub will then open a Pull Request (PR) for your changes to be reviewed by the community. ⚡️**
Otherwise, for larger changes, you can edit locally on your computer in your favorite editor, such as VSCode:
**Download the repo**
Fork (copy) the repo on GitHub and then clone (download) your fork to your computer:
[Install Yarn](https://yarnpkg.com/), the project's build system if necessary.
Then choose the starter template you wish to view, such as _minimal_:
```sh
yarn view:local academic-cv
```
Note that Hugo Server can occasionally stop working after changes are made (sometimes showing unrelated errors). If this happens, stop Hugo (Control-C) and restart it with the `yarn view:local ...` command above.
**Implement your improvements**
Implement you changes and then check for any linting or formatting issues.
Code linting and formatting form part of the Continuous Integration process to help catch bugs and code issues in contributions.
Contributors can also run the flow on their fork of the "Hugo Blox Builder" repo when making contributions (you'll need Node and Yarn to run):
```sh
yarn install
yarn run lint
yarn run format
```
**Open a Pull Request with your changes**
Use git to push (upload) your changes to GitHub and then open a Pull Request (PR) at https://github.com/HugoBlox/hugo-blox-builder/pulls
Please be mindful of the project [scope](#scope).
### Contribute Blox
[Create and publish your own blox](https://github.com/HugoBlox/create-blox)
### Contribute a shortcode
[Create and publish your own shortcode](https://github.com/HugoBlox/create-shortcode)
### Contribute a language pack
To contribute a **new language pack** or an improvement to a language pack, refer to the [language pack guide](https://docs.hugoblox.com/reference/language/#create-or-modify-a-language-pack). Once created, [fork Hugo Blox Builder](https://github.com/HugoBlox/hugo-blox-builder), place your language pack in `blox-tailwind/i18n/`, add the name of the language to `blox-tailwind/data/i18n/language.yaml`, and open a Pull Request on Github with these two files.
### Contribute a theme pack
[View the guide](https://docs.hugoblox.com/getting-started/customize/#appearance) to contributing a color and font theme pack.
### Contribute a template
Consider duplicating a bare-bones template, such as the [Link In Bio](https://github.com/HugoBlox/hugo-blox-builder/tree/main/starters/link-in-bio) folder, and building up your own template using the Hugo Blox. Reach out on the **Contributing** channel in Discord to submit your template.
### Contribute to the Publication importer
To contribute to **Hugo Academic CLI**, the automatic publication and blog post importer, refer to [its dedicated Github repository](https://github.com/GetRD/academic-file-converter) and Issue queue.
## Become a backer
To help us develop this free software sustainably under the open source license, we ask all individuals and businesses that use it to help support its ongoing maintenance and development via sponsorship:
- ☕️ [**Donate a coffee**](https://github.com/sponsors/gcushen?frequency=one-time)
- ❤️ [**Become a sponsor and unlock awesome rewards**](https://hugoblox.com/sponsor/)
## Best practices
To create a consistent experience for all contributors and help prevent bugs, we have some best practices.
### Conventional Commits Specification
Please follow the [Conventional Commits Specification](https://www.conventionalcommits.org/en/v1.0.0/).
For example:
- new feature: `feat: add the X parameter`
- bug fix: `fix: typo in implementation of X parameter`
- docs: `docs: document the X parameter`
- style: `style: change font color from black to blue`
- build-related: `chore: rebuild JS assets`
### Linting and formatting
```sh
yarn install
yarn run lint
yarn run format
```
## Scope
Please be _mindful_ that although we encourage feature requests, we cannot expand the scope of the project in every possible direction. There will be feature requests that don't make the roadmap.
Every feature requires effort not just to analyse the requirements, design it, implement it, test it, document it, merge it, write release notes for it, and release it, but also to continuously support users with it and maintain it (fixing and refactoring the feature as the project and its dependencies evolve).
The more regular active volunteers (rather than one-off contributors) we have supporting users and maintaining the project, the more feasible it becomes to expand the scope of the project.
The project's scope also has to be constrained so that it doesn't get too complex and unwieldy, from an architectural perspective, a testing perspective, and from a usability perspective.
Plugins (widgets, shortcodes, theme packs, language packs, and third-party JavaScript integrations) as well as templates allow the community to add major features without needing to contribute to Hugo Blox itself.
# Academic: the personal website framework for [Hugo](https://gohugo.io)
[**中文**](./README.zh.md)
**Academic** is a framework to help you create a beautiful website quickly. Perfect for personal, student, or academic websites. [Check out the latest demo](https://sourcethemes.com/academic/) of what you'll get in less than 10 minutes.
- Configurable widgets available for Biography, Publications, Projects, News/Blog, Talks, and Contact
- Need a different section? Just use the Custom widget!
- Write in [Markdown](https://sourcethemes.com/academic/post/writing-markdown-latex/) for easy formatting and code highlighting, with [LaTeX](https://en.wikibooks.org/wiki/LaTeX/Mathematics) for mathematical expressions
- Social/academic network linking, [Google Analytics](https://analytics.google.com), and [Disqus](https://disqus.com) comments
- Responsive and mobile friendly
- Simple and refreshing one page design
- Easy to customize
## Getting Started
🔥 **1. Create _any_ kind of website for free with [Hugo](https://github.com/gohugoio/hugo)-powered blocks** - from landing pages, knowledge bases, and courses to professional resumés, conferences, and tech blogs
1. [Install Hugo](https://georgecushen.com/create-your-website-with-hugo/#installing-hugo) and create a new website by typing the following commands in your *Terminal* or *Command Prompt* app:
🎨 **2. Personalize** a beautiful starter template with **50+ light/dark color themes, language packs, and blocks**
hugo new site my_website
🛋 **3. Optionally, write from your sofa or on the go with the integrated open source Content Management System (CMS) based on [Decap CMS](https://docs.hugoblox.com/getting-started/cms/decap/)**
cd my_website
2. Install Academic with [git](https://help.github.com/articles/set-up-git/):
[Check out the latest **demos**](https://hugoblox.com/templates/) of what you'll get in less than 60 seconds, or [get **inspired**](https://hugoblox.com/creators/) by other creators.
Or alternatively, [download Academic](https://github.com/gcushen/hugo-academic/archive/master.zip) and extract it into a `themes/academic` folder within your Hugo website.
- 📚 [View the **documentation**](https://docs.hugoblox.com/)
- 🙋♀️ **Have a question?**
- **Chat with us now on [Discord](https://discord.gg/z8wNYzb)** or explore the [Troubleshooting Guide](https://docs.hugoblox.com/reference/troubleshooting/) and [Q&A Forum](https://github.com/HugoBlox/hugo-blox-builder/discussions)
- _Also, check out [Hugo Forum](https://discourse.gohugo.io) for Hugo Qs and [Netlify Forum](https://answers.netlify.com/) for Netlify Qs_
- 🐦 Share your Hugo Blox Builder site with the community on Twitter: [@GetResearchDev](https://twitter.com/GetResearchDev) [@GeorgeCushen](https://twitter.com/GeorgeCushen) [#MadeWithHugoBlox](https://twitter.com/search?q=%23MadeWithHugoBlox&src=typed_query)
- 🗳 [Take the survey and help us improve #OpenSource](https://forms.gle/NioD9VhUg7PNmdCAA)
- ⬆️ **Updating?** View the [Update Guide](https://docs.hugoblox.com/reference/update/) and [Release Notes](https://github.com/HugoBlox/hugo-blox-builder/releases)
- 🚀 [Contribute improvements](CONTRIBUTING.md) or [suggest improvements](https://github.com/HugoBlox/hugo-blox-builder/issues)
3. If you are creating a new website, copy the contents of the `exampleSite` folder to your website root folder, overwriting existing files if necessary. The `exampleSite` folder contains an example config file and content to help you get started.
## 💙 We ask you, humbly, to support this open source movement
cp -av themes/academic/exampleSite/* .
Today we ask you to defend the open source independence of the Hugo Blox Builder website builder and themes 🐧
4. Start the Hugo server from your website root folder:
We're an **open source and open science movement** that depends on your support to stay online and thriving, but 99.9% of our creators don't give; they simply look the other way 🤦🏻♀️
hugo server --watch
### [😍️ Click here to become a GitHub Sponsor, unlocking awesome perks such as _exclusive templates, widgets, and tutorials_](https://github.com/sponsors/gcushen)
Now you can go to [localhost:1313](http://localhost:1313) and your new Academic powered website should appear.
### Business Sponsors
5. [Customize your website](https://sourcethemes.com/academic/post/getting-started/#getting-started) and [add your content](https://sourcethemes.com/academic/post/managing-content/) by referring to the Academic documentation
6. Build your site by running the `hugo` command. Then [host it for free using Github Pages](https://georgecushen.com/create-your-website-with-hugo/). Or alternatively, copy the generated `public/` directory (by FTP, Rsync, etc.) to your production web server (such as your university's hosting service).
## Starter Templates
## Upgrading
Hugo Blox Builder is a **no-code** framework for creating _any_ kind of website using **widgets**. Each site is 100% customizable to **make it your own**!
Feel free to *star* the project on [Github](https://github.com/gcushen/hugo-academic/) and monitor the [commits](https://github.com/gcushen/hugo-academic/commits/master) for updates. [Release notes](https://github.com/gcushen/hugo-academic/wiki/Release-Notes) for notable updates are also available to aid upgrading your site.
Choose from one of the starter templates to easily get started:
Before upgrading Academic, it is recommended to make a backup of your entire website directory, or at least your `themes/academic` directory.
Before upgrading for the first time, the remote *origin* repository should be renamed to *upstream*:
## The Future of Technical Content Writing
$ cd themes/academic
**Write rich, future-proof content** using standardized Markdown along with bundled extensions for math and diagrams. Edit in the open source CMS or via an editor such as the online GitHub Editor, Jupyter Notebook, or RStudio! [Learn more](https://docs.hugoblox.com/reference/markdown/)
If you have modified files in `themes/academic`, git will attempt to auto-merge changes. If conflicts are reported, you will need to manually edit the files with conflicts and add them back (`git add <filename>`).
- **Page builder** - Create _anything_ with [**blocks**](https://docs.hugoblox.com/getting-started/page-builder/) and [**elements**](https://docs.hugoblox.com/reference/markdown/)
- **Edit any type of content** - Blog posts, publications, talks, slides, projects, and more!
- **Create content** in [**Markdown**](https://docs.hugoblox.com/reference/markdown/), [**Jupyter**](https://docs.hugoblox.com/getting-started/cms/), or [**RStudio**](https://docs.hugoblox.com/getting-started/cms/rstudio/)
- **Plugin System** - Fully customizable [**color** and **font themes**](https://docs.hugoblox.com/getting-started/customize/#appearance)
- **Display Code and Math** - Code highlighting and [LaTeX math](https://docs.hugoblox.com/reference/markdown/#math) supported
- **Beautiful Site** - Simple and refreshing one page design
- **Industry-Leading SEO** - Help get your website found on search engines and social media
- **Media Galleries** - Display your images and videos with captions in a customizable gallery
- **Mobile Friendly** - Look amazing on every screen with a mobile friendly version of your site
- **Multi-language** - 35+ language packs including English, 中文, and Português
- **Multi-user** - Each author gets their own profile page
- **Privacy Pack** - Assists with GDPR
- **Stand Out** - Bring your site to life with animation, parallax backgrounds, and scroll effects
- **One-Click Deployment** - No servers. No databases. Only files.
If there are any issues after upgrading, you may wish to compare your site with the latest [example site](https://github.com/gcushen/hugo-academic/tree/master/exampleSite) to check if any settings changed.
## Themes
## Feedback & Contributing
Hugo Blox Builder comes with **automatic day (light) and night (dark) mode** built-in. Alternatively, click the moon icon in the top right of one of the [Demos](https://hugoblox.com/templates/) to set your preferred mode!
Please use the [issue tracker](https://github.com/gcushen/hugo-academic/issues) to let me know about any bugs or feature requests, or alternatively make a pull request.
Choose a stunning theme for your site and [customize it](https://docs.hugoblox.com/getting-started/customize/#custom-theme) to your liking:
For general questions about Hugo, there is a [Hugo discussion forum](http://discuss.gohugo.io).
[Browse more templates and themes...](https://hugoblox.com/templates/)
## Ecosystem
- [**Academic File Converter**](https://github.com/GetRD/academic-file-converter): Automatically import academic publications from BibTeX to Markdown files
- [**Awesome Hugo**](https://github.com/HugoBlox/awesome-hugo): Scripts to help migrate content to new versions of Hugo
## Join the community
Feel free to [_star_ the project on Github](https://github.com/HugoBlox/hugo-blox-builder), [join the community](https://discord.gg/z8wNYzb) on Discord, and follow [@GetResearchDev](https://twitter.com/GetResearchDev) on Twitter to be the first to hear about new features.
Released under the [MIT](https://github.com/gcushen/hugo-academic/blob/master/LICENSE.md) license.
The [Hugo Blox Builder](https://github.com/HugoBlox/hugo-blox-builder/) repository is released under the [MIT](https://github.com/HugoBlox/hugo-blox-builder/blob/main/LICENSE.md) license.
请随意在Github上[_star_该项目](https://github.com/HugoBlox/hugo-blox-builder),在Discord上[join the community](https://discord.gg/z8wNYzb),并关注Twitter上的[@GetResearchDev](https://twitter.com/GetResearchDev),第一时间获取新功能的消息。
# List your qualifications (such as academic degrees).
[[education.courses]]
course = "PhD in Artificial Intelligence"
institution = "Stanford University"
year = 2012
[[education.courses]]
course = "MEng in Artificial Intelligence"
institution = "Massachusetts Institute of Technology"
year = 2009
[[education.courses]]
course = "BSc in Artificial Intelligence"
institution = "Massachusetts Institute of Technology"
year = 2008
+++
# Biography
Lena Smith is a professor of artificial intelligence at the Stanford AI Lab. Her research interests include distributed robotics, mobile computing and programmable matter. She leads the Robotic Neurobiology group, which develops self-reconfiguring robots, systems of self-organizing robots, and mobile sensor networks.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed neque elit, tristique placerat feugiat ac, facilisis vitae arcu. Proin eget egestas augue. Praesent ut sem nec arcu pellentesque aliquet. Duis dapibus diam vel metus tempus vulputate.
The Academic framework enables you to easily create a beautifully simple personal or academic website using the [Hugo](https://gohugo.io) static site generator.
Key features:
- Easily manage your homepage, blog posts, publications, talks, and projects
- Configurable widgets available for Biography, Publications, Projects, News/Blog, Talks, and Contact
- Need a different section? Just use the Custom widget!
- Write in [Markdown]({{< ref "post/writing-markdown-latex.md" >}}) for easy formatting and code highlighting, with [LaTeX](https://en.wikibooks.org/wiki/LaTeX/Mathematics) for mathematical expressions
- Social/academic network linking, [Google Analytics](https://analytics.google.com), and [Disqus](https://disqus.com) comments
- Responsive and mobile friendly
- Simple and refreshing one page design
- Easy to customize
## Installation
1. [Install Hugo](https://georgecushen.com/create-your-website-with-hugo/#installing-hugo) and create a new website by typing the following commands in your *Terminal* or *Command Prompt* app:
hugo new site my_website
cd my_website
2. Install Academic with [git](https://help.github.com/articles/set-up-git/):
Or alternatively, [download Academic](https://github.com/gcushen/hugo-academic/archive/master.zip) and extract it into a `themes/academic` folder within your Hugo website.
3. If you are creating a new website, copy the contents of the `exampleSite` folder to your website root folder, overwriting existing files if necessary. The `exampleSite` folder contains an example config file and content to help you get started.
cp -av themes/academic/exampleSite/* .
4. Start the Hugo server from your website root folder:
hugo server --watch
Now you can go to [localhost:1313](http://localhost:1313) and your new Academic powered website should appear.
5. Customize your website - refer to the *Getting Started* section below
6. Build your site by running the `hugo` command. Then [host it for free using Github Pages](https://georgecushen.com/create-your-website-with-hugo/). Or alternatively, copy the generated `public/` directory (by FTP, Rsync, etc.) to your production web server (such as your university's hosting service).
## Getting Started
Assuming you created a new website with the example content following the installation steps above, this section explores just a few more steps in order to customize it.
### Core parameters
The core parameters for the website can be edited in the `config.toml` configuration file:
- Set `baseurl` to your website URL (we recommend [GitHub Pages](https://georgecushen.com/create-your-website-with-hugo/) for free hosting)
- Set `title` to your desired website title such as your name
- The example Disqus commenting variable should be cleared (e.g. `disqusShortname = ""`) or set to your own [Disqus](https://disqus.com/) shortname to enable commenting
- Edit your details under `[params]`; these will be displayed mainly in the homepage *about* and *contact* widgets (if used). To disable a contact field, simply clear the value to `""`.
- Place a square cropped portrait photo named `portrait.jpg` into the `static/img/` folder, overwriting any defaults. Alternatively, you can edit the `avatar` filepath to point to a different image name or clear the value to disable the avatar feature.
- To enable LaTeX math for your site, set `math = true`
- Social/academic networking links are defined as multiples of `[[params.social]]`. They can be created or deleted as necessary.
### Introduce yourself
Edit your biography in the *about* widget `content/home/about.md` that you copied across from the `themes/academic/exampleSite/` folder. The research interests and qualifications are stored as `interests` and `education` variables. The academic qualifications are defined as multiples of `[[education.courses]]` and can be created or deleted as necessary. It's possible to completely hide the interests and education lists by deleting their respective variables.
### Customize the homepage
Refer to our guide on using [widgets]({{< ref "post/widgets.md" >}}) to customize your homepage.
### Add your content
Refer to our guide on [managing content]({{< ref "post/managing-content.md" >}}) to create your own publications, blog posts, talks, and projects.
### Remove unused widgets and pages
[How to remove unused widgets and content pages]({{< ref "post/managing-content.md#removing-content" >}}).
### Customization & Upgrading
Continue reading below for advanced customization tips and instructions for keeping the framework up-to-date with any improvements that become available.
## Advanced customization
It is possible to carry out many customizations without touching any files in `themes/academic`, making it easier to upgrade the framework in the future.
### Navigation menu
The `[[menu.main]]` entries towards the bottom of `config.toml` define the navigation links at the top of the website. They can be added or removed as desired.
To create a dropdown sub-menu, add `identifier = "something"` to the parent item and `parent = "something"` to the child item.
### Website icon
Save your main icon and mobile icon as square PNG images named `icon.png` and `apple-touch-icon.png`, respectively. Place them in your root `static/img/` folder.
### Theme color (CSS)
You can link custom CSS assets (relative to your root `static/css`) from your `config.toml` using `custom_css = ["custom.css"]`.
For example, lets make a green theme. First, define `custom_css = ["green.css"]` in `config.toml`. Then we can download the example [green theme](https://gist.github.com/gcushen/d5525a4506b9ccf83f2bce592a895495) and save it as `static/css/green.css`, relative to your website root (i.e. **not** in the `themes` directory).
### Analytics
To enable [Google Analytics](http://www.google.com/analytics), add your tracking code in `config.toml` similarly to `googleAnalytics = "UA-12345678-9"`.
### Third party and local scripts (JS)
To add a third party script, create a file named `head_custom.html` in a `layouts/partials/` folder at the root of your website (not in the `themes` folder). Any HTML code added to this file will be included within your website's `<head>`. Therefore, it's suitable for adding custom metadata or third party scripts specified with the *async* attribute.
Whereas for your own local scripts, you can link your local JS assets (relative to your root `static/js`) from your `config.toml` using `custom_js = ["custom.js"]`.
### Language and translation
The interface text (e.g. buttons) is stored in language files which are collected from Academic's `themes/academic/i18n/` folder, as well as an `i18n/` folder at the root of your project.
To edit the interface text, copy `themes/academic/i18n/en.yaml` to `i18n/en.yaml` (relative to the root of your website). Open the new file and make any desired changes to the text appearing after `translation:`. Note that the language files are formatted in YAML syntax.
To translate the interface text to another language, follow the above instructions, but name the new file in the form `i18n/X.yaml` where `X` is the appropriate [ISO/RFC5646 language identifier](http://www.w3schools.com/tags/ref_language_codes.asp) for the translation. Then follow the brief instructions in the *Language* section at the bottom of your `config.toml`. To change the default language used by Academic, set `defaultContentLanguage` to the desired language identifier in your configuration file.
To translate the navigation bar, you can edit the default `[[menu.main]]` instances in `config.toml`. However, for a multilingual site, you will need to duplicate all of the `[[menu.main]]` instances and rename the new instances from `[[menu.main]]` to `[[languages.X.menu.main]]`, where `X` is the language identifier (e.g. `[[languages.zh.menu.main]]` for Simplified Chinese). Thus, the navigation bar can be displayed in multiple languages.
To translate a content file in your `content/` folder into another language, copy the file to `filename.X.md` where `filename` is your existing filename and `X` is the appropriate [ISO/RFC5646 language identifier](http://www.w3schools.com/tags/ref_language_codes.asp) for the translation. Then translate the content in the new file to the specified language.
For further details on Hugo's internationalization and multilingual features, refer to the [associated Hugo documentation](https://gohugo.io/content/multilingual/).
### Permalinks
*Permalinks*, or *permanent links*, are URLs to individual pages and posts on your website. They are permanent web addresses which can be used to link to your content. Using Hugo's *permalinks* option these can be easily customized. For example, the blog post URL can be changed to the form *yourURL/2016/05/01/my-post-slug* by adding the following near the top of your `config.toml` (before `[params]` settings):
[permalinks]
post = "/:year/:month/:day/:slug"
Where `:slug` defaults to the filename of the post, excluding the file extension. However, slug may be overridden on a per post basis if desired, simply by setting `slug = "my-short-post-title"` in your post preamble.
## Upgrading
Feel free to *star* the project on [Github](https://github.com/gcushen/hugo-academic/) and monitor the [commits](https://github.com/gcushen/hugo-academic/commits/master) for updates.
Before upgrading the framework, it is recommended to make a backup of your entire website directory, or at least your `themes/academic` directory. You can also read about the [most recent milestones](https://github.com/gcushen/hugo-academic/releases) (but this doesn't necessarily reflect the latest *master* release).
Before upgrading for the first time, the remote *origin* repository should be renamed to *upstream*:
If you have modified files in `themes/academic`, git will attempt to auto-merge changes. If conflicts are reported, you will need to manually edit the files with conflicts and add them back (`git add <filename>`).
If there are any issues after upgrading, you may wish to compare your site with the latest [example site](https://github.com/gcushen/hugo-academic/tree/master/exampleSite) to check if any settings changed.
## Feedback & Contributing
Please use the [issue tracker](https://github.com/gcushen/hugo-academic/issues) to let me know about any bugs or feature requests, or alternatively make a pull request.
For general questions about Hugo, there is a [Hugo discussion forum](http://discuss.gohugo.io).
This is a brief guide to managing content with the Academic framework. Content can include publications, projects, talks, and news/blog articles. After you have read this guide about creating and managing content, you may also be interested to learn about [writing content with Markdown, LaTeX, and Shortcodes]({{< ref "post/writing-markdown-latex.md" >}}).<!--more-->
To enable LaTeX math rendering for a page, you should include `math = true` in the page's `+++` preamble, as demonstrated in the included example site. Otherwise, to enable math on the homepage or for all pages, you must globally set `math = true` in `config.toml`.
To disable source code highlighting by default for all pages, set `highlight = false` in `config.toml`. You can then enable source code highlighting only on pages that need it by setting `highlight = true` in that page's preamble. See the [code-highlighting docs]({{< ref "post/writing-markdown-latex.md#code-highlighting" >}}) for more details.
To display a featured image in content page headers, the parameters below can be inserted towards the end of a page's `+++` preamble. It is assumed that the image is located in your `static/img/` folder, so the full path in the example below will be `static/img/headers/getting-started.png`. The `caption` parameter can be used to write an image caption or credit.
If you wish to prevent a featured image automatically being used for a post's thumbnail on the homepage, the `preview = false` parameter can be added to `[header]`.
{{% /alert %}}
## Create a publication
To create a new publication:
hugo new publication/my-paper-name.md
Then edit the default variables at the top of `content/publication/my-paper-name.md` to include the details of your publication. The `url_` variables are used to generate links associated with your publication, such as for viewing PDFs of papers. Here is an example:
publication = "The publishing part of the citation goes here. You may use *Markdown* for italics etc."
title = "A publication title, such as title of a paper"
url_code = ""
url_dataset = ""
url_pdf = "pdf/my-paper-name.pdf"
url_project = ""
url_slides = ""
url_video = ""
+++
Further details on your publication can be written here using *Markdown* for formatting. This text will be displayed on the Publication Detail page.
```
The `url_` links can either point to local or web content. Associated local publication content, such as PDFs, may be copied to a `static/pdf/` folder and referenced like `url_pdf = "pdf/my-paper-name.pdf"`.
You can also associate custom link buttons with the publication by adding the following block(s) within the variable preamble above, which is denoted by `+++`:
```
[[url_custom]]
name = "Custom Link"
url = "http://www.example.org"
```
If you enabled `detailed_list` for publications in `config.toml`, then there are a few more optional variables that you can include in the publication page preamble. You may use `abstract_short = "friendly summary of abstract"` and `publication_short = "abbreviated publication details"` to display a friendly summary of the abstract and abbreviate the publication details, respectively. Furthermore, there is the option to display a different image on the homepage to the publication detail page by setting `image_preview = "my-image.jpg"`. This can be useful if you wish to scale down the image for the homepage or simply if you just wish to show a different image for the preview.
{{% alert warning %}}
Any double quotes (`"`) or backslashes (e.g. LaTeX `\times`) occurring within the value of any frontmatter parameter (such as the *abstract*) should be escaped with a backslash (`\`). For example, the symbol `"` and LaTeX text `\times` become `\"` and `\\times`, respectively. Refer to the [TOML documentation](https://github.com/toml-lang/toml#user-content-string) for more info.
{{% /alert %}}
## Post an article
To create a blog/news article:
hugo new post/my-article-name.md
Then edit the newly created file `content/post/my-article-name.md` with your full title and content.
Hugo will automatically generate summaries of posts that appear on the homepage. If you are dissatisfied with an automated summary, you can either limit the summary length by appropriately placing <code><!--more--></code> in the article body, or completely override the automated summary by adding a `summary` parameter to the `+++` preamble such that:
summary = "Summary of my post."
To disable commenting for a specific post, you can add `disable_comments = true` to the post `+++` preamble. Or to disable commenting for all posts, you can either set `disqusShortname = ""` or `disable_comments = true` in `config.toml`.
## Create a project
To create a project:
hugo new project/my-project-name.md
Then edit the newly created file `content/project/my-project-name.md`. Either you can link the project to an external project website by setting the `external_link = "http://external-project.com"` variable at the top of the file, or you can add content (below the final `+++`) in order to render a project page on your website.
## Create a talk
To create a talk:
hugo new talk/my-talk-name.md
Then edit the newly created file `content/talk/my-talk-name.md` with your full talk title and details. Note that many of the talk parameters are similar to the publication parameters.
## Manage node index pages
The node index pages (e.g. `/post/`) are the special pages which list all of your content. They can exist for blog posts, publications, and talks. The homepage widgets will automatically link to the node index pages when you have more items of content than can be displayed in the widget. Therefore, if you don't have much content, you may not see the automatic links yet - but you can also manually link to them using a normal Markdown formatted link in your content.
You can edit the title and add your own content, such as an introduction, by creating and editing the following content files for the node indexes:
hugo new post/_index.md
hugo new publication/_index.md
hugo new talk/_index.md
Then remove all parameters except for `title`, `math`, `highlight`, and `date`. Edit the `title` parameter as desired and add any content after the `+++` preamble/frontmatter ends. For example, you should have something similar to:
```toml
+++
title = "List of my posts"
date = "2017-01-01T00:00:00Z"
math = false
highlight = false
+++
Below is an automatically generated list of all my blog posts!
```
## Removing content
Generally, to remove content, simply delete the relevant file from your `content/post`, `content/publication`, `content/project`, or `content/talk` folder.
## View your updated site
After you have made changes to your site, you can view it by running the `hugo server --watch` command and then opening [localhost:1313](http://localhost:1313) in your web browser.
## Deploy your site
Finally, you can build the static website to a `public/` folder ready for deployment using the `hugo` command.
You may then deploy your site by copying the `public/` directory (by FTP, SFTP, WebDAV, Rsync, git push, etc.) to your production web server.
Note that running `hugo` does not remove any previously generated files before building. Therefore, it's best practice to delete your `public/` directory prior to running `hugo` to ensure no old or interim files are deployed to your server.
Learn how to migrate an existing website from Jekyll to Hugo.
"""
math = false
+++
Here are a few tips for migrating an existing website from Jekyll to Hugo. These tips can be applied in conjunction with following Hugo Academic's [getting started guide]({{< ref "post/getting-started.md" >}}).
## Move static content to `static`
Jekyll has a rule that any directory not starting with `_` will be copied as-is to the `_site` output. Hugo keeps all static content under `static`. You should therefore move it all there.
With Jekyll, something that looked like
▾ <root>/
▾ images/
logo.png
should become
▾ <root>/
▾ static/
▾ images/
logo.png
Additionally, you'll want any files that should reside at the root (such as `CNAME`) to be moved to `static`.
## Fix content
Depending on the amount of customization that was done for each post in Jekyll, this step will require more or less effort. There are no hard and fast rules here except that `hugo server --watch` and the Hugo Academic example site are your friends. Test your changes and fix errors as needed.
## Publish
The default is for Jekyll to publish the website to a `_site` directory, whereas Hugo publishes to a `public` directory.
## A practical example
Alexandre Normand migrated his website from Jekyll to Hugo in less than a day. You can see all his changes by looking at this GitHub [diff](https://github.com/alexandre-normand/alexandre-normand/compare/869d69435bd2665c3fbf5b5c78d4c22759d7613a...b7f6605b1265e83b4b81495423294208cc74d610). However, bear in mind that this example is **not specific to the Academic theme nor does it use the latest version of Hugo**.
Enable/disable and configure widgets to customize your homepage.
"""
+++
Homepage widgets display as sections on the homepage. They can be enabled/disabled and configured as desired. Academic has the following widgets available to use:
- About/biography
- Selected publications
- Recent publications
- Recent news/blog posts
- Projects
- Selected talks
- Recent talks
- Contact
- Custom widget (demonstrated with the *teaching* example)
The example site that you copied to create your site uses all the different types of widget (except talks), so you can generally just delete the widgets you don't need and customize the parameters of the widgets you wish to keep.
The parameters for each widget vary. They can be found in the preamble/frontmatter (between the pair of `+++`) for each widget installed in the `content/home/` folder.
{{% alert note %}}
By default, publications will be displayed in a simple list. If you prefer a more detailed list with abstract and image, you can enable the detailed publication list on the homepage by setting `detailed_list = true` in `content/home/publications.md`.
{{% /alert %}}
## Add a widget to the homepage
To add a widget manually, copy the relevant widget from `themes/academic/exampleSite/content/home/` to your `content/home/` folder.
Widget identifiers are set to their respective filenames, so a `content/home/about.md` widget can be linked from the navigation bar by setting the relevant URL as `"#about"` in `config.toml`.
This means that if you want to use multiple instances of a widget, each widget will be assigned a unique ID based on the filename that you set. You can then use that ID for linking, like in the above example.
## Using the custom widget
You can use the custom widget to create your own home page sections.
Simply duplicate (copy/paste) and rename the example *teaching* file at `content/home/teaching.md`. Then edit the section title, weight (refer to *Ordering sections* below), and content as desired.
You may also wish to add a navigation link to the top of the page that points to the new section. This can be achieved by adding something similar to the following lines to your `config.toml`, where the URL will consist of the first title word in lowercase:
[[menu.main]]
name = "Research"
url = "#research"
weight = 10
## Remove a widget from the homepage
If you do not require a particular widget, you can simply delete any associated files from the `content/home/` folder.
To remove a navigation link from the top of the page, remove the associated `[[menu.main]]` entry in `config.toml`.
## Ordering widgets
The order that the homepage widgets are displayed in is defined by the `weight` parameter in each of the files in the `content/home/` directory. The widgets are displayed in ascending order of their `weight`, so you can simply edit the `weight` parameters as desired.
title = "Writing content with Markdown, LaTeX, and Shortcodes"
math = true
+++
Content can be written using [Markdown](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet), [LaTeX math](https://en.wikibooks.org/wiki/LaTeX/Mathematics), and [Hugo Shortcodes](http://gohugo.io/extras/shortcodes/). Additionally, HTML may be used for advanced formatting.<!--more--> This article gives an overview of the most common formatting options.
## Sub-headings
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6
## Emphasis
Italics with *asterisks* or _underscores_.
Bold with **asterisks** or __underscores__.
Combined emphasis with **asterisks and _underscores_**.
Strikethrough with ~~two tildes~~.
## Ordered lists
1. First item
2. Another item
## Unordered lists
* First item
* Another item
## Images
Images may be added to a page by placing them in your `static/img/` folder and referencing them using one of the following two notations:
A general image:
![alternative text for search engines](/img/screenshot.png)
See the [Emoji cheat sheet](http://www.webpagefx.com/tools/emoji-cheat-sheet/) for available emoticons. The following serves as an example, but you should remove the spaces between each emoji name and pair of semicolons:
I : heart : Academic : smile :
I :heart: Academic :smile:
## Blockquote
> This is a blockquote.
> This is a blockquote.
## Footnotes
I have more [^1] to say.
[^1]: Footnote example.
I have more [^1] to say.
[^1]: Footnote example.
## Code highlighting
Pass the *language* of the code, such as `python`, as a parameter after three backticks:
```python
# Example of code highlighting
input_string_var = input("Enter some data: ")
print("You entered: {}".format(input_string_var))
```
Result:
```python
# Example of code highlighting
input_string_var = input("Enter some data: ")
print("You entered: {}".format(input_string_var))
```
### Highlighting options
The Academic theme uses [highlight.js](https://highlightjs.org) for source code highlighting, and highlighting is enabled by default for all pages. However, several configuration options are supported that allow finer-grained control over highlight.js.
The following table lists the supported options for configuring highlight.js, along with their expected type and a short description. A "yes" in the **config.toml** column means the value can be set globally in `config.toml`, and a "yes" in the **preamble** column means that the value can be set locally in a particular page's preamble.
option | type | description | config.toml | preamble
`highlight_style` | string | choose a highlighting style | yes | no
`highlight_version` | string | choose the highlight.js version | yes | no
#### Option `highlight`
The `highlight` option allows enabling or disabling the inclusion of highlight.js, either globally or for a particular page. If the option is unset, it has the same effect as if you had specified `highlight = true`. That is, the highlight.js javascript and css files will be included in every page. If you'd like to only include highlight.js files on pages that actually require source code highlighting, you can set `highlight = false` in `config.toml`, and then override it by setting `highlight = true` in the preamble of any pages that require source code highlighting. Conversely, you could enable highlighting globally, and disable it locally for pages that do not require it. Here is a table that shows whether highlighting will be enabled for a page, based on the values of `highlight` set in `config.toml` and/or the page's preamble.
config.toml | page preamble | highlighting enabled for page?
The `highlight_languages` option allows you to specify additional languages that are supported by highlight.js, but are not considered "common" and therefore are not supported by default. For example, if you want source code highlighting for Go and clojure in all pages, set `highlight_languages = ["go", "clojure"]` in `config.toml`. If, on the other hand, you want to enable a language only for a specific page, you can set `highlight_languages` in that page's preamble.
The `highlight_languages` options specified in `config.toml` and in a page's preamble are additive. That is, if `config.toml` contains, `highlight_languages = ["go"]` and the page's preamble contains `highlight_languages = ["ocaml"]`, then javascript files for *both* go and ocaml will be included for that page.
If the `highlight_languages` option is set, then the corresponding javascript files will be served from the [cdnjs server](https://cdnjs.com/libraries/highlight.js/). To see a list of available languages, visit the [cdnjs page](https://cdnjs.com/libraries/highlight.js/) and search for links with the word "languages".
The `highlight_languages` option provides an easy and convenient way to include support for additional languages to be severed from a CDN. If serving unmodified files from cdnjs doesn't meet your needs, you can include javascript files for additional language support via one of the methods described in the [getting started guide]({{< ref "post/getting-started.md#third-party-and-local-scripts-js" >}}).
#### Option `highlight_style`
The `highlight_style` option allows you to select an alternate css style for highlighted code. For example, if you wanted to use the solarized-dark style, you could set `highlight_style = "solarized-dark"` in `config.toml`.
If the `highlight_style` option is unset, the default is to use the file `/css/highlight.min.css`, either the one provided by the Academic theme, or else the one in your local `static` directory. The `/css/highlight.min.css` file provided by Academic is equivalent to the `github` style from highlight.js.
If the `highlight_style` option *is* set, then `/css/highlight.min.css` is ignored, and the corresponding css file will be served from the [cdnjs server](https://cdnjs.com/libraries/highlight.js/). To see a list of available styles, visit the [cdnjs page](https://cdnjs.com/libraries/highlight.js/) and search for links with the word "styles".
See the [highlight.js demo page](https://highlightjs.org/static/demo/) for examples of available styles.
{{% alert note %}}
Not all styles listed on the [highlight.js demo page](https://highlightjs.org/static/demo/) are available from the [cdnjs server](https://cdnjs.com/libraries/highlight.js/). If you want to use a style that is not served by cdnjs, just leave `highlight_style` unset, and place the corresponding css file in `/static/css/highlight.min.css`.
{{% /alert %}}
{{% alert note %}}
If you don't want to change the default style that ships with Academic but you do want the style file served from the [cdnjs server](https://cdnjs.com/libraries/highlight.js/), set `highlight_style = "github"` in `config.toml`.
{{% /alert %}}
The `highlight_style` option is only recognized when set in `config.toml`. Setting `highlight_style` in your page's preamble has no effect.
#### Option `highlight_version`
The `highlight_version` option, as the name implies, allows you to select the version of highlight.js you want to use. The default value is "9.9.0". The `highlight_version` option is only recognized when set in `config.toml`. Setting `highlight_version` in your page's preamble has no effect.
## Twitter tweet
To include a single tweet, pass the tweet’s ID from the tweet's URL as parameter to the shortcode:
{{</* tweet 666616452582129664 */>}}
## Youtube
{{</* youtube w7Ft2ymGmfc */>}}
## Vimeo
{{</* vimeo 146022717 */>}}
## GitHub gist
{{</* gist USERNAME GIST-ID */>}}
## Speaker Deck
{{</* speakerdeck 4e8126e72d853c0060001f97 */>}}
## $\rm \LaTeX$ math
```TeX
$$\left [ – \frac{\hbar^2}{2 m} \frac{\partial^2}{\partial x^2} + V \right ] \Psi = i \hbar \frac{\partial}{\partial t} \Psi$$
```
$$\left [ – \frac{\hbar^2}{2 m} \frac{\partial^2}{\partial x^2} + V \right ] \Psi = i \hbar \frac{\partial}{\partial t} \Psi$$
Alternatively, inline math can be written by wrapping the formula with only a single `$`:
This is inline: $\mathbf{y} = \mathbf{X}\boldsymbol\beta + \boldsymbol\varepsilon$
This is inline: $\mathbf{y} = \mathbf{X}\boldsymbol\beta + \boldsymbol\varepsilon$
Alerts are a useful feature that add side content such as tips, notes, or warnings to your articles. They are especially handy when writing educational tutorial-style articles. Use the corresponding shortcodes to enable alerts inside your content:
abstract = "We present a mobile visual clothing search system whereby a smart phone user can either choose a social networking photo or take a new photo of a person wearing clothing of interest and search for similar clothing in a retail database. From the query image, the person is detected, clothing is segmented, and clothing features are extracted and quantized. The information is sent from the phone client to a server, where the feature vector of the query image is used to retrieve similar clothing products from online databases. The phone's GPS location is used to re-rank results by retail store location. State of the art work focuses primarily on the recognition of a diverse range of clothing offline and pays little attention to practical applications. Evaluated on a challenging dataset, the system is relatively fast and achieves promising results."
abstract_short = "A mobile visual clothing search system is presented whereby a smart phone user can either choose a social networking image or capture a new photo of a person wearing clothing of interest and search for similar clothing in a large cloud-based ecommerce database. The phone's GPS location is used to re-rank results by retail store location, to inform the user of local stores where similar clothing items can be tried on."
authors = ["GA Cushen", "MS Nixon"]
date = "2013-07-01"
image_preview = ""
math = true
publication_types = ["1"]
publication = "In *International Conference on Multimedia and Expo Workshops (ICMEW)*, IEEE."
abstract = "Person re-identification is a critical security task for recognizing a person across spatially disjoint sensors. Previous work can be computationally intensive and is mainly based on low-level cues extracted from RGB data and implemented on a PC for a fixed sensor network (such as traditional CCTV). We present a practical and efficient framework for mobile devices (such as smart phones and robots) where high-level semantic soft biometrics are extracted from RGB and depth data. By combining these cues, our approach attempts to provide robustness to noise, illumination, and minor variations in clothing. This mobile approach may be particularly useful for the identification of persons in areas ill-served by fixed sensors or for tasks where the sensor position and direction need to dynamically adapt to a target. Results on the BIWI dataset are preliminary but encouraging. Further evaluation and demonstration of the system will be available on our website."
abstract_short = ""
authors = ["GA Cushen"]
date = "2015-09-01"
image_preview = ""
math = true
publication_types = ["2"]
publication = "In *Signal Image Technology & Internet Systems (SITIS)*, IEEE."
publication_short = ""
selected = false
title = "A Person Re-Identification System For Mobile Devices"
url_code = ""
url_dataset = ""
url_pdf = "http://arxiv.org/pdf/1512.04133v1"
url_project = "project/deep-learning/"
url_slides = ""
url_video = ""
+++
More detail can easily be written here using *Markdown* and $\rm \LaTeX$ math code.
# Optional featured image (relative to `static/img/` folder).
[header]
image = "headers/bubbles-wide.jpg"
caption = "My caption :smile:"
+++
Embed your slides or video here using [shortcodes](https://gcushen.github.io/hugo-academic-demo/post/writing-markdown-latex/). Further details can easily be added using *Markdown* and $\rm \LaTeX$ math code.
<divclass="row"itemprop="author"itemscopeitemtype="http://schema.org/Person"itemref="{{ if $.Site.Params.email }}person-email{{ end }}{{ if $.Site.Params.phone }} person-telephone{{ end }}{{ if $.Site.Params.address}} person-address{{ end }}">