Photoswipe is now loaded by default for all pages in this theme. No need
to call load-photoswipe shortcode anymore. Fixes bug where
load-photoswipe.js was invoked multiple times, which caused the
photoswipe to prevent viewing the lightbox more than once.
It turns out that the fix for static links in 6528985ed breaks
sites where baseURL is not at the domain root, (i.e. the Hugo site
is at http://www.example.com/foo/, not http://www.example.com/).
This is because the link strings passed to absURL and absLangURL
have a leading slash, which Hugo resolves to the domain root. This
commit fixes the problem by removing removing the leading slash
from these strings.
Fixes#57
Use absURL to find the URL for static content such as images,
CSS and JavaScript. The previous approach sometimes led to an
extra slash between the domain name and the path, breaking the
links. (In particular, it works when tested with hugo server, but
breaks in production.)
Use block templates [1] for all of the full-page templates such as
index.html, _default/list.html, etc. This reduces code duplicated
between them.
Also, move the code in partials/page.html and partials/post.html
to page/single.html and post/single.html respectively. With block
templates the contents of the partials is almost exactly the same
as the contents of the single page templates, and having dedicated
single-page templates for the content types means that we can get
rid of the if/then/else logic in _default/single.html.
This also gets rid of an excess container div; the duplication of
the divs was being obscured by the way _default/single.html was
interacting with the partials. (This is the same duplicated div
as in pull request #51 found by @1138-4EB.)
[1] https://gohugo.io/templates/blocks/
Set the lang attribute in the html element to be the right
language, and also add lang attributes to text in a language that
is different to the page language, such as the language switcher
links.
Links to translated content will appear next to the date, both on
the index page and on post pages. Also style the translation links
on post pages to be like those on the index page, although some
more thought about the design is probably in order.
This ensures that links work correctly in languages other than
English. For example, clicking on the navbar "brand" link used to
take you to the English home page even if you were browsing the
site in another language. Now it takes you to the home page for
that language.
As per https://gohugo.io/templates/partials/ "Theme developers may want
to include a few partials with empty HTML files in the theme just so end
users have an easy place to inject their customized content."
Resolves#42
Add a "social.toml" data file to hold the data for all the social
icons in the footer template. This reduces repetition in the
template code and makes it easier to reuse the data in other
parts of the theme, should that be desired in the future.
It also makes it easier for end users to add new icons by just
overriding the data file, instead of having to override the whole
footer template.
- Changed header_wp.html and header.html so that they will also work on
the homepage (if the current page is the homepage then use the site
bigimg/title/subtitle, otherwise use the page bigimg/title/subtitle;
need to add them to the scratchpad so that they are accessible outside
the scope of the if/else statement).
- Change index.html to use the header_wp.html partial instead of
duplicating the same code
- Fixed issue where bigimg doesn't work if only one bigimg is defined
(changed `if isset .Params.bigimg 1` to `if isset .Params.bigimg 0`)
- Fixed issue where title and subtitle disappear when screen width is
less than 365px
Update the default archetype to specify all relevant frontmatter fields.
Updated the bigimg and comments features to handle "unset" or "null"
values in the frontmatter and default appropriately. Also updated the
bigimg sample to explain both the default and "flow" YAML syntax.
Add support for bigimg's on the front page, multiple images that rotate
on both the front page and regular pages and posts, also added test
images and a sample to demonstrate the functionality and how to specify
bigimg's.
Comments toggeled per-page by setting "comments = true" or "comments =
false" in front matter. If not set, will use new default setting defined
in config.toml.