Sample org file
-1 First heading
-- Reference to a subheading -
-2 Second heading
-- Some stuff written here -
-2.1 First subheading
-- Some stuff -
-2.2 Second subheading
-- Some other stuff -
-diff --git a/.drone.yml b/.drone.yml index 671fc29..61c62fc 100644 --- a/.drone.yml +++ b/.drone.yml @@ -9,10 +9,11 @@ steps: - git submodule update --init --recursive - name: build - image: alpine + image: silex/emacs:27-alpine commands: - apk add hugo - mkdir blog + - emacs --script .export.el - hugo -d blog - name: deploy diff --git a/.export.el b/.export.el new file mode 100755 index 0000000..d8da047 --- /dev/null +++ b/.export.el @@ -0,0 +1,12 @@ +#!/usr/bin/emacs --script +(require 'package) +(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) +(package-initialize) +(package-refresh-contents) +(package-install 'ox-hugo) +(require 'ox-hugo) +(setq org-confirm-babel-evaluate nil + org-html-validation-link nil) +(let* ((file (expand-file-name "content-org/blog.org"))) + (with-current-buffer (find-file file) + (org-hugo-export-wim-to-md t nil nil t))) diff --git a/.gitignore b/.gitignore index fa9a63c..69eb505 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /archetypes/ /public/ /resources/ +/content/*.md diff --git a/content/better-custom-ids-orgmode.md b/content/better-custom-ids-orgmode.md deleted file mode 100644 index 7bafa83..0000000 --- a/content/better-custom-ids-orgmode.md +++ /dev/null @@ -1,299 +0,0 @@ -+++ -title = "[EN] Automatic Meaningful Custom IDs for Org Headings" -author = ["Lucien “Phundrak” Cartier-Tilet"] -date = 2020-06-06 -tags = ["emacs", "orgmode"] -categories = ["emacs", "linux", "conlanging", "orgmode"] -draft = false -[menu.main] - weight = 2001 - identifier = "en-automatic-meaningful-custom-ids-for-org-headings" -+++ - -Spoiler alert, I will just modify a bit of code that already exists, go -directly to the bottom if you want the solution, or read the whole post if -you are interested in how I got there. - -
- Reference to a subheading -
-- Some stuff written here -
-- Some stuff -
-- Some other stuff -
-