diff --git a/.ci/.autoRedirect b/.ci/.autoRedirect deleted file mode 100644 index aaab5cbe43cf061284ac5526b040623fbe34af99..0000000000000000000000000000000000000000 --- a/.ci/.autoRedirect +++ /dev/null @@ -1,96 +0,0 @@ -<html> - <head> - <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> - <script type="text/javascript"> - function UrlExists(url, cb){ - jQuery.ajax({ - url: url, - dataType: 'text', - type: 'GET', - cache: false, - complete: function(xhr){ - if(typeof cb === 'function') - cb.apply(this, [xhr.status]); - } - }); - } - - function GetShortcutDestination() { - var s = window.location.href; - var pathArray = s.split('?'); - - // Cut the query if it exists - if (pathArray.length > 1) { - return pathArray[1]; - } else { - return ''; - } - } - - function RedirectTo(newLocation) { - document.location.replace(newLocation); - } - - // Pick the shortcut link destination from URL, like: `category:subcategory:card-name` - var sub = GetShortcutDestination(); - - // Define URLs - var internalPortalURL = 'https://r3-core.pages.uni.lu/howto-cards-internal'; - var externalPortalURL = 'https://r3.pages.uni.lu/howto-cards'; - - // First, check whether internal pages are accessible... - var internalIndexURL = internalPortalURL + '/index.html'; - UrlExists(internalIndexURL, function(status){ - if(status === 200){ - // If the internal pages are accessible, try to redirect into correct page - if (sub.length > 0) { - var internalCardURL = internalPortalURL + '/stable/internal/cards/' + sub; - UrlExists(internalCardURL, function(status){ - if (status == 200) { // The sub-card is internal, and is accessible - RedirectTo(internalCardURL); - } else { - UrlExists(internalPortalURL + '/stable/external/cards/' + sub, function(status){ - if (status == 200) { // if sub-card is internal in the external directory and exists - RedirectTo(internalPortalURL + '/stable/external/cards/' + sub); - } else { - RedirectTo(internalPortalURL + '/stable/404.html'); - } - }); - } - }); - } else { - // The user did not request specific card, redirect him just to the stable index - var internalPortalIndexURL = internalPortalURL + '/stable'; - var internalPortal404URL = internalPortalURL + '/stable/404.html'; - UrlExists(internalPortalIndexURL, function(status){ - if (status == 200) { // if page is accessible - RedirectTo(internalPortalIndexURL); - } else { - RedirectTo(internalPortal404URL); - } - }); - } - } else { - // The internal pages are not accessible, therefore the user is redirected into correct external page - if (sub.length > 0) { - sub = 'external/cards/' + sub; - } - var externalPortalCardURL = externalPortalURL + '/stable/' + sub; - var externalPortal404URL = externalPortalURL + '/stable/404.html'; - UrlExists(externalPortalURL + '/stable/' + sub, function(status){ - if (status == 200) { // if sub-card is internal and exists - RedirectTo(externalPortalCardURL); - } else { - RedirectTo(externalPortal404URL); - } - }); - } - }); - </script> - </head> - <body> - <p> - Please follow to <a href="https://r3.pages.uni.lu/howto-cards/stable">https://r3.pages.uni.lu/howto-cards/stable</a>! - </p> - </body> -</html> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d8a5591f69fa0a2bd59d0c33180229d47eca3e47..3785c23dfe3d3d2cc69f3a842a34ed64b9256d05 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,5 @@ # In case something goes horribly wrong, you can fall back to `image: ruby:2.5` -image: git-r3lab.uni.lu:4567/r3/docker/jekyll-lcsb:1.6 +image: $CI_REGISTRY/r3/docker/jekyll-lcsb:1.6 stages: - prepare diff --git a/_includes/search.html b/_includes/search.html index 4ee3698fee124689292ed3cdbf9456628dae87fe..3f8984e6a32c7270bc9fe063112a0d7079ec08cc 100644 --- a/_includes/search.html +++ b/_includes/search.html @@ -54,7 +54,7 @@ window.content = { {% for card in the_cards %} "{{ card.url | slugify }}": { "title": "{{ card.shortcut | xml_escape }}", - "content": {{ card.content | strip_html | strip_newlines | truncate: 150 | jsonify }}, + "content": {{ card.content | markdownify | strip_html | strip_newlines | truncate: 150 | jsonify }}, "url": "{{ card.url | xml_escape | relative_url }}" } {% unless forloop.last %},{% endunless %} {% endfor %} }; diff --git a/external/contribute/mirror-fork/mirror-fork.md b/external/contribute/mirror-fork/mirror-fork.md index 7adaedc490864fc5d0dc5137f34a0e65a64aa554..a65962493bd52114d4c6b307902cfdd06b957a75 100644 --- a/external/contribute/mirror-fork/mirror-fork.md +++ b/external/contribute/mirror-fork/mirror-fork.md @@ -11,20 +11,21 @@ redirect_from: In order to keep your fork up-to-date automatically with the main (also called `upstream`) repository, you should follow the follow simple steps. -1. Go to `Settings > Repository` +1. Go to `Settings > Repository` (bottom left of the screen) 2. Expand the section on `Mirroring repositories` -3. In the field `Git repository URL`, enter the SSH clone address from the main repository. In case of this repository, the address is `ssh://git@git-r3lab-server.uni.lu:8022/R3/howto-cards.git` +3. In the field `Git repository URL`, enter the SSH clone address from the main repository. In case of this repository, the address is `ssh://git@gitlab.lcsb.uni.lu:8022/R3/howto-cards.git` 4. Select `Mirror Direction` as `Pull` -5. `Authentication method` should be selected as `SSH public key` -6. Then, click on the green button `Mirror repository` +5. Click on `Detect Host Keys` +6. `Authentication method` should be selected as `SSH public key` +7. Then, click on the blue button `Mirror repository` -You will see an entry in the table below the green button. Often, there is an error appearing. Now, in order to be able to perform the mirror, you need to set the SSH key. +You will see an entry in the table below the blue button. Often, there is an error appearing. Now, in order to be able to perform the mirror, you need to set the SSH key. 1. Copy the SSH public key by clicking on the copy button (next to the sync button) located next to the red paper bin. <img src="img/copy-ssh-key.png" height="80"> -2. Then, browse to your profile picture (top right) and click on `Settings` +2. Then, browse to your profile picture (top right) and click on `Preferences` 3. On the left of the page, click on `SSH keys` 4. Paste the key (using CTRL+V or CMD+V) into the SSH field 5. Click on `Add key`