~magic_rb/website

8ad68d6c4ce592bff3918e33981ef1dfc1a662f2 — Magic_RB 1 year, 3 months ago 89f7fc3
Indentation

Signed-off-by: Magic_RB <magic_rb@redalder.org>
2 files changed, 110 insertions(+), 119 deletions(-)

M blog/on-freedom-crypto-and-return-policies.org
M make.el
M blog/on-freedom-crypto-and-return-policies.org => blog/on-freedom-crypto-and-return-policies.org +15 -15
@@ 77,21 77,21 @@ I downloaded it and it started up. But that's all it did. As the version I got d
I then tried to build my own image, as surely it must build right? Try to see what's wrong with this Docker compose.

#+BEGIN_SRC yaml
   version: "3.7"

   services:
     nanos:
       build: .
       image: ledgerhq/speculos
       volumes:
         - ./apps:/speculos/apps
         ports:
           - "1234:1234" # gdb
           - "5000:5000" # api
           - "40000:40000" # apdu
           - "41000:41000" # vnc
           command: "--model nanos ./apps/btc.elf --sdk 2.0 --seed secret --display headless --apdu-port 40000 --vnc-port 41000"
           # Add `--vnc-password "<password>"` for macos users to use built-in vnc client.
  version: "3.7"

  services:
    nanos:
      build: .
      image: ledgerhq/speculos
      volumes:
        - ./apps:/speculos/apps
        ports:
          - "1234:1234" # gdb
          - "5000:5000" # api
          - "40000:40000" # apdu
          - "41000:41000" # vnc
          command: "--model nanos ./apps/btc.elf --sdk 2.0 --seed secret --display headless --apdu-port 40000 --vnc-port 41000"
          # Add `--vnc-password "<password>"` for macos users to use built-in vnc client.
#+END_SRC

Did you spot it? It's the ~build: . , image: ledgerhq/speculos~ part. It's as if they don't want people to know that the image in fact *does NOT build at all*. At this point I had enough, I spent a whole day on this piece of steaming garbage and I got exactly nowhere. I even opened and promptly closed [[https://github.com/LedgerHQ/openpgp-card-app/issues/72][this]] fun and wholesome issue.

