Skip to content

Commit

Permalink
Merge branch 'main' into patch-3
Browse files Browse the repository at this point in the history
  • Loading branch information
konrad authored Oct 14, 2024
2 parents 71c3215 + 09fabbd commit 35094ed
Show file tree
Hide file tree
Showing 54 changed files with 1,967 additions and 1,679 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/bad-link-reporter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ env:
labels: bug

# Number of previous issues to check for duplicate reports.
lookback: 10
lookback: 100

# Time (sec) to wait on an unresponsive URL before trying once more.
timeout: 15
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/jekyll.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ concurrency:
jobs:
# Build job
build:
runs-on: ubuntu-latest
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/lint-md.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DavidAnson/markdownlint-cli2-action@v15
- uses: DavidAnson/markdownlint-cli2-action@v17
with:
# Lint all markdown files in the repo
config: 'utils/.markdownlint.yaml'
globs: '**/*.md'
# Automatically fix supported issues
fix: true
4 changes: 2 additions & 2 deletions .github/workflows/spellcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ jobs:
runs-on: ubuntu-latest
steps:
# The checkout step
- uses: actions/checkout@v3
- uses: rojopolis/spellcheck-github-actions@0.36.0
- uses: actions/checkout@v4
- uses: rojopolis/spellcheck-github-actions@v0
name: Spellcheck
with:
config_path: .github/workflows/spellcheck_config.yml
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
please look at: docs/_Getting-Started/02-contributing.md
18 changes: 6 additions & 12 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,8 @@ bootstrap:

# generate social links in footer
social_links:
twitter: 'https://twitter.com/jonaharagon'
github: 'https://github.com/jonaharagon'
#facebook: 'https://example.com/@jekyllrb'
#instagram: 'https://example.com/@jekyllrb'
#linkedin: 'https://example.com/@jekyllrb'
#google: 'https://example.com/@jekyllrb'
#youtube: 'https://example.com/@jekyllrb'
#twitch: 'https://example.com/@jekyllrb'
#telegram: 'https://example.com/@jekyllrb'
#whatsapp: 'https://example.com/@jekyllrb'
#discord: 'https://example.com/@jekyllrb'
#slack: 'https://example.com/@jekyllrb'
mastodon: 'https://nfdi.social/@NFDI4Microbiota'
github: 'https://github.com/NFDI4Microbiota'


# Build settings
Expand All @@ -53,6 +43,7 @@ plugins:
- jemoji
- jekyll-redirect-from
- jekyll-last-modified-at
- jekyll-scholar
markdown: Kramdown
collections_dir: docs
collections:
Expand Down Expand Up @@ -115,3 +106,6 @@ scholar:
# So enforcing a author-year style
style: apa
source: ./docs/_bibliography
bibtex_filters:
- latex
- markdown
110 changes: 49 additions & 61 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,17 @@

<title>The NFDI4Microbiota Knowledge Base</title>

<script src="{{ '/assets/js/color-modes.js' | relative_url }}"></script>

<link rel="stylesheet" href="{{ '/assets/css/docsearch.css' | relative_url }}">


<link href="{{ '/assets/css/bootstrap53..min.css' | relative_url }}" rel="stylesheet">


<link href="{{ '/assets/css/bootstrap53.min.css' | relative_url }}" rel="stylesheet">
<link href="{{ '/assets/css/docs53.css' | relative_url }}" rel="stylesheet">
<link rel="stylesheet" href="{{ '/assets/css/docsearch.css' | relative_url }}">

<link href="{{ '/assets/css/main.css' | relative_url }}" rel="stylesheet">

<script src="{{ '/assets/js/color-modes.js' | relative_url }}"></script>
<script defer src="{{ '/assets/js/usefathom.js' | relative_url }}" data-site="ITUSEYJG"></script>
<script src="{{ '/assets/js/boostrap53.bundle.min.js' | relative_url }}"></script>

Expand All @@ -31,53 +33,7 @@
integrity="sha256-H+K7U5CnXl1h5ywQfKtSj8PCmoN9aaq30gDh27Xc0jk="
crossorigin="anonymous"></script>
<script src="{{ '/assets/js/main.js' | relative_url }}"></script>
<script>
document.querySelectorAll('.btn-edit').forEach(btn => {
btn.addEventListener('click', event => {
const htmlSnippet = event.target.closest('.bd-code-snippet').querySelector('.bd-example').innerHTML


const classes = Array.from(event.target.closest('.bd-code-snippet').querySelector('.bd-example').classList).join(' ')

const jsSnippet = event.target.closest('.bd-code-snippet').querySelector('.btn-edit').getAttribute('data-sb-js-snippet')
StackBlitzSDK.openBootstrapSnippet(htmlSnippet, jsSnippet, classes)
})
})

