Commit graph

59 commits

Author SHA1 Message Date
Michael Romero
978060b661 Merge pull request #55 from rayjolt/og-url
Fix og:url meta tag for multilingual sites
2017-04-29 09:16:19 -07:00
Jack Taylor
49cb655cd6 Fix og:url meta tag for multilingual sites
We need to use absLangURL instead of absURL, otherwise we
generate URLs that are wrong or don't exist for pages which aren't
in the default language.
2017-04-29 13:23:45 +09:00
Jack Taylor
efe742f442 Fix links to static content
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.)
2017-04-29 13:15:46 +09:00
Jack Taylor
a5113e5008 Make all full-page templates inherit from a block template
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/
2017-04-17 12:44:44 +09:00
Michael Romero
07a5bc3953 Merge branch 'master' into duplicatedmaindiv 2017-04-09 22:36:48 -07:00
1138-4EB
c39138e3c9 Removed duplicated main div, because it is included in single, which imports page and post. 2017-04-09 01:23:47 +02:00
Jack Taylor
9c467304ec Use the correct language in lang attributes
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.
2017-04-07 13:08:44 +09:00
Jack Taylor
ff657d2db1 Add links to translated content
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.
2017-04-07 12:58:57 +09:00
Jack Taylor
c4cfe47e01 Make links language-relative
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.
2017-04-07 08:01:06 +09:00
Jack Taylor
655c2011fe Add a language switcher to the navigation
This ignores whether the current page has a translation in a
given language, but it's a start.
2017-04-06 18:39:11 +09:00
Jack Taylor
0f74f45531 Move hard-coded strings to i18n files
Add translations in English and in Japanese
2017-04-06 18:39:11 +09:00
Li-Wen Yip
2223163a4f Add empty partials for custom html in head and footer
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
2017-04-02 23:50:42 +01:00
Li-Wen Yip
4f32165e3c Clean up head.html
Create meta tags using `with` and `default` functions to eliminate
redundant code
2017-04-01 00:04:30 +01:00
Li-Wen Yip
bc06d8f202 Load photoswipe js in footer.html instead of load-photoswipe.html 2017-03-28 09:36:27 +01:00
Jack Taylor
2366c020e7 Update the footer template with the new data file location
The social icons data was moved in cfad05b, but we need to update
the footer template with the new location as well to be able to
access the data.
2017-03-28 15:55:57 +09:00
Michael Romero
fa359a6dd2 Merge pull request #43 from rayjolt/footer-icons
Split the social icon data out from the footer template
2017-03-27 23:25:23 -07:00
Michael Romero
19b620f632 Update photoswipe gallery to hugo-easy-gallery
Using https://github.com/liwenyip/hugo-easy-gallery/ from @liwenyip
2017-03-27 21:00:24 -07:00
Michael Romero
de52bb63ed Only load cse.js if google cse is configured
Previously if gcse wasn't configured, the footer would attempt and fail
to load cse.js with an invalid gcse ID
2017-03-27 20:27:18 -07:00
Jack Taylor
4379aa951f Split the social icon data out from the footer template
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.
2017-03-28 12:06:17 +09:00
Li-Wen Yip
5e287b6705 Fix issues with title, subtitle, and bigimg on page 2 2017-03-26 14:01:02 +01:00
Michael Romero
4d866ddfd7 Default date format if not defined in config.toml
Default date format if not defined in config.toml
2017-03-25 20:10:24 -07:00
Michael Romero
625176f1ce Merge pull request #39 from liwenyip/google-custom-search
Added support for Google Custom Search Engine
2017-03-25 15:03:28 -07:00
Michael Romero
018a170672 Merge pull request #38 from liwenyip/fix-og-description
Use .Summary instead of .Content for og:description and twitter:description
2017-03-25 15:00:43 -07:00
Li-Wen Yip
0465584c2b Added support for Google Custom Search Engine 2017-03-25 16:17:01 +00:00
Li-Wen Yip
b7864a3f48 Use .Summary instead of .Content for og:description and twitter:description 2017-03-25 13:09:09 +00:00
Michael Romero
53f6ca8b72 Merge remote-tracking branch 'refs/remotes/origin/master' into photoswipe 2017-03-20 23:59:09 -07:00
Michael Romero
3e2b5c77dd Handle optional variables in header
Handle optional variables such as "subtitle" and "bigimg" in header to
avoid errors when these variables are not set.
2017-03-20 23:52:48 -07:00
Michael Romero
aae34f128c PhotoSwipe support 2017-03-20 21:45:55 -07:00
halogenica
ee6246379b Consolidate header_wp.html and header.html
Consolidate header_wp.html and header.html to a single header.html
file.
2017-03-19 16:50:32 -07:00
Li-Wen Yip
730ce3d9d3 User header_wp.html partial in index.html
- 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
2017-03-11 20:49:44 +00:00
Li-Wen Yip
c5736a53c2 Update Opengraph/Twitter tags to work with halogenica's implementation of bigimg 2017-03-10 20:22:24 +00:00
Li-Wen Yip
90b1bacb21 Update Indenting 2017-03-10 20:13:01 +00:00
Li-Wen Yip
b665039b0f Fix issues with bigimgs
- 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
2017-03-08 21:56:10 +00:00
Michael Romero
d0ec5b480e Merge pull request #25 from hukacode/patch-1
Update footer.html
2017-03-07 03:04:15 -08:00
Michael Romero
ba07f7cc67 Update default archetype
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.
2017-03-07 02:53:09 -08:00
Nguyễn Lê Khánh Hùng
00a9ed2c6f Update footer.html
Missing splash at RSS section
2017-03-07 16:18:12 +07:00
Michael Romero
f84ba895a8 Better bigimg support
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.
2017-03-07 00:55:44 -08:00
Michael Romero
d3ebf37be4 Use absolute URL for share_img 2017-03-06 15:42:02 -08:00
Michael Romero
867ae67b52 Facebook OpenGraph tags and Twitter summary cards
ported from beautiful-jekyll
2017-03-06 15:39:20 -08:00
Michael Romero
43fd0bb8bd Comments toggeled per-page and add default setting
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.
2017-03-06 15:20:59 -08:00
Michael Romero
0338abd814 Made date format configurable
Can be configured in config.toml Params.dateFormat
2017-03-06 14:36:35 -08:00
Michael Romero
40b3eb3691 Correct spacing and remove extraneous </div>
Removed extraneous </div> in layouts\_default\list.html
2017-03-06 13:36:42 -08:00
Michael Romero
50fad43b1f Ability to toggle RSS
Ability to toggle RSS feed by setting .Site.Params.rss (defined in
config.toml in the [Params] section)
2017-03-06 10:59:07 -08:00
Michael Romero
04617ddabb Add KaTeX support
Added KaTeX support with accompanying samples
2017-03-05 14:44:28 -08:00
halogenica
77a8fc4a30 Add google+, reddit, snapchat, and band camp links
Add google+, reddit, snapchat, and band camp links. Also updated font
awesome for band camp logo.
2017-02-25 22:03:51 -08:00
Stefan Haider
8234e24071 Use CDN for bootstrap and jQuery + version upgrade 2017-02-25 15:53:32 +01:00
Michael Romero
d82dfdb5f7 Add itch.io button 2017-02-20 00:39:59 -08:00
Michael Romero
b418d4c303 Selected updates from latest beautiful-jekyll changes
Update main.css, nexted menus: ensure title width is wide enough to
accommodate children, Integrating public custom linkedin URL, add
instagram, snapchat, youtube, and spotify links, updated awesome-font to
v4.6, and updated CSS
2017-02-20 00:10:26 -08:00
Michael Romero
938766f54f Add client side syntax highlighting support
Added client side syntax highlighting support in addition to existing
server side syntax highlighting support. Updated readme and sample to
reflect both types of highlighting.
2017-02-12 04:26:35 -08:00
1138-4EB
6f520773f5 Add slashes to links in <head.html>, <nav.html>, <footer.html> and
<404.html>.

Add favicon example.

Modify footer vars to allow links not pointing to user profiles.

<header.html> renamed to <header_wp.html> and part of it moved to <header.html> since the same block was repeated two times.

Add Hugo version to footer
2017-02-06 19:38:32 +01:00