Browse Source
This includes not only the mandatory .gitlab-ci.yml file containing the pipeline configuration but also an Emacs Lisp file for exporting the blog post and pages from the content-org files to markdown using Emacs and ox-hugo. It was also necessary to remove thr orgit links from the "My Emacs Package of the week: orgit" post since these required that the linked repository is at the given path which is not possible in the CI build. Well, it is /possible/ but there is no good way to do it. Additional the .gitmodules file was updated to use a relative local path instead of and SSH URL since GitLab can obviously not clone form an SSH URL. This may make things more difficult for local setups but I think I can live with the one additional clone command.main
4 changed files with 50 additions and 2 deletions
@ -0,0 +1,35 @@
|
||||
;; Package configuration |
||||
(package-initialize) |
||||
(add-to-list 'package-archives '("nongnu" . "https://elpa.nongnu.org/nongnu/") t) |
||||
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) |
||||
|
||||
(setq-default load-prefer-newer t) |
||||
(setq-default package-enable-at-startup nil) |
||||
|
||||
(package-refresh-contents) |
||||
(package-install 'use-package) |
||||
(setq package-user-dir (expand-file-name "./.packages")) |
||||
(add-to-list 'load-path package-user-dir) |
||||
(require 'use-package) |
||||
|
||||
(setq use-package-always-ensure t) |
||||
|
||||
;; Install and configure necessary packages |
||||
(use-package org |
||||
:pin gnu |
||||
:config |
||||
(setq org-todo-keywords '((sequence |
||||
"TODO(t!)" "NEXT(n!)" "STARTED(a!)" "WAIT(w@/!)" "SOMEDAY(s)" |
||||
"|" "DONE(d!)" "CANCELLED(c@/!)")))) |
||||
|
||||
(use-package ox-hugo |
||||
:after org) |
||||
|
||||
;; Export blog posts |
||||
(defun mmk2410/export (file) |
||||
(save-excursion |
||||
(find-file file) |
||||
(org-hugo-export-wim-to-md t))) |
||||
|
||||
(mapcar (lambda (file) (mmk2410/export file)) |
||||
(directory-files (expand-file-name "./content-org/") t "\\.org$")) |
@ -0,0 +1,13 @@
|
||||
variables: |
||||
GIT_SUBMODULE_STRATEGY: recursive |
||||
|
||||
build: |
||||
image: silex/emacs:27.2-alpine-ci |
||||
stage: build |
||||
script: |
||||
- emacs -Q --script .build/ox-hugo-build.el |
||||
- apk add --no-cache hugo |
||||
- hugo |
||||
artifacts: |
||||
paths: |
||||
- public |
@ -1,3 +1,3 @@
|
||||
[submodule "nextDESIGN"] |
||||
path = themes/nextDESIGN |
||||
url = git@git.mmk2410.org:mmk2410/nextDESIGN |
||||
url = ../nextDESIGN |
||||
|
Loading…
Reference in new issue