StackBlitzSDK.openBootstrapSnippet = (htmlSnippet, jsSnippet, classes) => {
const markup = `<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https:\/\/cdn.jsdelivr.net\/npm\/[email protected]\/dist\/css\/bootstrap.min.css" rel="stylesheet">
<link href="https://getbootstrap.com/docs/5.3/assets/css/docs.css" rel="stylesheet">
<title>Bootstrap Example</title>
<${'script'} src="https:\/\/cdn.jsdelivr.net\/npm\/[email protected]\/dist\/js\/bootstrap.bundle.min.js"></${'script'}>
</head>
<body class="p-3 m-0 border-0 ${classes}">
<!-- Example Code -->
${htmlSnippet.replace(/^/gm, ' ')}
<!-- End Example Code -->
</body>
</html>`

const jsSnippetContent = jsSnippet ? '\/\/ NOTICE!!! Initially embedded in our docs this JavaScript\n\/\/ file contains elements that can help you create reproducible\n\/\/ use cases in StackBlitz for instance.\n\/\/ In a real project please adapt this content to your needs.\n\/\/ \u002b\u002b\u002b\u002b\u002b\u002b\u002b\u002b\u002b\u002b\u002b\u002b\u002b\u002b\u002b\u002b\u002b\u002b\u002b\u002b\u002b\u002b\u002b\u002b\u002b\u002b\u002b\u002b\u002b\u002b\u002b\u002b\u002b\u002b\u002b\u002b\u002b\u002b\u002b\u002b\u002b\u002b\n\n\/*!\n * JavaScript for Bootstrap\u0027s docs (https:\/\/getbootstrap.com\/)\n * Copyright 2011-2023 The Bootstrap Authors\n * Licensed under the Creative Commons Attribution 3.0 Unported License.\n * For details, see https:\/\/creativecommons.org\/licenses\/by\/3.0\/.\n *\/\n\n\/* global bootstrap: false *\/\n\n(() =\u003e {\n \u0027use strict\u0027\n\n \/\/ --------\n \/\/ Tooltips\n \/\/ --------\n \/\/ Instantiate all tooltips in a docs or StackBlitz\n document.querySelectorAll(\u0027[data-bs-toggle=\u0022tooltip\u0022]\u0027)\n .forEach(tooltip =\u003e {\n new bootstrap.Tooltip(tooltip)\n })\n\n \/\/ --------\n \/\/ Popovers\n \/\/ --------\n \/\/ Instantiate all popovers in docs or StackBlitz\n document.querySelectorAll(\u0027[data-bs-toggle=\u0022popover\u0022]\u0027)\n .forEach(popover =\u003e {\n new bootstrap.Popover(popover)\n })\n\n \/\/ -------------------------------\n \/\/ Toasts\n \/\/ -------------------------------\n \/\/ Used by \u0027Placement\u0027 example in docs or StackBlitz\n const toastPlacement = document.getElementById(\u0027toastPlacement\u0027)\n if (toastPlacement) {\n document.getElementById(\u0027selectToastPlacement\u0027).addEventListener(\u0027change\u0027, function () {\n if (!toastPlacement.dataset.originalClass) {\n toastPlacement.dataset.originalClass = toastPlacement.className\n }\n\n toastPlacement.className = \u0060${toastPlacement.dataset.originalClass} ${this.value}\u0060\n })\n }\n\n \/\/ Instantiate all toasts in docs pages only\n document.querySelectorAll(\u0027.bd-example .toast\u0027)\n .forEach(toastNode =\u003e {\n const toast = new bootstrap.Toast(toastNode, {\n autohide: false\n })\n\n toast.show()\n })\n\n \/\/ Instantiate all toasts in docs pages only\n \/\/ js-docs-start live-toast\n const toastTrigger = document.getElementById(\u0027liveToastBtn\u0027)\n const toastLiveExample = document.getElementById(\u0027liveToast\u0027)\n\n if (toastTrigger) {\n const toastBootstrap = bootstrap.Toast.getOrCreateInstance(toastLiveExample)\n toastTrigger.addEventListener(\u0027click\u0027, () =\u003e {\n toastBootstrap.show()\n })\n }\n \/\/ js-docs-end live-toast\n\n \/\/ -------------------------------\n \/\/ Alerts\n \/\/ -------------------------------\n \/\/ Used in \u0027Show live alert\u0027 example in docs or StackBlitz\n\n \/\/ js-docs-start live-alert\n const alertPlaceholder = document.getElementById(\u0027liveAlertPlaceholder\u0027)\n const appendAlert = (message, type) =\u003e {\n const wrapper = document.createElement(\u0027div\u0027)\n wrapper.innerHTML = [\n \u0060\u003cdiv class=\u0022alert alert-${type} alert-dismissible\u0022 role=\u0022alert\u0022\u003e\u0060,\n \u0060 \u003cdiv\u003e${message}\u003c\/div\u003e\u0060,\n \u0027 \u003cbutton type=\u0022button\u0022 class=\u0022btn-close\u0022 data-bs-dismiss=\u0022alert\u0022 aria-label=\u0022Close\u0022\u003e\u003c\/button\u003e\u0027,\n \u0027\u003c\/div\u003e\u0027\n ].join(\u0027\u0027)\n\n alertPlaceholder.append(wrapper)\n }\n\n const alertTrigger = document.getElementById(\u0027liveAlertBtn\u0027)\n if (alertTrigger) {\n alertTrigger.addEventListener(\u0027click\u0027, () =\u003e {\n appendAlert(\u0027Nice, you triggered this alert message!\u0027, \u0027success\u0027)\n })\n }\n \/\/ js-docs-end live-alert\n\n \/\/ --------\n \/\/ Carousels\n \/\/ --------\n \/\/ Instantiate all non-autoplaying carousels in docs or StackBlitz\n document.querySelectorAll(\u0027.carousel:not([data-bs-ride=\u0022carousel\u0022])\u0027)\n .forEach(carousel =\u003e {\n bootstrap.Carousel.getOrCreateInstance(carousel)\n })\n\n \/\/ -------------------------------\n \/\/ Checks \u0026 Radios\n \/\/ -------------------------------\n \/\/ Indeterminate checkbox example in docs and StackBlitz\n document.querySelectorAll(\u0027.bd-example-indeterminate [type=\u0022checkbox\u0022]\u0027)\n .forEach(checkbox =\u003e {\n if (checkbox.id.includes(\u0027Indeterminate\u0027)) {\n checkbox.indeterminate = true\n }\n })\n\n \/\/ -------------------------------\n \/\/ Links\n \/\/ -------------------------------\n \/\/ Disable empty links in docs examples only\n document.querySelectorAll(\u0027.bd-content [href=\u0022#\u0022]\u0027)\n .forEach(link =\u003e {\n link.addEventListener(\u0027click\u0027, event =\u003e {\n event.preventDefault()\n })\n })\n\n \/\/ -------------------------------\n \/\/ Modal\n \/\/ -------------------------------\n \/\/ Modal \u0027Varying modal content\u0027 example in docs and StackBlitz\n \/\/ js-docs-start varying-modal-content\n const exampleModal = document.getElementById(\u0027exampleModal\u0027)\n if (exampleModal) {\n exampleModal.addEventListener(\u0027show.bs.modal\u0027, event =\u003e {\n \/\/ Button that triggered the modal\n const button = event.relatedTarget\n \/\/ Extract info from data-bs-* attributes\n const recipient = button.getAttribute(\u0027data-bs-whatever\u0027)\n \/\/ If necessary, you could initiate an Ajax request here\n \/\/ and then do the updating in a callback.\n\n \/\/ Update the modal\u0027s content.\n const modalTitle = exampleModal.querySelector(\u0027.modal-title\u0027)\n const modalBodyInput = exampleModal.querySelector(\u0027.modal-body input\u0027)\n\n modalTitle.textContent = \u0060New message to ${recipient}\u0060\n modalBodyInput.value = recipient\n })\n }\n \/\/ js-docs-end varying-modal-content\n\n \/\/ -------------------------------\n \/\/ Offcanvas\n \/\/ -------------------------------\n \/\/ \u0027Offcanvas components\u0027 example in docs only\n const myOffcanvas = document.querySelectorAll(\u0027.bd-example-offcanvas .offcanvas\u0027)\n if (myOffcanvas) {\n myOffcanvas.forEach(offcanvas =\u003e {\n offcanvas.addEventListener(\u0027show.bs.offcanvas\u0027, event =\u003e {\n event.preventDefault()\n }, false)\n })\n }\n})()\n' : null
const project = {
files: {
'index.html': markup,
'index.js': jsSnippetContent
},
title: 'Bootstrap Example',
description: `Official example from ${window.location.href}`,
template: jsSnippet ? 'javascript' : 'html',
tags: ['bootstrap']
}

StackBlitzSDK.openProject(project, {openFile: 'index.html'})
}
</script>

