Add opengraph header tags

This commit is contained in:
Sameer Rahmani 2021-02-17 11:32:25 +00:00
parent 0d52ff0aa4
commit 157786556e
11 changed files with 35 additions and 25 deletions

View File

@ -1,14 +1,18 @@
clean:
rm -rf build
rm -rf ./orgs/index.org ./orgs/categories/index.org ./orgs/tags/index.org
rm -rf ./orgs/index.org ./orgs/categories/ ./orgs/tags/
mkdir -p ./orgs/categories/ ./orgs/tags/
rm -rf `find . -iname "*~"`
dev-build:
./build.el
build:
LXHOME_PROD=t ./build.el
deploy: clean build
rsync -vlcr --delete-after ./build/ lxsameer@core.lxsameer.com:/home/lxsameer/lxsameer.com/home/
serve: build
npx http-server -p 3003 ./build

View File

@ -140,11 +140,6 @@ Not pages."
(get-all-categories))
(defun extra-headers ()
"Retun a list of extra header html tags."
(concat
"<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">"))
(defun category-org-list ()
"Return a list of links to the categories in org format."
@ -240,11 +235,11 @@ Not pages."
(defun main ()
"The entry point to the build script."
;; Setup the emacs theme so htmlize can actually setup
;; the code highlighter
(load-theme 'dracula t)
(enable-theme 'dracula)
;; UTF-8 as default encoding
(prefer-coding-system 'utf-8)
(set-default-coding-systems 'utf-8)
(set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8)
(setq project-root (car command-line-args-left))
@ -319,7 +314,6 @@ Not pages."
:with-toc nil
:base-url ,base-url
:html-link-home "/"
:html-head-extra ,(extra-headers)
:html-template ,(from-root "/templates/blog.html")
:html-page-preamble-template ,(from-root "/templates/page-preamble.html")
:html-post-preabmle-template ,(from-root "/templates/post-preamble.html")
@ -347,7 +341,6 @@ Not pages."
:html-link-home "/"
:html-head-include-default-style nil
:html-head-include-scripts nil
:html-head-extra ,(extra-headers)
:makeindex nil)
("pdfs"

View File

@ -120,6 +120,9 @@ call `org-html-render-tag-template' otherwise will call ORIG-FN."
("head" (plist-get info :html-head-extra))
("base-url" (plist-get info :base-url))
("preamble" (org-html--build-pre/postamble 'preamble info))
("title" (get-file-global-props (plist-get info :input-file) "TITLE"))
("description" (or (get-file-global-props (plist-get info :input-file) "DESC")
""))
("postamble" (org-html--build-pre/postamble 'postamble info)))))
(mustache-render (use-html template-name) ctx)))
@ -133,6 +136,7 @@ call `org-html-render-tag-template' otherwise will call ORIG-FN."
(defun custom-drawer-format (name content)
"Return the drawer format for the given drawer NAME and CONTENT."
(format "<section class='%s-drawer'><p>%s</p>%s</section>"
(downcase name)
(capitalize name)

View File

@ -4,6 +4,7 @@
#+DATE: 2021-02-11
#+TITLE: Code of Honor
#+PAGE: true
#+DESC: A man is nothing without his honor
I always try to live by my code of honor. A man is nothing without his honor. “A sin is to betray your beliefs”.

View File

@ -3,6 +3,7 @@
#+CATEGORY: Engineering
#+DATE: 2019-12-07
#+TITLE: Choosing the target platform
#+DESC: What platform is suitable for Serene ?
After wrapping my head around the [[file:rational-and-a-name.org][rational]] of [[file:my-new-programming-language.org][My new programming language]], I have
a big decision to make. Choose a platform.

View File

@ -3,6 +3,7 @@
#+CATEGORY: Engineering
#+DATE: 2019-12-01
#+TITLE: Rational and a name
#+DESC: The rational behind Serene
*This post is a draft and I'll finish it gradually*

View File

@ -3,6 +3,7 @@
#+CATEGORY: Engineering
#+DATE: 2020-01-03
#+TITLE: Serene (simple versoin)
#+DESC: Overview of the simple version of Serene
As you might already know I'm working on [[file:my-new-programming-language.org][my own programming language]]
for a while now. I'm still on early stages and working on [[file:choosing-the-target-platform.org][choosing the right platform]]

View File

@ -4,6 +4,7 @@
#+DATE: 2021-02-11
#+TITLE: The little nest of mine
#+PAGE: true
#+DESC: All about lxsameer's experience in science and engineering
Welcome to my little piece of the world. I'm a software engineer by day and an armature scientist by night
who lives by his [[./coh.org][Code of Honor]]. I write about my thoughts and researches. The views expressed here are my
@ -16,8 +17,8 @@ with me via email (check my [[./gpg.org][GPG]] info page). If you have a questio
in the [[./faq.org][FAQs]] page.
* Recent updates:
- [[http://localhost:3003/essays/serene-simple-version.html][Serene (simple versoin)]]
- [[http://localhost:3003/essays/choosing-the-target-platform.html][Choosing the target platform]]
- [[http://localhost:3003/essays/rational-and-a-name.html][Rational and a name]]
- [[http://localhost:3003/essays/my-new-programming-language.html][My new programming language]]
- [[http://localhost:3003/essays/transaction-variants.html][Transaction Variants]]
- [[https://lxsameer.com/essays/serene-simple-version.html][Serene (simple versoin)]]
- [[https://lxsameer.com/essays/choosing-the-target-platform.html][Choosing the target platform]]
- [[https://lxsameer.com/essays/rational-and-a-name.html][Rational and a name]]
- [[https://lxsameer.com/essays/my-new-programming-language.html][My new programming language]]
- [[https://lxsameer.com/essays/transaction-variants.html][Transaction Variants]]

View File

@ -1,6 +1,5 @@
#+TITLE: lxsameer's nest
- [[file:thoughts.org][Inner world]]
- [[file:essays/serene-simple-version.org][Serene (simple versoin)]]
- [[file:essays/choosing-the-target-platform.org][Choosing the target platform]]
- [[file:essays/rational-and-a-name.org][Rational and a name]]
@ -13,11 +12,6 @@
- [[file:faq.org][FAQ]]
- [[file:gpg.org][Code of Honor]]
- [[file:coh.org][Code of Honor]]
- [[file:categories/nil.org][<<<title>>>]]
- [[file:categories/SLA.org][SLA]]
- [[file:tags/ASDK.org][ASDK]]
- [[file:tags/BD.org][BD]]
- [[file:tags/ABD.org][ABD]]
- [[file:tags/index.org][index]]
- [[file:categories/index.org][index]]
- [[file:index.org][blah]]

View File

@ -1,6 +1,15 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{title}}</title>
<meta name="description" content="lxsameer's nest">
<meta name="keywords" content="software engineering, physics, computer science, lisp, compilers">
<meta name="author" content="Sameer Rahmani">
<meta property="og:title" content="{{title}}" />
<meta property="og:description" content="{{description}}" />
{{{head}}}
<link rel="stylesheet" href="{{base-url}}/assets/styles/dark.css?1">
<link rel="stylesheet" href="{{base-url}}/assets/styles/main.css?1">

View File

@ -4,6 +4,7 @@
#+DATE: 2021-02-11
#+TITLE: The little nest of mine
#+PAGE: true
#+DESC: All about lxsameer's experience in science and engineering
Welcome to my little piece of the world. I'm a software engineer by day and an armature scientist by night
who lives by his [[./coh.org][Code of Honor]]. I write about my thoughts and researches. The views expressed here are my