summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md4
-rw-r--r--README.md12
-rw-r--r--assets/js/ed.js13
-rw-r--r--exampleSite/content/about.md5
4 files changed, 26 insertions, 8 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index bd9e9d1..3c1b792 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased](https://github.com/sergeyklay/gohugo-theme-ed/compare/v0.5.0...HEAD)
+### Added
+
+- Provide annotation support via https://hypothes.is
+
### Fixed
- Fix opening external links in new tab/window when use
diff --git a/README.md b/README.md
index f1647ba..d216696 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-<h1 align=center>Ed | <a href="https://gohugo-theme-ed.netlify.app/" rel="nofollow">Demo</a></h1>
+<h1 align=center>Ed | <a href="https://gohugo-theme-ed.netlify.app/?utm_source=github.com&utm_campaign=docs&utm_medium=smm">Demo</a></h1>
Ed is a [Hugo](http://gohugo.io) theme designed for textual editors based on
[minimal computing](http://go-dh.github.io/mincomp/) principles, and focused
@@ -18,8 +18,8 @@ theme by [Alex Gil](https://twitter.com/elotroalex).
## Sample Ed editions
-- [Our sample site](https://gohugo-theme-ed.netlify.app/) is the first edition built with Ed.
-- [Serghei Iakovlev's blog](https://serghei.blog/?utm_source=ed&utm_campaign=docs&utm_medium=smm)
+- [Our sample site](https://gohugo-theme-ed.netlify.app/?utm_source=github.com&utm_campaign=docs&utm_medium=smm) is the first edition built with Ed.
+- [Serghei Iakovlev's blog](https://serghei.blog/?utm_source=github.com&utm_campaign=docs&utm_medium=smm)
## Features
@@ -33,10 +33,16 @@ theme by [Alex Gil](https://twitter.com/elotroalex).
- Metadata in OpenGraph to play nice with social media and search engines
- Automatic table of content generation
- Simple search functionality
+- Annotations via [hypothes.is](https://hypothes.is/)
- Contact form
- Custom `robots.txt` (changes values based on environment)
- RSS/Atom/Json Feeds Discovery
+## Installing and using Ed
+
+To learn how to install and begin using Ed, please visit our
+[documentation page](https://gohugo-theme-ed.netlify.app/documentation/?utm_source=github.com&utm_campaign=docs&utm_medium=smm).
+
## License
Ed licensed under the MIT License. See the [LICENSE](https://raw.githubusercontent.com/sergeyklay/gohugo-theme-ed/master/LICENSE) file for more information.
diff --git a/assets/js/ed.js b/assets/js/ed.js
index e3b844a..60c45ee 100644
--- a/assets/js/ed.js
+++ b/assets/js/ed.js
@@ -1,5 +1,5 @@
-document.addEventListener('DOMContentLoaded', function () {
- // 'Back to top' logic
+// 'Back to top' logic
+function setupBackToTop() {
const intersectionObserver = new IntersectionObserver(function(entries) {
const topBtn = document.querySelector('.top-of-site-link');
if (topBtn === null) return;
@@ -11,8 +11,10 @@ document.addEventListener('DOMContentLoaded', function () {
if (topAnchor !== null) {
intersectionObserver.observe(topAnchor);
}
+}
- // Annotation support
+// Annotation support
+function setupHypothes() {
const hypothesisContainer = document.querySelector('.hypothesis-container');
if (hypothesisContainer !== null) {
hypothesisContainer.addEventListener('click', (e) => {
@@ -31,4 +33,9 @@ document.addEventListener('DOMContentLoaded', function () {
e.preventDefault();
});
}
+}
+
+document.addEventListener('DOMContentLoaded', function () {
+ setupBackToTop();
+ setupHypothes();
});
diff --git a/exampleSite/content/about.md b/exampleSite/content/about.md
index 2f28cab..87011f7 100644
--- a/exampleSite/content/about.md
+++ b/exampleSite/content/about.md
@@ -33,7 +33,7 @@ for you, Kindle!
- [Our sample site]({{< ref "/" >}}) is the first edition built with Ed.
-- {{< link src="https://serghei.blog/?utm_source=ed&utm_campaign=docs&utm_medium=smm" class="external" target="_blank" hreflang="ru" rel="noopener noreferrer" >}}Serghei Iakovlev's blog{{< /link >}}
+- {{< link src="https://serghei.blog/?utm_source=ed&utm_campaign=docs&utm_medium=smm" class="external" target="_blank" hreflang="ru" >}}Serghei Iakovlev's blog{{< /link >}}
## Current Features
@@ -47,6 +47,7 @@ for you, Kindle!
- Metadata in OpenGraph to play nice with social media and search engines
- Automatic table of content generation
- Simple search functionality
+- Annotations via {{< link src="https://hypothes.is/" class="external" target="_blank" hreflang="en" rel="noopener noreferrer" >}}hypothes.is{{< /link >}}
- Contact form
- Custom `robots.txt` (changes values based on environment)
- RSS/Atom/Json Feeds Discovery
@@ -55,7 +56,7 @@ for you, Kindle!
## Installing and using Ed
To learn how to install and begin using Ed, please visit our
-[documentation page]({{< relref "/documentation" >}} "Visit the documentation").
+[documentation page]({{< relref "/documentation?utm_source=ed&utm_campaign=docs&utm_medium=smm" >}} "Visit the documentation").
---