.emacs.d/init.d/text/web.el

55 lines
2.0 KiB
EmacsLisp
Raw Normal View History

2019-10-14 17:38:14 +02:00
;;; web.el --- Settings for web stuff. -*- lexical-binding: t; -*-
;; Time-stamp: <2020-03-27T21:22:50+0100>
2019-10-14 17:38:14 +02:00
;;; Commentary:
;;; Code:
(require 'basics/package-management)
2019-10-14 17:38:14 +02:00
;; Use company auto-completion for (X)HTML.
(use-package company-web
:after (company)
2020-03-27 18:12:41 +01:00
:config (add-to-list 'company-backends 'company-web-html))
2019-10-14 17:38:14 +02:00
(use-package web-mode
:custom
(web-mode-markup-indent-offset 2) ; Default indentation level.
2020-03-27 18:12:41 +01:00
:mode (("\\.[ps]?html?$" . web-mode)
("\\.tmpl$" . web-mode) ; Gitea templates.
("\\.php$" . web-mode))
:hook (web-mode . (lambda () (set-fill-column 100))))
2019-10-14 17:38:14 +02:00
;; Read EPUB ebooks.
(use-package nov
2020-03-27 18:12:41 +01:00
:custom (nov-text-width fill-column)
:custom-face (variable-pitch ((t (:inherit variable-pitch
:family "Source Serif Pro"
:height 1.4))))
:mode ("\\.epub$" . nov-mode))
2019-10-14 17:38:14 +02:00
;; Mode for writing blog posts with hugo.
(when (string= (system-name) "ventiloplattform")
(use-package easy-hugo
:custom ((easy-hugo-basedir "~/Projekte/www/blog.tastytea.de/")
(easy-hugo-url "https://blog.tastytea.de")
(easy-hugo-postdir "content/posts")
(easy-hugo-previewtime (* 60 60 2))
(easy-hugo-default-ext ".adoc")
(easy-hugo-asciidoc-extension "adoc")
(easy-hugo-server-flags "-D")
(easy-hugo-bloglist ; Additional blogs.
'(((easy-hugo-basedir . "~/Projekte/www/text-en.tastytea.de/")
(easy-hugo-url . "https://text-en.tastytea.de")
(easy-hugo-postdir . "content/posts")
(easy-hugo-previewtime . (* 60 60 2)))
((easy-hugo-basedir . "~/Projekte/www/text-de.tastytea.de/")
(easy-hugo-url . "https://text-de.tastytea.de")
(easy-hugo-postdir . "content/posts")
(easy-hugo-previewtime . (* 60 60 2))))))
:bind ("C-c h" . easy-hugo)))
2019-10-14 17:38:14 +02:00
(provide 'text/web)
;;; web.el ends here