Skip to content

Commit

Permalink
fix js overrides for code block annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucaterre committed Mar 21, 2024
1 parent 6b42f74 commit cc62195
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
15 changes: 7 additions & 8 deletions docs/cookbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ La hiérarchie documentaire du corpus des positions est la suivante :
racine
> annee
> positions
> sections
> sections
```

Pour la gestion et l’édition de vos sources XML/TEI vous pouvez bien entendu organiser le dossier comme bon vous semble.
Expand Down Expand Up @@ -71,8 +71,8 @@ Le corpus de test est disponible : <a href="https://github.com/chartes/dots_docu

!!! info "Structure du dossier de dépôt"

```
ENCPOS/ # collection de premier niveau
```
ENCPOS/ # collection de premier niveau
data/
ENCPOS_1849/ # collection
ENCPOS_1849_04.xml # document
Expand All @@ -88,8 +88,7 @@ Le corpus de test est disponible : <a href="https://github.com/chartes/dots_docu
documents_metadata.tsv
dots_metadata_mapping.xml
README.md
```

```

#### Dossier `data/`

Expand Down Expand Up @@ -125,9 +124,9 @@ Exemples :

???+ example "titre (`dc:title`) de chaque document"
```xml
<dc:title
xpath="//titleStmt/title[@type='main' or position()=1]"
scope="document"/>
<dc:title
xpath="//titleStmt/title[@type='main' or position()=1]"
scope="document"/>
```

???+ example "titre (`dc:title`) de chaque collection"
Expand Down
2 changes: 1 addition & 1 deletion docs/js/custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function fetchDataForCollapse(collapse) {
.then(data => {
cardBody.innerHTML = `<pre><code class="json">${JSON.stringify(data, null, 2)}</code></pre>`;
hljs.highlightBlock(cardBody.firstChild, {language: 'json'});
hljs.highlightAll();
//hljs.highlightAll();
})
.catch(error => {
cardBody.innerHTML = `<p>Failed to fetch data, retry later.</p>`;
Expand Down
9 changes: 9 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ theme:
name: material
logo: assets/dots-logo-retro.drawio.png
custom_dir: docs/overrides
features:
- content.code.annotate

extra:
annotate:
json: [.s2]
xml: [.w]

extra_css:
- css/custom.css
Expand All @@ -39,4 +46,6 @@ markdown_extensions:
- admonition
- pymdownx.details
- pymdownx.superfences
- attr_list
- md_in_html

0 comments on commit cc62195

Please sign in to comment.