Compare commits

...

2 Commits

Author SHA1 Message Date
Iván Ruvalcaba dedeeb1904
👷 Actualizar Makefile
Reestructuración del archivo Makefile. Implementación de la tarea «timestamp».
2023-05-15 15:52:14 -06:00
Iván Ruvalcaba 8a8a7fbe91
🚚 Mover archivo de configuración para Markdownlint
Se actualizaron los parametros de configuración para la regla MD013 - Line length
2023-05-15 15:50:12 -06:00
2 changed files with 41 additions and 36 deletions

View File

@ -78,7 +78,7 @@ MD013:
# Strict length checking
strict: false
# Stern length checking
stern: false
stern: true
# MD014/commands-show-output - Dollar signs used before commands without showing output
MD014: true

View File

@ -12,13 +12,13 @@
# See the FSF All-Permissive License for more details
# <https://spdx.org/licenses/FSFAP.html>.
MARKDOWN_CONFIG_FILE?=.markdownlint.yml
MARKDOWN_DIR?=md
MARKDOWN_FILE?=$(shell bash -c 'read -p "Nombre del archivo Markdown: " file_name; echo $$file_name')
MARKDOWNLINT_OPTIONS?=--disable MD013
MARKDOWNLINT_OPTIONS?=
BLOG_DIR?=content/blog
PUBLIC_DIR?=public
REMOTEHOST_NAME?=ivanruvalcaba@tilde.team:public_gemini
TIMESTAMP?=`date +%FT%T%:z`
# Variables utilizadas para colorear los mensajes mostrados en la ayuda.
GREEN := $(shell tput -Txterm setaf 2)
@ -29,38 +29,6 @@ RESET := $(shell tput -Txterm sgr0)
all: help
## build:
build: ## Generar el directorio público.
@echo "Generar el directorio público…"
kiln build
## mdconvert:
mdconvert: ## Convertir el contenido de un archivo Markdown a Gemtext.
@echo "Convertir archivo Markdown a Gemtext…"
md2gemini \
--plain \
--frontmatter \
--no-checklist \
--links 'at-end' \
--write $(MARKDOWN_DIR)/$(MARKDOWN_FILE) \
--dir $(BLOG_DIR)
## deploy:
deploy: clean build ## Hospedar el directorio público en el host remoto.
@echo "Desplegar el directrio «${PUBLIC_DIR}» a «${REMOTEHOST_NAME}»…"
rsync -rtvzP --delete $(PUBLIC_DIR)/ $(REMOTEHOST_NAME)/
## mdlint:
mdlint: ## Ejecutar el «lintern» a los archivos Markdown en el directorio de contenido.
# Véase: https://github.com/markdownlint/markdownlint/blob/master/docs/RULES.md
@echo "Realizar el «linting» de los archivos Markdown en el directorio «${MARKDOWN_DIR}»…"
markdownlint --config $(MARKDOWN_DIR)/$(MARKDOWN_CONFIG_FILE) $(MARKDOWN_DIR)/ $(MARKDOWNLINT_OPTIONS)
## clean:
clean: ## Eliminar el directorio público.
@echo "Eliminar el directorio «${PUBLIC_DIR}»…"
rm -rf $(PUBLIC_DIR)
## help:
help: ## Mostrar la ayuda.
@echo ''
@ -75,6 +43,43 @@ help: ## Mostrar la ayuda.
else if (/^## .*$$/) {printf " ${CYAN}%s${RESET}\n", substr($$1,4)} \
}' $(MAKEFILE_LIST)
.PHONY: all build clean deploy help mdconvert mdlint
## build:
build: ## Generar el directorio público.
@echo "Generar el directorio público…"
kiln build
## clean:
clean: ## Eliminar el directorio público.
@echo "Eliminar el directorio «${PUBLIC_DIR}»…"
rm -rf $(PUBLIC_DIR)
## deploy:
deploy: clean build ## Hospedar el directorio público en el host remoto.
@echo "Desplegar el directrio «${PUBLIC_DIR}» a «${REMOTEHOST_NAME}»…"
rsync -rtvzP --delete $(PUBLIC_DIR)/ $(REMOTEHOST_NAME)/
## mdconvert:
mdconvert: ## Convertir el contenido de un archivo Markdown a Gemtext.
@echo "Convertir archivo Markdown a Gemtext…"
md2gemini \
--plain \
--frontmatter \
--no-checklist \
--links 'at-end' \
--write $(MARKDOWN_DIR)/$(MARKDOWN_FILE) \
--dir $(BLOG_DIR)
## mdlint:
mdlint: ## Ejecutar el «lintern» a los archivos Markdown en el directorio de contenido.
# Véase: https://github.com/markdownlint/markdownlint/blob/master/docs/RULES.md
@echo "Realizar el «linting» de los archivos Markdown ubicados en el directorio «${MARKDOWN_DIR}»…"
markdownlint $(MARKDOWN_DIR)/ $(MARKDOWNLINT_OPTIONS)
## timestamp:
timestamp: ## Imprimir en pantalla la fecha y hora actual del sistema en un formato RFC 3339.
@echo "Mostrar la fecha y hora actual del sistema…"
@echo $(TIMESTAMP)
.PHONY: all build clean deploy help mdconvert mdlint timestamp
# vim: setlocal cc=80 ts=8 sw=8 noet: