Commit 2cc1a12a authored by Edprado4's avatar Edprado4

Fix issue #684

- Created linter for category checking (Only for blog articles atm)
- Created a categories list in both languages with the current validate categories in blog articles
parent 7866b4c3
......@@ -24,6 +24,7 @@ checks:
- if curl --fail -Lo artifacts.zip --header Private-Token:$DOCKER_PASSWD https://gitlab.com/api/v4/projects/$CI_PROJECT_ID/jobs/artifacts/$CI_COMMIT_REF_NAME/download?job=$CI_JOB_NAME; then unzip artifacts.zip && rm artifacts.zip; else echo "There are no artifacts"; fi
- ./check-changed.sh
- ./check-all.sh
- ./check-articles.sh
- ./sass-lint.sh
- pybabel compile --directory theme/2014/translations/ --domain messages
- for FILE in $(find . -iname '*.adoc'); do sed -i 's/^include::/include::\/builds\/fluidsignal/g' $FILE; done
......
ataques
certificaciones
filosofía
identidad
opiniones
retos
aix
aspnet
apache
csharp
cobol
glassfish
hacking
html
java
javascript
linux
php
programacion
python
redhat
scala
windows
yii
\ No newline at end of file
challenges
documentation
identity
opinions
philosophy
techniques
aix
apache
aspnet
csharp
cobol
glassfish
hacking
html
java
javascript
linux
php
programming
python
redhat
scala
windows
yii
# Define green, red and no color
RD='\033[0;31m'
GC='\033[0;32m'
NC='\033[0m'
ERRORS=0
for FILE in $(find content/blog-es content/blog-en -iname '*.adoc'); do
# Check that every article in blogs has a valid category
ARTCAT=$(cat $FILE | pcregrep --color -o '(?<=^:category:).*');
if ! cat categories.lst categorias.lst | pcregrep -q $ARTCAT ; then
echo -e "${RD} $ARTCAT";
echo -e "${GC} The article does not match any valid category. Please correct the file \"$FILE\"${NC}";
ERRORS=1;
fi
done
exit $ERRORS
\ No newline at end of file
:slug: ardilla-contra-mundo/
:date: 2018-03-06
:category: Identidad
:category: identidad
:tags: seguridad, criptografía, protocolo, autenticación
:Image: usuario-password.png
:alt: logo SQRL, Secure +QR+ Login
......
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