Commit 9c832685 authored by Laurent Heirendt's avatar Laurent Heirendt
Browse files

Merge branch 'develop' into 'master'

[release] Regular merge of develop

See merge request !259
parents 515b3b7f 5186ea3c
Pipeline #44478 passed with stages
in 1 minute and 26 seconds
<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>
# 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
......
......@@ -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 %}
};
......
......@@ -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`
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment