...
 
Commits (7)
......@@ -13,6 +13,8 @@ build:
- apk add g++ hugo
- yarn install && yarn build
- hugo
- npx clean-css-cli -o public/prism.css public/prism.css
- npx clean-css-cli -o public/fonts.css public/fonts.css
artifacts:
paths:
- public
......@@ -58,11 +60,10 @@ pages:
image: registry.gitlab.com/pages/hugo:latest
dependencies: [build]
script:
- hugo
- gzip -k -6 $(find public -type f)
artifacts:
paths:
- public
only:
- master
......@@ -2,13 +2,17 @@ FROM node:alpine
COPY . /app
WORKDIR /app
RUN yarn
RUN yarn && yarn build
RUN npx clean-css-cli -o themes/ybs/static/prism.css themes/ybs/static/prism.css
RUN npx clean-css-cli -o themes/ybs/static/fonts.css themes/ybs/static/fonts.css
FROM alpine
COPY . /app
COPY --from=0 /app/themes/ybs/static /app/themes/ybs/static
RUN apk update && apk add hugo
RUN cd /app && hugo
WORKDIR /app
RUN hugo
RUN gzip -k -6 $(find public -type f)
FROM nginx:alpine
COPY --from=1 /app/public /usr/share/nginx/html
......@@ -10,6 +10,7 @@ theme = "ybs"
metaDataFormat = "yaml"
pygmentsUseClasses = true
pygmentCodeFences = true
enableRobotsTXT = "true"
#disqusShortname = "XXX"
#googleAnalytics = "XXX"
......@@ -22,6 +23,7 @@ pygmentCodeFences = true
rss = true
comments = true
# gcse = "012345678901234567890:abcdefghijk" # Get your code from google.com/cse. Make sure to go to "Look and Feel" and change Layout to "Full Width" and Theme to "Classic"
description ="Yourlabs blog with posts about Continuous integration, Developpement, DevOps, Infra, Security, Automation"
#[[Params.bigimg]]
# src = "img/triangle.jpg"
......@@ -58,7 +60,7 @@ weight = 0
weight = 2
[[Languages.en.menu.main]]
name = "Securité"
name = "Security"
url = "secops/"
weight = 3
......@@ -101,3 +103,4 @@ weight = 1
name = "Tags"
url = "fr/tags/"
weight = 4
---
title: Cyber Sécurité
title: Cyber Security
subtitle: Pentest over network
comments: false
---
......
<!DOCTYPE html>
<html lang="{{ .Lang | default .Site.Params.DefaultContentLanguage }}">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>{{ .Title }}</title>
{{ with .Site.Params.description }}<meta name="description" content="{{ . }}">{{ end }}
{{ with .Site.Params.author }}<meta name="author" content="{{ . }}">{{ end }}
<link rel="stylesheet" href="{{ "bundle.css" | relURL }}">
<link rel="stylesheet" href="{{ "fonts.css" | relURL }}">
<link rel="stylesheet" href="{{ "prism.css" | relURL }}">
{{ with .OutputFormats.Get "RSS" -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s">` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }}
{{- end }}
</head>
<body>
{{ partial "header" . }}
<div>
<p>Sorry page not found</p>
{{ partial "footer" . }}
<script src="{{ "bundle.js" | relURL }}"></script>
<script src="{{ "prism.js" | relURL }}"></script>
<script>
var links = document.getElementsByTagName("a");
for (var i = 0, linksLength = links.length; i < linksLength; i++) {
if (links[i].hostname != window.location.hostname) {
links[i].target = '_blank';
}
}
</script>
</body>
</html>
......@@ -9,6 +9,7 @@
{{ with .Site.Params.author }}<meta name="author" content="{{ . }}">{{ end }}
<link rel="stylesheet" href="{{ "bundle.css" | relURL }}">
<link rel="stylesheet" href="{{ "fonts.css" | relURL }}">
<link rel="icon" href="/favicon.ico" >
<link rel="stylesheet" href="{{ "prism.css" | relURL }}">
{{ with .OutputFormats.Get "RSS" -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s">` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }}
......
......@@ -6,7 +6,6 @@
{{ with .Content }}<div>{{ . }}</div>{{ end }}
</div>
{{ end }}
{{ range .Pages }}
{{ .Render "summary" }}
{{ end }}
......
......@@ -9,6 +9,7 @@
{{ with .Site.Params.author }}<meta name="author" content="{{ . }}">{{ end }}
<link rel="stylesheet" href="{{ "bundle.css" | relURL }}">
<link rel="stylesheet" href="{{ "fonts.css" | relURL }}">
<link rel="icon" href="favicon.ico">
<link rel="stylesheet" href="{{ "prism.css" | relURL }}">
{{ with .OutputFormats.Get "RSS" -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s">` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }}
......
{{ define "main" }}
<main>
{{ $paginator := .Paginate (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) }}
<h1>Posts</h1>
{{ range $paginator.Pages }}
{{ .Render "summary" }}
{{ end }}
......
User-agent: *
Disallow:
......@@ -811,7 +811,7 @@ class-utils@^0.3.5:
isobject "^3.0.0"
static-extend "^0.1.1"
clean-css@4.2.x:
clean-css@4.2.x, clean-css@^4.2.3:
version "4.2.3"
resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.2.3.tgz#507b5de7d97b48ee53d84adb0160ff6216380f78"
integrity sha512-VcMWDN54ZN/DS+g58HYL5/n4Zrqe8vHJpGA8KdgUXFU4fuP/aHNw8eld9SyEIyabIMJX/0RaY/fplOo5hYLSFA==
......