mirror of
https://github.com/SqrtMinusOne/sqrtminusone.github.io.git
synced 2025-12-10 15:53:03 +03:00
feat(configs): publish configs v1
This commit is contained in:
parent
2e803f156e
commit
7937c70bcb
6 changed files with 59 additions and 1 deletions
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
org/configs/**
|
||||
!org/configs/publish.el
|
||||
|
|
@ -24,7 +24,9 @@ staticDir = ["static"]
|
|||
name = "Posts"
|
||||
url = "/posts/"
|
||||
weight = 1
|
||||
|
||||
[[menu.main]]
|
||||
name = "Configs"
|
||||
url = "/configs/readme"
|
||||
|
||||
[markup.goldmark.renderer]
|
||||
unsafe = true # allow raw HTML in markdown files
|
||||
54
org/configs/publish.el
Normal file
54
org/configs/publish.el
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
(require 'package)
|
||||
|
||||
(setq package-user-dir (expand-file-name "./.packages"))
|
||||
|
||||
(setq package-archives '(("melpa" . "https://melpa.org/packages/")
|
||||
("elpa" . "https://elpa.gnu.org/packages/")))
|
||||
|
||||
;; Initialize the package system
|
||||
(package-initialize)
|
||||
(unless package-archive-contents
|
||||
(package-refresh-contents))
|
||||
|
||||
(setq package-user-dir (expand-file-name "./.packages"))
|
||||
|
||||
(setq package-archives '(("melpa" . "https://melpa.org/packages/")
|
||||
("elpa" . "https://elpa.gnu.org/packages/")))
|
||||
|
||||
(unless (package-installed-p 'use-package)
|
||||
(package-install 'use-package))
|
||||
(require 'use-package)
|
||||
|
||||
(use-package ox-hugo
|
||||
:ensure t)
|
||||
|
||||
(use-package org-make-toc
|
||||
:ensure t)
|
||||
|
||||
(setq org-make-toc-link-type-fn #'org-make-toc--link-entry-org)
|
||||
|
||||
(setq org-hugo-section "configs")
|
||||
(setq org-hugo-base-dir "../../")
|
||||
|
||||
(setq my/config-files '("README.org"
|
||||
"Emacs.org"
|
||||
"Desktop.org"
|
||||
"Console.org"
|
||||
"Mail.org"
|
||||
"Guix.org"))
|
||||
|
||||
(dolist (file my/config-files)
|
||||
(copy-file (expand-file-name (format "~/%s" file)) file 'overwrite))
|
||||
|
||||
(copy-directory (expand-file-name "~/dot-stats/img") "dot-stats/img" t t)
|
||||
|
||||
(dolist (file my/config-files)
|
||||
(with-temp-buffer
|
||||
(org-mode)
|
||||
(insert-file-contents file)
|
||||
(unless (string-equal file "README.org")
|
||||
(setq org-make-toc-link-type-fn #'org-make-toc--link-entry-org)
|
||||
(org-make-toc))
|
||||
(setq-local buffer-file-name file)
|
||||
(message "Publish %s" file)
|
||||
(org-hugo-export-to-md)))
|
||||
BIN
static/ox-hugo/all.png
Normal file
BIN
static/ox-hugo/all.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 114 KiB |
BIN
static/ox-hugo/emacs-vim.png
Normal file
BIN
static/ox-hugo/emacs-vim.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 52 KiB |
BIN
static/ox-hugo/literate-config.png
Normal file
BIN
static/ox-hugo/literate-config.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 59 KiB |
Loading…
Add table
Reference in a new issue