From 3fd4cd900f012d2c950170bff199556f34f65e98 Mon Sep 17 00:00:00 2001 From: "Yann Esposito (Yogsototh)" Date: Fri, 5 Jul 2019 17:09:14 +0200 Subject: [PATCH] :construction: WIP :construction: --- _site/archive.html | 39 ++++++ {dist => _site/assets}/minimalist.css | 0 _site/homepage.html | 175 ++++++++++++++++++++++++++ _site/index.html | 50 ++++++++ _site/posts/index.html | 47 +++++++ archive.xml | 34 +++++ assets/minimalist.css | 117 +++++++++++++++++ dist/index.org | 23 ---- serve.sh | 2 +- src/archive.org | 6 + src/assets/minimalist.css | 117 +++++++++++++++++ {dist => src}/homepage-pandoc.html | 0 {dist => src}/homepage.html | 0 {dist => src}/homepage.org | 0 {dist => src}/img/a.png | Bin {dist => src}/index.html | 11 +- src/index.org | 157 +++++++++++++++++++++++ {dist => src}/posts/index.org | 0 18 files changed, 751 insertions(+), 27 deletions(-) create mode 100644 _site/archive.html rename {dist => _site/assets}/minimalist.css (100%) create mode 100644 _site/homepage.html create mode 100644 _site/index.html create mode 100644 _site/posts/index.html create mode 100644 archive.xml create mode 100644 assets/minimalist.css delete mode 100644 dist/index.org create mode 100644 src/archive.org create mode 100644 src/assets/minimalist.css rename {dist => src}/homepage-pandoc.html (100%) rename {dist => src}/homepage.html (100%) rename {dist => src}/homepage.org (100%) rename {dist => src}/img/a.png (100%) rename {dist => src}/index.html (90%) create mode 100644 src/index.org rename {dist => src}/posts/index.org (100%) diff --git a/_site/archive.html b/_site/archive.html new file mode 100644 index 0000000..806bdc9 --- /dev/null +++ b/_site/archive.html @@ -0,0 +1,39 @@ + + + + + + +Blog Posts + + + + + + +
+
+
+Programing Heresy +
+
+
+

Blog Posts

+
+