M make.el => make.el +95 -104
@@ 54,122 54,113 @@
(defvar org-publish-project-alist)
(setq org-publish-project-alist
      `(
	;; Blog
	("redalder-blog-content"
	 :base-directory ,(expand-file-name "./blog/")
	 :base-extension "org"
	 :publishing-directory ,(expand-file-name "./public_html/blog")
	 :recursive t
        ;; Blog
        ("redalder-blog-content"
         :base-directory ,(expand-file-name "./blog/")
         :base-extension "org"
         :publishing-directory ,(expand-file-name "./public_html/blog")
         :recursive t
         :section-numbers nil
         :with-toc nil
         :with-date nil
	 :html-template ,(templated-html-load-template "./templates/blog.html")
	 :publishing-function org-html-publish-to-templated-html
	 :headline-levels 5
	 :exclude "^\\(index.org\\|*.inc\\)"
	 :auto-preamble t
	 :auto-sitemap t
         :html-template ,(templated-html-load-template "./templates/blog.html")
         :publishing-function org-html-publish-to-templated-html
         :headline-levels 5
         :exclude "^\\(index.org\\|*.inc\\)"
         :auto-preamble t
         :auto-sitemap t
         :sitemap-folders ignore
         :sitemap-style list
         :sitemap-title "Magic_RB's blog"
         :sitemap-filename "sitemap.inc"
         :sitemap-sort-files anti-chronologically)
	("redalder-blog-index"
	 :base-directory ,(expand-file-name "./blog/")
	 :root-directory ,(expand-file-name "./blog/")
	 :recursive t
	 :base-extension "org"
	 :exclude "^.*$"
	 :include ("index.org")
	 :publishing-directory ,(expand-file-name "./public_html/blog/")
	 :section-numbers nil
	 :with-toc nil
	 :with-date nil
	 :html-template ,(templated-html-load-template "./templates/blog-index.html")
	 :publishing-function org-html-publish-to-templated-html)
	("redalder-blog"
	 :components ("redalder-blog-content" "redalder-blog-index"))


	;; Homepage
	("redalder-homepage"
	 :base-directory ,(expand-file-name "./home")
	 :recursive nil
	 :base-extension "org"
	 :exclude "^.*$"
	 :include ("index.org")
	 :with-toc nil
	 :publishing-directory ,(expand-file-name "./public_html/")
	 :html-template ,(templated-html-load-template "./templates/index.html")
	 :publishing-function org-html-publish-to-templated-html)


	;; Contact
	("redalder-contact"
	 :base-directory ,(expand-file-name "./home")
	 :recursive nil
	 :base-extension "org"
	 :exclude "^.*$"
	 :include ("contact.org")
	 :with-toc nil
	 :publishing-directory ,(expand-file-name "./public_html/")
	 :html-template ,(templated-html-load-template "./templates/empty.html")
	 :publishing-function org-html-publish-to-templated-html)

	;; Links
	("redalder-links"
	 :base-directory ,(expand-file-name "./home")
	 :recursive nil
	 :base-extension "org"
	 :exclude "^.*$"
	 :include ("links.org")
	 :with-toc nil
	 :publishing-directory ,(expand-file-name "./public_html/")
	 :html-template ,(templated-html-load-template "./templates/empty.html")
	 :publishing-function org-html-publish-to-templated-html)

	;; Static images and css and js for redalder.org
	("redalder-assets"
	 :base-directory ,(expand-file-name "./assets/")
	 :publishing-directory ,(expand-file-name "./public_html/")
	 :recursive t
	 :base-extension ,magic_rb/asset-include
	 :publishing-function org-publish-attachment)	


	("nixng-examples"
	 :base-directory ,(expand-file-name "./nixng/examples/")
	 :base-extension "org"
	 :publishing-directory ,(expand-file-name "./public_html/")
	 :html-template ,(templated-html-load-template "./templates/example.html")
	 :publishing-function org-html-publish-to-templated-html)
	
	;; Static images and css and js for nixng.org
	("nixng-assets"
	 :base-directory ,(expand-file-name "./assets/")
	 :publishing-directory ,(expand-file-name "./public_html/")
	 :recursive t
	 :base-extension ,magic_rb/asset-include
	 :publishing-function org-publish-attachment)	

	;; top-level trigger
	("redalder-publish"
	 :components ("redalder-blog"
		      "redalder-assets"
		      "redalder-homepage"
		      "redalder-contact"
		      "redalder-links"))

	("nixng-publish"
	 :components ("nixng-assets"
		      "nixng-examples"))))
        ("redalder-blog-index"
         :base-directory ,(expand-file-name "./blog/")
         :root-directory ,(expand-file-name "./blog/")
         :recursive t
         :base-extension "org"
         :exclude "^.*$"
         :include ("index.org")
         :publishing-directory ,(expand-file-name "./public_html/blog/")
         :section-numbers nil
         :with-toc nil
         :with-date nil
         :html-template ,(templated-html-load-template "./templates/blog-index.html")
         :publishing-function org-html-publish-to-templated-html)
        ("redalder-blog"
         :components ("redalder-blog-content" "redalder-blog-index"))


        ;; Homepage
        ("redalder-homepage"
         :base-directory ,(expand-file-name "./home")
         :recursive nil
         :base-extension "org"
         :exclude "^.*$"
         :include ("index.org")
         :with-toc nil
         :publishing-directory ,(expand-file-name "./public_html/")
         :html-template ,(templated-html-load-template "./templates/index.html")
         :publishing-function org-html-publish-to-templated-html)


        ;; Contact
        ("redalder-contact"
         :base-directory ,(expand-file-name "./home")
         :recursive nil
         :base-extension "org"
         :exclude "^.*$"
         :include ("contact.org")
         :with-toc nil
         :publishing-directory ,(expand-file-name "./public_html/")
         :html-template ,(templated-html-load-template "./templates/empty.html")
         :publishing-function org-html-publish-to-templated-html)

        ;; Links
        ("redalder-links"
         :base-directory ,(expand-file-name "./home")
         :recursive nil
         :base-extension "org"
         :exclude "^.*$"
         :include ("links.org")
         :with-toc nil
         :publishing-directory ,(expand-file-name "./public_html/")
         :html-template ,(templated-html-load-template "./templates/empty.html")
         :publishing-function org-html-publish-to-templated-html)

        ;; Static images and css and js for redalder.org
        ("redalder-assets"
         :base-directory ,(expand-file-name "./assets/")
         :publishing-directory ,(expand-file-name "./public_html/")
         :recursive t
         :base-extension ,magic_rb/asset-include
         :publishing-function org-publish-attachment)

        ;; Static images and css and js for nixng.org
        ("nixng-assets"
         :base-directory ,(expand-file-name "./assets/")
         :publishing-directory ,(expand-file-name "./public_html/")
         :recursive t
         :base-extension ,magic_rb/asset-include
         :publishing-function org-publish-attachment)

        ;; top-level trigger
        ("redalder-publish"
         :components ("redalder-blog"
                      "redalder-assets"
                      "redalder-homepage"
                      "redalder-contact"
                      "redalder-links"))

        ("nixng-publish"
         :components ("nixng-assets"))))

(defun magic_rb/publish-website (website)
  "Publish WEBSITE."
  (cond ((string= website "redalder.org")
	 (org-publish "redalder-publish" t))
	((string= website "nixng.org")
	 (org-publish "nixng-publish"))))
         (org-publish "redalder-publish" t))
        ((string= website "nixng.org")
         (org-publish "nixng-publish"))))

(provide 'make)
;;; make.el ends here