https://github.com/bmarwell/jbake-blog-template-author
Blog template using JBake and the Author theme
https://github.com/bmarwell/jbake-blog-template-author
Last synced: 3 months ago
JSON representation
Blog template using JBake and the Author theme
- Host: GitHub
- URL: https://github.com/bmarwell/jbake-blog-template-author
- Owner: bmarwell
- License: apache-2.0
- Created: 2022-03-17T07:51:26.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-03-11T12:48:11.000Z (3 months ago)
- Last Synced: 2025-03-11T13:42:32.811Z (3 months ago)
- Language: CSS
- Homepage:
- Size: 593 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.adoc
- License: LICENSE
Awesome Lists containing this project
README
= JBake Blog Setup with Author Theme
:toc:
:idprefix:
:icons: fontThis repository contains the brilliant link:https://de.wordpress.org/themes/author/[Author theme from Ben Sibley], originally written for WordPress.
== Features
Author theme::
The Author theme was ported by me, including a rewrite of the JavaScript files to not use jQuery.
No jQuery::
Yes, I got rid of all jQuery.
Really.
Multi-Language-Support::
While the blog roll (index) will show all languages, the posts itselves can contain a language idicator and a link to the translations.
Metadata will be added where appropriate.
Minification::
The new behaviour since 2023-05-11 is:
Images will not be optimized on build. Instead, run `./mvnw com.github.eirslett:frontend-maven-plugin:yarn@optimize-images` to optimize all images in the `src/site` folder.
+
The old behaviour was:
When building with Apache Maven, all local CSS, JS, images(!) and HTML files will be minified.
You can skip the HTML and image minifcation step by using `./mvnw package -Dsite.postprocess.skip=true`.
Featured Images::
You can include a featured image and even select the display type for twitter and linkedin!
Simple Light Box::
All your images will be opened in a mobile friendly lightbox when clicking them.
Open Graph Metadata::
Metadata for Twitter, Facebook etc. will automatically be inserted when available.
Fallback options are available, too.
JSON-LD support::
Have crawlers read your data in a JSON format for linked data, based on schema.org.
WP-Appbox port::
You can insert links to the following stores via macro (incomplete):
* Google Play Store
* More to come
Shariff sharing buttons::
These sharing buttons do not compromise your security: No I-Frames or other injected code from the servers.
YAML-based menu::
The menu can be defined using YAML.
No writing of complicated HTML anymore.
Tag page descriptions::
You can define descriptions for your tag page for better SEO visibility.== Setup instructions
1. Go through the link:jbake.properties[] file and edit everything you need.
Some options can be disabled entirely, some cannot.
Most options should have comments by now.
2. Go through the files in `src/site/data`.
* link:src/site/data/authors.yaml[]:
Define at lease one author, this is mandatory.
Spelling matters, you must use the exact spelling everywhere.
* link:src/site/data/keywords.yaml[]:
Keywords are optional.
You can add descriptions for the tags pages here.
If not defined here, the tag page will just be missing the description.
* link:src/site/data/license.yaml[]:: Edit the license according to your need.
This will be applied to all CONTENT YOU WRITE, not to any of this repository.
* link:src/site/data/socialmedia.yaml[]:
You can define which buttons to show below your avatar.== Writing Posts and Pages
This section will only cover the AsciiDoc format.
=== AsciiDoc examples
The following snippet is a sample header for your asciidoc posts:
[source,asciidoc]
----
// This work is licensed under a
// Creative Commons Attribution-ShareAlike 4.0 International License.= Site title
:jbake-author: Author name as spelled in authors.yaml
:jbake-date: 2017-03-09 20:16:13
:jbake-updated: 2017-03-09 20:16:13
:jbake-lang: de-DE
:jbake-type: post
:jbake-status: published
:jbake-tags: open source, software, example, post, asciidoc, jbake
:jbake-featuredimage: my-featured-image.png
:jbake-featuredimagewidth: 2000
:jbake-featuredimageheight: 2000
:jbake-twittercard: large
// :jbake-alternate: { "en-GB": "" }
:toc: macro
:idprefix:
:icons: font
----* The license is optional and specific for this content, but should in general be the same as defined in the license.yaml file.
* Dates *MUST* be written in the ISO format, timezone UTC.
* `lang` can be set to a two-letter ISO code (de, en) or can contain a region, separated by a hyphen.
* Tags are a comma separated list of keywords. A keyword index will be created, as well as a page for each keyword.
* If no featured image is present, the default featured image from link:jbake.properties[] will be used.
* toc, idprefix and icons are optional. Remove or adjust to your liking.== Adding twitter widgets
This template supports adding timelines and tweets.
One option is to include a timeline. At the moment, there is no freemarker macro,
but an HTML passthrough will do.Be sure to add the classes "twitter" and "timeline".
The `data-twitter-timeline-id` is the actual source for the generated timeline.
As a fallback, you can insert or link the referenced timeline..Adding a user timeline
[source,asciidoc]
----
++++
++++
----You can also link a specific tweet.
Instead of the timeline class, use the `tweet` class.
Again, you can optionally add some fallback content..Adding a specific tweet
[source,asciidoc]
----
++++
https://twitter.com/bmarwell/status/1508528412679356416
++++
----=== WP Appbox
This is supported via HTML only, most data needs to be inserted by hand.
A freemarker macro is in the making.=== Simple Lightbox
All images should open in a simple lightbox on click.
=== Custom robots.txt
Delete the file `/src/site/content/robots.adoc` and create a file `/src/site/assets/robots.txt` instead.
== Publishing
Compile your web site using `./mvnw package`.
If you want a live preview, use `./mvnw generate-resources jbake:inline`.
== Roadmap
* Appbox support
* Better sitemap support.
* Touch icon support
* Fix a lot of HTML errors, e.g.
** span with href
** img without alt
** img resolution attributes with "px" suffix
** unencoded paths in href attributes to tags
* Identify index sites and add metadata (e.g. lang attribute).