Browse Source

tangle displayed correctly

auto-link-to-tangle
parent
commit
e8eaa51371
Signed by: yogsototh GPG Key ID: 7B19A4C650D59646
  1. 8
      project.el
  2. BIN
      project.el.sig
  3. 12
      src/css/mk.css
  4. 12
      src/demo.org
  5. 7
      src/posts/0010-Haskell-Now/index.org

8
project.el

@ -350,9 +350,11 @@ Return output file name."
"Add a link just before source code block with tangled files.
BACKEND is the export backend. Used as symbol."
(while ;; (re-search-forward )
(re-search-forward "^\\( *\\)#\\+begin_src .*:tangle \\([^\\s\\n]*\\)" nil t)
(replace-match "\\1{{{lnk(\\2)}}}\n3\n\\&")))
(re-search-forward "^\\( *\\)#\\+begin_src .*:tangle \\([^\s\n]*\\)" nil t)
(replace-match "\\1#+CAPTION: [[./\\2][=\\2=]]\n\\&")))
(add-hook 'org-export-before-processing-hook 'my-add-link-to-tangled-files)
(setq org-export-before-processing-hook nil)
(add-hook 'org-export-before-processing-hook
'my-add-link-to-tangled-files)
(provide 'her-esy-fun-publish)

BIN
project.el.sig

Binary file not shown.

12
src/css/mk.css

@ -242,7 +242,12 @@ figure, .figure {
cursor: pointer;
font-style: italic;
}
label + pre {
margin-top: 0;
}
label {
padding-left: 1.5em;
}
/* colors theme */
/* --------------------------------------------------------------------------- */
/* Dark theme selected */
@ -369,8 +374,9 @@ li .keywords {
.main ol > li:before, ol > li:before,
pre::after,pre::before,hr:after,
.main pre::after,.main pre::before,.main hr:after,
blockquote:after, .main blockquote:after
{
blockquote:after, .main blockquote:after,
label, label a, .main label, .main label a
{
color: var(--fg0);
}
nav a, nav a:visited, .main nav a,.main nav a:visited {

12
src/demo.org

@ -271,6 +271,18 @@ main = do
putStrLn $ "Hello " <> name <> "!"
#+end_src
** Tangled
:PROPERTIES:
:CUSTOM_ID: tangled
:END:
#+begin_src clojure :tangle my-dir/pprint.clj :mkdir t
(defn clj-fn
"A clojure function with syntax highlighting"
[arg]
(clojure.pprint/pprint arg))
#+end_src
#+begin_src haskell :tangle hello_world.hs
-- main hello world
main :: IO ()

7
src/posts/0010-Haskell-Now/index.org

@ -157,13 +157,6 @@ The article contains five parts:
- *Start swimming*: Start a new project.
** Helpers :noexport:
:PROPERTIES:
:CUSTOM_ID: helpers
:END:
#+MACRO: lnk @@html:<a href="$1" class="codefile" target="_blank">$1 ⤓</a>@@
** Install
:PROPERTIES:
:CUSTOM_ID: install

Loading…
Cancel
Save