+

  • Jul 04, 2019 her.esy.fun
  • +

    + +
    +
    +
    +
    + Home - + Posts +
    + +
    +
    +
    + + diff --git a/dist/minimalist.css b/_site/assets/minimalist.css similarity index 100% rename from dist/minimalist.css rename to _site/assets/minimalist.css diff --git a/_site/homepage.html b/_site/homepage.html new file mode 100644 index 0000000..898f471 --- /dev/null +++ b/_site/homepage.html @@ -0,0 +1,175 @@ + + + + + + +her.esy.fun + + + + + + + + + +
    +
    + +
    +
    +

    her.esy.fun

    +

    +Welcome to her.esy.fun! +

    + +
    +

    Testing

    +
    +

    +I will test some classical things. +First let’s test bold, then italic then, code and terminal. +Also forgot barré. +And a veryveryveryverylongwordlike Supercalifragilisticexpialidocious +and even longer SupercalifragilisticexpialidociousSupercalifragilisticexpialidocious +and even very very longer +SupercalifragilisticexpialidociousSupercalifragilisticexpialidociousSupercalifragilisticexpialidociousSupercalifragilisticexpialidociousSupercalifragilisticexpialidocious +

    + +
    +
    (def foo
    +  "this is some clojure code"
    +  [& args]
    +  (string/join ", " args))
    +
    +
    + +

    +Then let’s try some blockquote: +

    + +
    +

    +This is a quote here. I’m fond of using it. +

    + +

    +– Shakespeare +

    +
    + +
      +
    • item 1
    • +
    • item 2 +
        +
      • sub-item
      • +
      • re-sub-item +
          +
        • sub-sub-item
        • +
      • +
      • sub
      • +
    • +
    • item 3
    • +
    • item 4
    • +
    + + +
      +
    1. foo
    2. +
    3. bar
    4. +
    5. baz
    6. +
    + + +
    + +

    +some text +

    + +

    +A figure with a caption: +

    + + +
    +The bomb + +
    Figure 1: The bomb that started the expriment in Twin Peaks
    +
    +
    +
    + +
    +

    h2 test

    +
    +
    +
    +

    h3 test

    +
    +
    +
    +

    h4 test

    +
    +
    +
    +
    h5 test
    +
    +
    +
    +
    h6 test
    +
    +
    +
    +h7 does not exists +
    +
    +
      +
    • lower …
      +
        +
      • deeper
        +
          +
        • even deeper…
          +
            +
          • still even deeeeper
            +
            +

            +Deep enough now :) +

            +
            +
          • +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    + +
    +
    +
    + + diff --git a/_site/index.html b/_site/index.html new file mode 100644 index 0000000..2e13e16 --- /dev/null +++ b/_site/index.html @@ -0,0 +1,50 @@ + + + + + + +her.esy.fun + + + + + + +
    +
    +
    +Programing Heresy +
    +
    +
    +

    her.esy.fun

    +
    +

    Welcome!

    +
    +

    +her.esy.fun +

    + +

    +This is a new take on my personal blog. +With a lot more minimalism in mind. +

    +
    +
    + +
    +

    Posts

    +
    + +
    +
    +
    + +
    +
    +
    + + diff --git a/_site/posts/index.html b/_site/posts/index.html new file mode 100644 index 0000000..1278ef0 --- /dev/null +++ b/_site/posts/index.html @@ -0,0 +1,47 @@ + + + + + + +her.esy.fun + + + + + + +
    +
    + +
    +
    +

    her.esy.fun

    +

    +her.esy.fun +

    + +

    +This is a new take on my personal blog. +With a lot more minimalism in mind. +

    + +
    +

    Articles

    +
    +
    + +
    +
    +
    + + diff --git a/archive.xml b/archive.xml new file mode 100644 index 0000000..50d500c --- /dev/null +++ b/archive.xml @@ -0,0 +1,34 @@ + + + Blog Posts + + https://her.esy.fun/ + + en + Fri, 05 Jul 2019 17:08:36 +0200 + Fri, 05 Jul 2019 17:08:36 +0200 + Emacs 26.1 Org-mode 9.2.3 + yaesposi@YAESPOSI-M-82JZ (yaesposi) + + https://orgmode.org/img/org-mode-unicorn-logo.png + Blog Posts + https://her.esy.fun/ + + +
    +

    +

  • Jul 04, 2019 her.esy.fun
  • +

    + +
    +
    +
    diff --git a/assets/minimalist.css b/assets/minimalist.css new file mode 100644 index 0000000..0629e64 --- /dev/null +++ b/assets/minimalist.css @@ -0,0 +1,117 @@ +body { font-family: sans-serif; + font-size: 15px; + line-height: 20px; + max-width: 50em; + hyphens: auto; + -webkit-hyphens: auto; + -moz-hyphens:auto; + -ms-hyphens:auto; } + +h1, h2, h3, h4, h5, h6, +pre, code, blockquote, ol, ul, +ol ol, ul ul, ul ol, ol ul, li, +p, section, header, footer { + float: none; + margin: 0; + padding: 0; +} + +h1, h2, h3, h4, h5, h6, +pre, code, blockquote, +p, ul, ol, section, header, footer, .figure { + margin-top: 20px; + margin-bottom: 20px; +} +h1 { font-size: 1em; } +h2 { font-size: 1em; } +h3 { font-size: 1em; } +h4 { font-size: 1em; } +h5 { font-size: 1em; } +h6 { font-size: 1em; } +h1::before { content: "# "; opacity: 0.5; } +h2::before { content: "## "; opacity: 0.5; } +h3::before { content: "### "; opacity: 0.5; } +h4::before { content: "#### "; opacity: 0.5; } +h5::before { content: "##### "; opacity: 0.5; } +h6::before { content: "###### "; opacity: 0.5; } +p { margin: 0; padding: 0; } +hr { + position: relative; + height: 20px; + font-size: 0; + line-height: 0; + overflow: hidden; + border: 0; + margin-bottom: 20px; +} +hr:after { + content: "----------------------------------------------------------------------------------------------------"; + font-family: monospace; + position: absolute; + top: 0; + left: 0; + font-size: 14px; + line-height: 20px; + width: 100%; + word-wrap: break-word; +} +blockquote { margin-left: 0; } +pre::after,pre::before { content: "~~~~~~"; display: block; font-size: 1.25em; opacity: 0.3; } +code { + font-family: "courrier new", monospace; + background: #f2f2f2; +} +pre code { background: none; } +blockquote { + position: relative; + padding-left: 17px; + padding-left: 2ch; + overflow: hidden; +} +blockquote:after { + content: ">\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>"; + white-space: pre; + position: absolute; + top: 0; + left: 0; + font-size: 14px; + line-height: 20px; + opacity: 0.3; +} + +li { + position: relative; + display: block; + padding-left: 18px; +} +li:after { + position: absolute; + top: 0; + left: 0; +} +ul > li:after { + content: "▪"; + opacity: 0.2; +} +ol { + counter-reset: ol; +} +ol > li:after { + content: counter(ol) "."; + counter-increment: ol; +} + +/* colors */ +a, a:visited { color: #008AFF; } +a:active, a:hover, a:focus { color: #0085a1; } + +h1 { color: #6c71c4;} +h2 { color: #d33682;} +h3 { color: #dc322f;} +h4 { color: #cb4b16;} +h5 { color: #b58900;} +h6 { color: #859900;} + +img { max-width: 100%; + max-height: 800px; + margin: 20px auto; } diff --git a/dist/index.org b/dist/index.org deleted file mode 100644 index decba13..0000000 --- a/dist/index.org +++ /dev/null @@ -1,23 +0,0 @@ -#+TITLE: her.esy.fun -#+AUTHOR: Yann Esposito -#+EMAIL: yann.esposito@gmail.com -#+KEYWORDS: programming -#+DESCRIPTION: -#+LANGUAGE: en -#+LANG: en -#+CREATOR: Spacemacs, org-mode (Emacs 26.1, Org mode 9.2.3) -#+OPTIONS: ':t *:t -:t ::t <:t H:3 \n:nil ^:t arch:headline author:t c:nil -#+OPTIONS: creator:comment d:(not LOGBOOK) date:t e:t email:nil f:t inline:t -#+OPTIONS: p:nil pri:nil stat:t tags:t tasks:t tex:t timestamp:t -#+OPTIONS: html-style:nil num:nil toc:nil -#+OPTIONS: html-postamble:nil -#+OPTIONS: H:6 -#+OPTIONS: todo:t |:t -#+HTML_HEAD_EXTRA: - -[[https://her.esy.fun][her.esy.fun]] - -This is a new take on my personal blog. -With a lot more minimalism in mind. - -* Articles diff --git a/serve.sh b/serve.sh index 8416362..f75f959 100755 --- a/serve.sh +++ b/serve.sh @@ -1,2 +1,2 @@ #!/usr/bin/env bash -cd dist && sws --local --no-auth . --port 5443 +cd _site && sws --local --no-auth . --port 5443 diff --git a/src/archive.org b/src/archive.org new file mode 100644 index 0000000..5f8b3d3 --- /dev/null +++ b/src/archive.org @@ -0,0 +1,6 @@ +#+TITLE: Blog Posts + + +#+begin_archive +@@html:
  • @@ @@html:@@ Jul 04, 2019 @@html:@@ [[file:posts/index.org][her.esy.fun]] @@html:@@ @@html:
  • @@ +#+end_archive diff --git a/src/assets/minimalist.css b/src/assets/minimalist.css new file mode 100644 index 0000000..0629e64 --- /dev/null +++ b/src/assets/minimalist.css @@ -0,0 +1,117 @@ +body { font-family: sans-serif; + font-size: 15px; + line-height: 20px; + max-width: 50em; + hyphens: auto; + -webkit-hyphens: auto; + -moz-hyphens:auto; + -ms-hyphens:auto; } + +h1, h2, h3, h4, h5, h6, +pre, code, blockquote, ol, ul, +ol ol, ul ul, ul ol, ol ul, li, +p, section, header, footer { + float: none; + margin: 0; + padding: 0; +} + +h1, h2, h3, h4, h5, h6, +pre, code, blockquote, +p, ul, ol, section, header, footer, .figure { + margin-top: 20px; + margin-bottom: 20px; +} +h1 { font-size: 1em; } +h2 { font-size: 1em; } +h3 { font-size: 1em; } +h4 { font-size: 1em; } +h5 { font-size: 1em; } +h6 { font-size: 1em; } +h1::before { content: "# "; opacity: 0.5; } +h2::before { content: "## "; opacity: 0.5; } +h3::before { content: "### "; opacity: 0.5; } +h4::before { content: "#### "; opacity: 0.5; } +h5::before { content: "##### "; opacity: 0.5; } +h6::before { content: "###### "; opacity: 0.5; } +p { margin: 0; padding: 0; } +hr { + position: relative; + height: 20px; + font-size: 0; + line-height: 0; + overflow: hidden; + border: 0; + margin-bottom: 20px; +} +hr:after { + content: "----------------------------------------------------------------------------------------------------"; + font-family: monospace; + position: absolute; + top: 0; + left: 0; + font-size: 14px; + line-height: 20px; + width: 100%; + word-wrap: break-word; +} +blockquote { margin-left: 0; } +pre::after,pre::before { content: "~~~~~~"; display: block; font-size: 1.25em; opacity: 0.3; } +code { + font-family: "courrier new", monospace; + background: #f2f2f2; +} +pre code { background: none; } +blockquote { + position: relative; + padding-left: 17px; + padding-left: 2ch; + overflow: hidden; +} +blockquote:after { + content: ">\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>"; + white-space: pre; + position: absolute; + top: 0; + left: 0; + font-size: 14px; + line-height: 20px; + opacity: 0.3; +} + +li { + position: relative; + display: block; + padding-left: 18px; +} +li:after { + position: absolute; + top: 0; + left: 0; +} +ul > li:after { + content: "▪"; + opacity: 0.2; +} +ol { + counter-reset: ol; +} +ol > li:after { + content: counter(ol) "."; + counter-increment: ol; +} + +/* colors */ +a, a:visited { color: #008AFF; } +a:active, a:hover, a:focus { color: #0085a1; } + +h1 { color: #6c71c4;} +h2 { color: #d33682;} +h3 { color: #dc322f;} +h4 { color: #cb4b16;} +h5 { color: #b58900;} +h6 { color: #859900;} + +img { max-width: 100%; + max-height: 800px; + margin: 20px auto; } diff --git a/dist/homepage-pandoc.html b/src/homepage-pandoc.html similarity index 100% rename from dist/homepage-pandoc.html rename to src/homepage-pandoc.html diff --git a/dist/homepage.html b/src/homepage.html similarity index 100% rename from dist/homepage.html rename to src/homepage.html diff --git a/dist/homepage.org b/src/homepage.org similarity index 100% rename from dist/homepage.org rename to src/homepage.org diff --git a/dist/img/a.png b/src/img/a.png similarity index 100% rename from dist/img/a.png rename to src/img/a.png diff --git a/dist/index.html b/src/index.html similarity index 90% rename from dist/index.html rename to src/index.html index 536b287..9934d78 100644 --- a/dist/index.html +++ b/src/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + her.esy.fun @@ -70,8 +70,13 @@ This is a new take on my personal blog. With a lot more minimalism in mind.

    -
    -

    Articles

    +
    +

    Posts

    +
    + +
    diff --git a/src/index.org b/src/index.org new file mode 100644 index 0000000..bb330fa --- /dev/null +++ b/src/index.org @@ -0,0 +1,157 @@ +* Code magic :noexport: +#+TITLE: her.esy.fun +#+AUTHOR: Yann Esposito +#+EMAIL: yann.esposito@gmail.com +#+KEYWORDS: programming +#+DESCRIPTION: +#+LANGUAGE: en +#+LANG: en +#+CREATOR: Spacemacs, org-mode (Emacs 26.1, Org mode 9.2.3) +#+OPTIONS: ':t *:t -:t ::t <:t H:3 \n:nil ^:t arch:headline author:t c:nil +#+OPTIONS: creator:comment d:(not LOGBOOK) date:t e:t email:nil f:t inline:t +#+OPTIONS: p:nil pri:nil stat:t tags:t tasks:t tex:t timestamp:t +#+OPTIONS: html-style:nil num:nil toc:nil +#+OPTIONS: html-postamble:nil +#+OPTIONS: H:6 +#+OPTIONS: todo:t |:t +#+HTML_HEAD_EXTRA: +#+begin_src elisp :results none + (require 'org) + (require 'ox-publish) + (require 'ox-html) + (require 'org-element) + (require 'ox-rss) + + (defun org-blog-prepare (project-plist) + "With help from `https://github.com/howardabrams/dot-files'. + Touch `index.org' to rebuilt it. + Argument `PROJECT-PLIST' contains information about the current project." + (let* ((base-directory (plist-get project-plist :base-directory)) + (buffer (find-file-noselect (expand-file-name "index.org" base-directory) t))) + (with-current-buffer buffer + (set-buffer-modified-p t) + (save-buffer 0)) + (kill-buffer buffer))) + + (defvar org-blog-head + " + ") + + (defun org-blog-preamble (_plist) + "Pre-amble for whole blog." + "Programing Heresy") + + (defun org-blog-postamble (_plist) + "Post-amble for whole blog." + "
    + Home - + Posts") + + (defun org-blog-sitemap-format-entry (entry _style project) + "Return string for each ENTRY in PROJECT." + (when (s-starts-with-p "posts/" entry) + (format "@@html:@@ %s @@html:@@ [[file:%s][%s]] @@html:@@" + (format-time-string "%h %d, %Y" + (org-publish-find-date entry project)) + entry + (org-publish-find-title entry project)))) + + (defun org-blog-publish-to-html (plist filename pub-dir) + "Same as `org-html-publish-to-html' but modifies html before finishing." + (let ((file-path (org-html-publish-to-html plist filename pub-dir))) + (with-current-buffer (find-file-noselect file-path) + (goto-char (point-min)) + (search-forward "") + (insert (concat "\n
    \n " + "
    " + "
    ")) + (goto-char (point-max)) + (search-backward "") + (insert "\n
    \n
    \n
    \n") + (save-buffer) + (kill-buffer)) + file-path)) + + (defun org-blog-sitemap-function (title list) + "Return sitemap using TITLE and LIST returned by `org-blog-sitemap-format-entry'." + (concat "#+TITLE: " title "\n\n" + "\n#+begin_archive\n" + (mapconcat (lambda (li) + (format "@@html:
  • @@ %s @@html:
  • @@" (car li))) + (seq-filter #'car (cdr list)) + "\n") + "\n#+end_archive\n")) + + (setq org-publish-project-alist + `(("orgfiles" + :base-directory "~/y/her.esy.fun/src/" + :exclude ".*drafts/.*" + :base-extension "org" + + :publishing-directory "~/y/her.esy.fun/_site/" + + :recursive t + :preparation-function org-blog-prepare + :publishing-function org-blog-publish-to-html + + :with-toc nil + :with-title t + :with-date t + :section-numbers nil + :html-doctype "html5" + :html-html5-fancy t + :html-head-include-default-style nil + :html-head-include-scripts nil + :htmlized-source t + :html-head-extra ,org-blog-head + :html-preamble org-blog-preamble + :html-postamble org-blog-postamble + + :auto-sitemap t + :sitemap-filename "archive.org" + :sitemap-title "Blog Posts" + :sitemap-style list + :sitemap-sort-files anti-chronologically + :sitemap-format-entry org-blog-sitemap-format-entry + :sitemap-function org-blog-sitemap-function) + + ("assets" + :base-directory "~/y/her.esy.fun/src/assets/" + :base-extension ".*" + :publishing-directory "~/y/her.esy.fun/_site/assets/" + :publishing-function org-publish-attachment + :recursive t) + + ("rss" + :base-directory "~/y/her.esy.fun/src/" + :base-extension "org" + :html-link-home "https://her.esy.fun/" + :html-link-use-abs-url t + :rss-extension "xml" + :publishing-directory "~/y/her.esy.fun/" + :publishing-function (org-rss-publish-to-rss) + :exclude ".*" + :include ("archive.org") + :section-numbers nil + :table-of-contents nil) + + ("blog" :components ("orgfiles" "assets" "rss")))) + +#+end_src + +* Welcome! + +[[https://her.esy.fun][her.esy.fun]] + +This is a new take on my personal blog. +With a lot more minimalism in mind. + +* Posts + +#+begin_src elisp :results value list :exports results + (mapcar (lambda (d) (concat "[[./posts/" d "][" d "]]")) + (directory-files "posts" nil "\\.org")) +#+end_src + +#+RESULTS: +- [[posts/index.org][index.org]] diff --git a/dist/posts/index.org b/src/posts/index.org similarity index 100% rename from dist/posts/index.org rename to src/posts/index.org