You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@annotator.apache.org by ra...@apache.org on 2021/05/19 01:43:35 UTC

[incubator-annotator-website] branch asf-site updated (f32394a -> acd3441)

This is an automated email from the ASF dual-hosted git repository.

randall pushed a change to branch asf-site
in repository https://gitbox.apache.org/repos/asf/incubator-annotator-website.git.


    from f32394a  Update annotator submodule to include @module docs.
     new 1d10ad9  Increase base font size
     new 75c92c9  Add syntax highlight plugin
     new acd3441  Fix shell syntax highlighting

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .eleventy.js                |  3 +++
 src/_layouts/default.hbs    | 10 ++++++++++
 src/docs/develop.md         |  6 +++---
 src/docs/getting-started.md | 12 ++++++------
 src/docs/index.md           |  2 +-
 5 files changed, 23 insertions(+), 10 deletions(-)

[incubator-annotator-website] 01/03: Increase base font size

Posted by ra...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

randall pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/incubator-annotator-website.git

commit 1d10ad99ecf889a53e532b058452f1bb29c9b9c1
Author: Randall Leeds <ra...@bleeds.info>
AuthorDate: Sun May 16 15:31:59 2021 -0700

    Increase base font size
---
 src/_layouts/default.hbs | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/_layouts/default.hbs b/src/_layouts/default.hbs
index b5d039f..8fff6dd 100644
--- a/src/_layouts/default.hbs
+++ b/src/_layouts/default.hbs
@@ -34,6 +34,11 @@
     {{/extra_head_stuff}}
 
     <link rel="stylesheet" href="//semantic-ui.com/dist/semantic.min.css" />
+    <style>
+      html {
+        font-size: 17px;
+      }
+    </style>
   </head>
 
   <body>

[incubator-annotator-website] 03/03: Fix shell syntax highlighting

Posted by ra...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

randall pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/incubator-annotator-website.git

commit acd344111f6153036b54597248d14d11d39a6cff
Author: Randall Leeds <ra...@bleeds.info>
AuthorDate: Sun May 16 15:32:40 2021 -0700

    Fix shell syntax highlighting
---
 src/docs/develop.md         |  6 +++---
 src/docs/getting-started.md | 12 ++++++------
 src/docs/index.md           |  2 +-
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/docs/develop.md b/src/docs/develop.md
index a0cdf4f..c676ef5 100644
--- a/src/docs/develop.md
+++ b/src/docs/develop.md
@@ -26,7 +26,7 @@ $ git clone https://gitbox.apache.org/repos/asf/incubator-annotator.git apache-a
 
 Then install dependencies using yarn:
 
-```sh
+``` shell
 $ cd apache-annotator
 $ yarn install
 ```
@@ -35,7 +35,7 @@ $ yarn install
 
 To compile (‘transpile’) the code:
 
-```sh
+``` shell
 $ yarn build
 ```
 
@@ -57,6 +57,6 @@ Now open `http://localhost:8080/` (or whichever address the command prints) in y
 
 This runs the tests for all packages and reports their code coverage:
 
-```sh
+``` shell
 $ yarn test
 ```
diff --git a/src/docs/getting-started.md b/src/docs/getting-started.md
index 1b110d9..5423c8c 100644
--- a/src/docs/getting-started.md
+++ b/src/docs/getting-started.md
@@ -12,13 +12,13 @@ The project is made up of multiple modules. Each module is [available on the NPM
 
 For example:
 
-```sh
+``` shell
 $ yarn add @apache-annotator/dom
 ```
 
 …with in your code:
 
-```js
+``` js
 import { highlightRange } from '@apache-annotator/dom';
 ```
 
@@ -34,7 +34,7 @@ A typical goal of web annotation is to let users highlight a phrase of text in a
 
 First, we define the way to describe the user’s selection as a TextQuoteSelector.
 
-```js
+``` js
 import { describeTextQuote } from '@apache-annotator/dom';
 
 async function describeCurrentSelection() {
@@ -46,7 +46,7 @@ async function describeCurrentSelection() {
 
 If the user had selected the word *“ipsum”* in the befamed *“Lorem ipsum dolor amet …”*, the return value of describeCurrentSelection() might resolve to this:
 
-```
+``` json
 {
   type: 'TextQuoteSelector',
   exact: 'ipsum',
@@ -59,7 +59,7 @@ The *prefix* and *suffix* attributes are there to know which of multiple occurre
 
 Next, we define roughly the inverse function: given a TextQuoteSelector, we highlight the text it points to.
 
-```js
+``` js
 import { createTextQuoteSelectorMatcher, highlightRange } from '@apache-annotator/dom';
 
 async function highlightSelectorTarget(textQuoteSelector) {
@@ -78,7 +78,7 @@ As the [`for await … of`](https://developer.mozilla.org/en-US/docs/Web/JavaScr
 
 We could use the functions defined above in many ways; keeping highlighted quotes in local storage, or in one’s bookmarks, or sharing them with others, and so on. For this example, we keep it simple and highlight each selection upon release of the mouse button; and store the selector to make it appear again after a page reload.
 
-```js
+``` js
 document.addEventListener('mouseup', async () => {
   const selector = await describeCurrentSelection();
   const existingSelectors = JSON.parse(localStorage[document.URL] || '[]');
diff --git a/src/docs/index.md b/src/docs/index.md
index c533e42..9d9d5c3 100644
--- a/src/docs/index.md
+++ b/src/docs/index.md
@@ -34,7 +34,7 @@ The [W3C Web Annotation Data Model](https://www.w3.org/TR/annotation-model) outl
 
 The source code also includes a script for validating Web Annotation Data Model JSON documents against the data model schema. Having [installed from source](/docs/develop/#install-from-source), one can run:
 
-```sh
+``` shell
 $ yarn validate --url https://raw.githubusercontent.com/w3c/web-annotation-tests/master/tools/samples/correct/anno1.json
 ```
 

[incubator-annotator-website] 02/03: Add syntax highlight plugin

Posted by ra...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

randall pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/incubator-annotator-website.git

commit 75c92c9aacb2a0c3cbc7cdc44a5e9146aaee5c8f
Author: Randall Leeds <ra...@bleeds.info>
AuthorDate: Sun May 16 15:32:18 2021 -0700

    Add syntax highlight plugin
---
 .eleventy.js             | 3 +++
 src/_layouts/default.hbs | 5 +++++
 2 files changed, 8 insertions(+)

diff --git a/.eleventy.js b/.eleventy.js
index d31afc8..102a06a 100644
--- a/.eleventy.js
+++ b/.eleventy.js
@@ -30,6 +30,9 @@ module.exports = function(eleventyConfig) {
   const pluginTOC = require('eleventy-plugin-toc');
   eleventyConfig.addPlugin(pluginTOC, { tags: ['h2', 'h3'] });
 
+  const pluginSyntaxHighlight = require("@11ty/eleventy-plugin-syntaxhighlight");
+  eleventyConfig.addPlugin(pluginSyntaxHighlight);
+
   return {
     dir: {
       input: 'src',
diff --git a/src/_layouts/default.hbs b/src/_layouts/default.hbs
index 8fff6dd..0ce12fe 100644
--- a/src/_layouts/default.hbs
+++ b/src/_layouts/default.hbs
@@ -34,10 +34,15 @@
     {{/extra_head_stuff}}
 
     <link rel="stylesheet" href="//semantic-ui.com/dist/semantic.min.css" />
+    <link rel="stylesheet" href="//cdn.jsdelivr.net/npm/prism-themes/themes/prism-vs.css" />
     <style>
       html {
         font-size: 17px;
       }
+
+      p, pre[class*="language-"] {
+        margin: .8em 0 1.25em;
+      }
     </style>
   </head>