<script>
window.ga = window.ga || function () {
(ga.q = ga.q || []).push(arguments)
Expand All @@ -104,6 +60,29 @@
})();
</script>
<!-- End Matomo Code -->



<!-- Modal -->
<div class="modal fade" id="citationModal" tabindex="-1" aria-labelledby="citationModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="citationModalLabel">Citation for this page</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body ">
<p> Research Data Infrastructure for Microbiota Research (NFDI4Microbiota). ({{
page.last_modified_at | date: '%Y, %B %d'}}): <i> {{ page.title }}</i>, NFDI4Microbiota Knowledge Base,<a href="https://knowledgebase.nfdi4microbiota.de{{ page.url }}.html"> https://knowledgebase.nfdi4microbiota.de{{ page.url }}.html </a></p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>


</head>

<body data-bs-spy="scroll" data-bs-target="#TableOfContents">
Expand Down Expand Up @@ -243,17 +222,29 @@
{% endif %}
<!-- Heading of the page -->
<div class="bd-intro pt-2 ps-lg-2">
<h1 class="bd-title mb-0 text-center" id="content">{{ page.title }}</h1>
<br>
<hr>
<div class="d-md-flex flex-md-row-reverse align-items-center justify-content-between">
<div class="mb-3 mb-md-0 d-flex text-nowrap"><a class="btn btn-sm btn-bd-light rounded-2"
href="https://github.com/NFDI4Microbiota/nfdi4microbiota-knowledge-base/blob/main/{{ git_url }}.md"
title="View and edit this file on GitHub"
target="_blank" rel="noopener">
View on GitHub
</a>
<div class="mb-3 mb-md-0 d-flex "> <!-- flex-column justify-content-center-->
<div class="mb-3 mb-md-0 d-flex text-nowrap"><a class="btn btn-sm btn-bd-light rounded-2"
href="https://github.com/NFDI4Microbiota/nfdi4microbiota-knowledge-base/blob/main/{{ git_url }}.md"
title="View and edit this file on GitHub" target="_blank" rel="noopener">
View on GitHub
</a>
</div>
<br>

