59 Commits
Author SHA1 Message Date
gregandev 2ecfbb8013 pousche 2022-04-06 18:06:55 +02:00
gregandev 8594e6215c pousche 2022-04-06 16:15:35 +02:00
gregandev 943f665bd7 pousche 2022-04-06 15:10:03 +02:00
gregandev ade331a604 yo 2022-04-05 20:05:42 +02:00
gregandev 24e5e49acc test ouroboros 2022-04-05 18:21:43 +02:00
gregandev cb5011571f test CI/CD 2022-04-05 16:52:13 +02:00
gregandev bce5d3656d test CI/CD 2022-04-05 16:39:27 +02:00
gregandev bbaba416ab Mettre à jour content/page/about.md 2022-01-26 07:33:29 +00:00
gregandev 83905b3fac ajout tests 2021-07-31 12:14:36 +02:00
gregandev f004d96076 ajout tests 2021-07-31 12:13:38 +02:00
gregandev 640417cc35 clean up 2021-07-30 23:25:25 +02:00
gregandev c11be64b2e modif contenus 2021-07-30 23:21:45 +02:00
gregandev 226d962003 Update 2021-05-01-fourth-post.md 2021-07-30 20:45:48 +00:00
gregandev d6c0f37f00 Update 2021-05-01-fourth-post.md 2021-07-30 20:44:44 +00:00
gregandev 23a6b7db8d Delete .gitlab-ci.yml 2021-07-30 20:42:41 +00:00
gregandev 3e35c6c4a8 Delete headers 2021-07-30 20:42:15 +00:00
gregandev fb628e63f9 Delete jenkinsTest.sh 2021-07-30 20:41:21 +00:00
gregandev ea69ea079e modif post contenus 2021-07-30 22:35:32 +02:00
gregandev 49636f577e modif post contenus 2021-07-30 22:25:44 +02:00
gregandev aa17e969cf maj about 2021-07-30 09:47:05 +02:00
gregandev 929f11eab2 maj comment 2021-07-30 08:31:58 +02:00
gregandev a1fa78fbab ajout TEST 2021-07-29 19:31:01 +02:00
gregandev 244c09d80a ajout tests 2021-07-29 18:32:12 +02:00
gregandev 3ff75fef47 ajout tests 2021-07-29 18:23:09 +02:00
gregandev 65dcba5549 ajout tests 2021-07-29 18:04:59 +02:00
gregandev f162e27efd ajout tests 2021-07-29 18:03:35 +02:00
gregandev e17da12271 ajout tests 2021-07-29 18:00:45 +02:00
gregandev 4f6bea2002 ajout tests 2021-07-29 17:59:38 +02:00
gregandev f123e58a0c ajout tests 2021-07-29 17:57:33 +02:00
gregandev 530c57df7a ajout tests 2021-07-29 17:47:53 +02:00
gregandev 2b77e1e931 ajout tests 2021-07-29 17:39:34 +02:00
gregandev 03ace1def8 ajout tests 2021-07-29 17:32:31 +02:00
gregandev 367205b340 ajout tests 2021-07-29 17:28:14 +02:00
gregandev 9f7c5f6b3c ajout tests 2021-07-29 17:26:41 +02:00
gregandev 837e8c0d39 ajout tests 2021-07-29 17:17:19 +02:00
gregandev e782bcfc52 ajout tests 2021-07-29 17:16:01 +02:00
gregandev b0a8e54c1d ajout tests 2021-07-29 17:12:45 +02:00
gregandev 5dbfc630ea ajout tests 2021-07-29 17:08:51 +02:00
gregandev e8c31e203b ajout tests 2021-07-29 17:04:12 +02:00
gregandev 9828f370be ajout tests 2021-07-29 16:59:23 +02:00
gregandev 4945517810 ajout tests 2021-07-29 16:52:43 +02:00
gregandev 549e3aae2a ajout tests 2021-07-29 16:51:11 +02:00
gregandev 8e6010da13 ajout tests 2021-07-29 16:48:05 +02:00
gregandev c7535f4579 ajout tests 2021-07-29 16:46:25 +02:00
gregandev bcd6960ad3 just for kicks 2021-07-29 10:51:47 +02:00
gregandev f351f8df41 test 2021-07-28 14:50:14 +02:00
gregandev aee66aaa44 pipeline hugo 2021-07-28 14:08:48 +02:00
gregandev dd947e18e9 pipeline hugo 2021-07-28 14:07:29 +02:00
gregandev f7395a620f test webhook 2021-07-28 13:47:43 +02:00
gregandev 84ef437572 test webhook 2021-07-28 13:44:17 +02:00
gregandev 4214da3f71 maj Dockerfile nginx.conf path 2021-07-28 13:40:17 +02:00
gregandev e6dc0e5a5b test pipeline 2021-07-28 13:22:48 +02:00
gregandev 3e8d419887 test pipeline 2021-07-28 12:54:27 +02:00
gregandev 3632c9fa65 test ipeline 2021-07-28 12:51:48 +02:00
gregandev 1d6741e2a0 test pipeline 2021-07-28 11:55:52 +02:00
gregandev d5b72a8970 maj readme 2021-07-28 11:06:23 +02:00
gregandev e5f43e6051 maj readme 2021-07-24 11:26:08 +02:00
gregandev 71506a71f7 maj readme 2021-07-24 10:47:16 +02:00
gregandev c9cf197d56 hugo docker & docker-compose ok 2021-07-24 10:36:26 +02:00
15 changed files with 235 additions and 109 deletions
-20
View File
@@ -1,20 +0,0 @@
# All available Hugo versions are listed here: https://gitlab.com/pages/hugo/container_registry
image: registry.gitlab.com/pages/hugo:latest
variables:
GIT_SUBMODULE_STRATEGY: recursive
test:
script:
- hugo
except:
- master
pages:
script:
- hugo
artifacts:
paths:
- public
only:
- master
+6
View File
@@ -0,0 +1,6 @@
FROM nginx:alpine
COPY ./public /var/www/html
COPY ./nginx-docker/nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
+51 -46
View File
@@ -1,64 +1,69 @@
# HUGO SITE AVEC DOCKER
![Build Status](https://gitlab.com/pages/hugo/badges/master/build.svg) Cette branche à pour but de conteneurisé un site HUGO compilé avec un server NGINX.
La configuration pour le NGINX reverse proxy en front se trouve dans le dossir nginx-proxy.
--- ## UTILISATION:
Example [Hugo] website using GitLab Pages. Pour l'utiliser avec un autre site Hugo, copier simplement la Dockerfile ou le docker-compose.yml
ainsi que les dossiers nginx-docker et nginx-proxy à la racine du projet Hugo (à côté du config.toml)
et éxécuter la commande pour construire le site:
Learn more about GitLab Pages at https://pages.gitlab.io and the official ```bash
documentation https://docs.gitlab.com/ce/user/project/pages/. hugo
```
--- Un dossier public s'est créé avec les fichiers statiques du site, il faut maintenant configurer
les Nginx (le proxy et celui dans l'image Docker:
## GitLab CI ## CONFIGURATION:
This project's static Pages are built by [GitLab CI][ci], following the steps Editer le fichier de configuration
defined in [`.gitlab-ci.yml`](.gitlab-ci.yml). ```bash
nano nginx-proxy/nginx.conf
```
/\ Attention, le nom de domaine (ici exemple.com) est à configuré dans le proxy NGINX !
Une fois tout bien renseigné
## Building locally Redémarrer NGINX:
To work locally with this project, you'll have to follow the steps below: ```bash
sudo systemctl restart nginx
```
1. Fork, clone or download this project ## DEMARRER L'IMAGE:
1. [Install][] Hugo
1. Preview your project: `hugo server`
1. Add content
1. Generate the website: `hugo` (optional)
Read more at Hugo's [documentation][]. ### VIA DOCKER
### Preview your site ```bash
docker build -t hugo/hugo-site .
docker run -d -p 6666:80 --name hugo-site hugo/hugo-site
```
If you clone or download this project to your local computer and run `hugo server`, ### VIA DOCKER-COMPOSE
your site can be accessed under `localhost:1313/hugo/`.
The theme used is adapted from http://themes.gohugo.io/beautifulhugo/. ```bash
docker-compose up -d
```
## GitLab User or Group Pages ### HTTPS:
To use this project as your user/group website, you will need one additional Via Certbot:
step: just rename your project to `namespace.gitlab.io`, where `namespace` is ```bash
your `username` or `groupname`. This can be done by navigating to your sudo apt install certbot -y
project's **Settings**. sudo certbot certonly -d example.com
```
You'll need to configure your site too: change this line Une fois le certificat obtenu, décommenter les 3 lignes concernant le SSL en vérifiant
in your `config.toml`, from `"https://pages.gitlab.io/hugo/"` to `baseurl = "https://namespace.gitlab.io"`. le nom des certificats en fonction du nom de domaine:
Proceed equally if you are using a [custom domain][post]: `baseurl = "http(s)://example.com"`. ```
#ssl on;
#ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
#ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
```
Créer une redirection vers le HTTPS dans le bloc server HTTP:
Read more about [user/group Pages][userpages] and [project Pages][projpages]. ```
return 301 https://$host$request_uri;
## Troubleshooting ```
1. CSS is missing! That means two things:
Either that you have wrongly set up the CSS URL in your templates, or
your static generator has a configuration option that needs to be explicitly
set in order to serve static assets under a relative URL.
[ci]: https://about.gitlab.com/gitlab-ci/
[hugo]: https://gohugo.io
[install]: https://gohugo.io/overview/installing/
[documentation]: https://gohugo.io/overview/introduction/
[userpages]: http://doc.gitlab.com/ee/pages/README.html#user-or-group-pages
[projpages]: http://doc.gitlab.com/ee/pages/README.html#project-pages
[post]: https://about.gitlab.com/2016/04/07/gitlab-pages-setup/#custom-domains
+1 -1
View File
@@ -1,5 +1,5 @@
# Configuration de l'adresse, titre (onglet) et des chemins vers les contenus # Configuration de l'adresse, titre (onglet) et des chemins vers les contenus
baseurl = "https://greglebreton.gitlab.io/hugo-site/" baseurl = "https://hugo.gregandev.fr"
contentdir = "content" contentdir = "content"
layoutdir = "layouts" layoutdir = "layouts"
publishdir = "public" publishdir = "public"
+3 -2
View File
@@ -1,3 +1,5 @@
[comment]: <> (PIPELINE)
## Contenu de la page d'accueil ## Contenu de la page d'accueil
<!-- Ajout image --> <!-- Ajout image -->
@@ -14,5 +16,4 @@ Edit `/content/_index.md` to change what appears here. Delete `/content/_index.m
if you don't want any content here. if you don't want any content here.
Head over to the [GitLab project](https://gitlab.com/pages/hugo) to get started. Head over to the [GitLab project](https://gitlab.com/pages/hugo) to get started.
<!-- test ouroboros ou watchtower -->
Bienvenu sinon :)
+7 -3
View File
@@ -12,8 +12,12 @@ Mon nom est Greg Lebreton, et voici mes compétences:
- C# - C#
- PHP - PHP
- Java - Java
- bla bla bla - Python
- etc - Bash
- Docker
- Ansible
- Jenkins
- Kubernetes
- ... - ...
Et bien plus encore. Et bien plus encore.
@@ -36,4 +40,4 @@ Juste le meilleure film : [mon lien](https://www.youtube.com/watch?v=W8sop56DBUs
### texte ### texte
juste blabla, et bla ! juste blabla, et bla !
+26 -5
View File
@@ -1,11 +1,32 @@
--- ---
title: Test 1 Streets of rage ! title: Page Test Contenu
date: 2021-05-02 date: 2021-05-02
tags: ["Street of rage", "hugo"] tags: ["test", "texte", "Rio de Janeiro"]
--- ---
Test de post tout simple avec du contenu : ## Du texte:
{{< youtube ZSWzPI4BqvA >}} Rio de Janeiro (/ˈʁi.u d(ʒi) ʒɐˈnejɾu/2), souvent désignée simplement sous le nom de Rio, et archaïquement Riogénaire en français, est la deuxième plus grande ville du Brésil après São Paulo. Située dans le Sud-Est du pays, elle est la capitale de l'État de Rio de Janeiro.
![c'est une image](/images/hugo-logo.png) Avec ses 6,1 millions d'habitants intra-muros (communément appelés Cariocas, la variante Carioques existant aussi en français) et 12,62 millions dans l'aire urbaine, Rio de Janeiro est l'une des métropoles les plus importantes du continent américain.
Elle est mondialement connue pour son carnaval, ses plages (Copacabana, Leblon et Ipanema) ainsi que sa statue du Christ Rédempteur au sommet du Corcovado.
(extrait Wikipédia)
------
## Des tableaux:
| Tableau | Article | Prix |
| ------------- |:-------------:| -----:|
| 1 | Chapeau | €25 |
| 2 | Echarpe | €15 |
| 3 | Malabar | €0,1 |
------
## Simple lien:
[Je suis un lien!](https://gregandev.fr)
------
+36 -10
View File
@@ -1,18 +1,44 @@
--- ---
title: test pleins de photos ! title: post test de divers contenus !
date: 2021-05-02 date: 2021-05-02
tags: ["photos", "test"] tags: ["test", "contenu", "photos", "gif", "code"]
--- ---
légende 1
![](/images/test/1.png) ## Image via link:
![](https://pbs.twimg.com/media/DGKRMoPXcAIyA8y.jpg)
commentaire ... commentaire ...
légende 2 ------
![](/images/test/2.jpg)
légende 3 ## Image via url locale (/static):
![](/images/test/2.jpg) ![](/images/test/1.png)
l"gende 4 ------
![](/images/test/1.png)
## Gif via link:
![](https://media-exp3.licdn.com/dms/image/C4D22AQHEESwqVLITmQ/feedshare-shrink_1280/0/1559729958380?e=1629331200&v=beta&t=5t3x2ObhIXjQU59nVvAarB-0f1mLpP55Z0C0ytli7DQ)
------
## Vidéo Youtube:
{{< youtube ZSWzPI4BqvA >}}
------
## Du code:
```javascript
var s = "JavaScript syntax highlighting";
alert(s);
```
```python
s = "Python syntax highlighting"
print s
```
```bash
cd /ici/etla
echo "Salut le monde!"
```
-12
View File
@@ -1,12 +0,0 @@
---
title: Test post deux!
date: 2021-05-01
tags: ["atari"]
---
Bla BLa Bla, la nouvelle console Atari !
<!-- ![c'est une image](/images/hugo-logo.png) -->
{{< youtube LStkGeUmR_0 >}}
-9
View File
@@ -1,9 +0,0 @@
---
title: Test post troisième!
date: 2021-05-02
tags: ["windows", "post"]
---
Test du troisième post :
{{< youtube HrPRtYvCvZI >}}
+10
View File
@@ -0,0 +1,10 @@
version: '3.9'
services:
hugo:
image: nginx:alpine
container_name: hugo-site
volumes:
- ./nginx-docker:/etc/nginx/conf.d
- ./public:/var/www/html
ports:
- 6060:80
+23
View File
@@ -0,0 +1,23 @@
# config pour le nginx dans le caontainer
server {
listen 80;
listen [::]:80;
server_name localhost;
location / {
root /var/www/html;
index index.html index.htm;
}
error_page 404 /404.html; # Here and below is 404 error handling docs tried to describe
location = /404.html {
root /var/www/html;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /var/www/html;
}
}
+59
View File
@@ -0,0 +1,59 @@
# HTTP
server {
listen 80;
listen [::]:80;
server_name example.com;
client_max_body_size 64M;
# Redirection HTTP -> HTTPS
#return 301 https://$host$request_uri;
location / {
proxy_buffering off;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://127.0.0.1:6666;
}
}
# Nécessaire pour les redirections internes à Hugo
location /feed {
return 302 https://example.com/index.xml;
}
# HTTPS
server{
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name example.com;
location / {
proxy_buffering off;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://127.0.0.1:6666;
}
# Nécessaire pour les redirections internes à Hugo
location /feed {
return 302 https://example.com/index.xml;
}
#ssl on;
#ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
#ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
access_log /var/log/nginx/hugo_access.log;
error_log /var/log/nginx/hugo_error.log;
}
Executable
+12
View File
@@ -0,0 +1,12 @@
#!/bin/bash
echo "TEST WEB"
url=http://localhost:9999
curl ${url} -I -o headers -s
reponse=$(cat headers | head -n 1 | cut '-d ' '-f2')
if [ $reponse == "200" ]
then
echo "SUCCESS"
exit 0
fi
+1 -1
View File
@@ -2,7 +2,7 @@
- id: dateFormat - id: dateFormat
translation: "2 Janvier, 2006" translation: "2 Janvier, 2006"
- id: postedOnDate - id: postedOnDate
#translation: "Posté le {{ .Count }}" translation: "Posté le "
- id: translationsLabel - id: translationsLabel
translation: "Autres langues: " translation: "Autres langues: "
- id: translationsSeparator - id: translationsSeparator