hackmdio / hackmdio/codimd

Licence of content is not machine readable

Open
#1,643 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
10.1k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

**EDIT:** The issues title should be changed in: **Set a proper "licence" attribute on HTML**. I can't change that.

Hi Folks,

I found a problem with make my contents licence machine readable. The problem is affecting the YAML Metadata and as well HTML code inside of a note.

## Setting
My content is licenced with a CC licence (CC BY-SA 4.0). Google and other search engines should classify the content with the right licence, so that it can be found with the extendes search. I tried two possibilities to reach that aim.

## Firs thing - YAML

I put in YAML metadata at the beginning of the document in this matter:

```
---
title: Example Title
description: Some description
tags: OER, YAML, Another Tag, Foo
lang: de-de
license: https://creativecommons.org/licenses/by-sa/4.0/deed.de
---
```

As I inspect the output with Mozillas webinspector, I see the description, but no other YAML metadata:

![grafik](https://user-images.githubusercontent.com/49334345/103301969-cdea3380-4a02-11eb-9b2e-37a9f32ceda0.png)

Additionally, the language seems to be wrong (en instead of de) --> I found this will be fixed in next release: https://github.com/hackmdio/codimd/pull/1481

## Second thing - licence attribute in a link

As Markdown does not allow attributes, I tried that with pure HTML code, wich should be fine. That setting works e.g. in Wordpress with Markdown support. But unforunately that won't be parsed in the right way by CodiMD. As you see in the Screenshot, the *rel="licence"* attribute is completley ignored.

```html
**CC BY-SA 4.0**
```
![grafik](https://user-images.githubusercontent.com/49334345/103302897-fc690e00-4a04-11eb-9abe-b92b34d4f2de.png)

Example Note: https://codimd.elearningdienst.de/cPKkvZlETsmdR_Q6KbV43Q?both

**I think that behaviour is not expected.**

## System
I'm on a docker employment with release 2.2.0 but with an own Database server.

## Possible Solution
The licence in YAML metadata should be parsed correctly in HTML Google and other search engines need something like that to get the licence of content: `**CC BY-SA 4.0**`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.