<div class="mb-3 mb-md-0 d-flex text-nowrap"><button type="button" class="btn btn-sm btn-bd-light rounded-2"
data-bs-toggle="modal" data-bs-target="#citationModal">
How to cite us
</button>
</div>
</div>
<h1 class="bd-title mb-0" id="content">{{ page.title }}</h1>
<h6><small class="text-muted">Page last modified on: {{ page.last_modified_at | date: '%Y, %B %d' }}</small></h6>
</div>
</div>
<br>

<!-- Div for navigation to the topic inside the current page -->
<div class="bd-toc mt-3 mb-5 my-lg-0 mb-lg-5 px-sm-1 text-body-secondary">
Expand Down Expand Up @@ -296,9 +287,6 @@ <h1 class="bd-title mb-0" id="content">{{ page.title }}</h1>
<!-- Check if page is under construction -->
{% if page.empty %}
<p>This page is currently empty. Please consider contributing! </p>
{% else %}
<h2>Citation</h2>
<p>National Research Data Infrastructure for Microbiota Research (NFDI4Microbiota). ({{ page.last_modified_at | date: '%Y, %B %d'}}). {{ page.title }}. NFDI4Microbiota Knowledge Base. </p>
{% endif %}

</div>
Expand Down
40 changes: 40 additions & 0 deletions _plugins/markdown.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@

# See https://github.com/inukshuk/jekyll-scholar/issues/30
require 'uri'

# Updated URL_PATTERN to handle full DOI URLs and simple DOI patterns
URL_PATTERN = Regexp.compile([
'\\\\href\\\\{([^\\\\}]+)\\\\}\\\\{([^\\\\}]+)\\\\}', # For LaTeX href patterns
URI.regexp(['http', 'https']), # For general URLs
# DOI patterns to match "10." followed by a series of characters,
# including full URLs like "https://doi.org/" or "http://dx.doi.org/"
'(https?:\/\/(doi\.org|dx\.doi\.org)\/10\.[0-9]{4,9}\/[-._;()\/:A-Z0-9]+)',
'(10\.[0-9]{4,9}\/[-._;()\/:A-Z0-9]+)'
].join('|'), Regexp::IGNORECASE)

module Jekyll
class Scholar
class Markdown < BibTeX::Filter
def apply(value)
value.to_s.gsub(URL_PATTERN) do |match|
if $1 # LaTeX href pattern
"[#{$2}](#{$1})"
"<a href=\"#{$1}\">#{$2}</a>"
elsif match =~ /https?:\/\/(doi\.org|dx\.doi\.org)\/(10\.[0-9]{4,9}\/[-._;()\/:A-Z0-9]+)$/i
# Handle full DOI URLs
doi_id = $2
"<a href=\"https://doi.org/#{doi_id}\">#{doi_id}</a>"
elsif match =~ /.*(10\.[0-9]{4,9}\/[-._;()\/:A-Z0-9]+)$/i
# Handle simple DOI patterns
doi = $&
"<a href=\"https://doi.org/#{doi}\">#{doi}</a>"
else
# Handle general URLs
#"test[#{match}](#{match})"
"<a href=\"#{match}\">#{match}</a>"
end
end
end
end
end
end

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 35094ed

Please sign in to comment.