;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\207" [require ox mustache op-util op-vars op-git] 2) #@139 Get the item associated with KEY in `op/item-cache', if `op/item-cache' is nil or there is no item associated with KEY in it, return nil. (defalias 'op/get-cache-item #[(key) "\205\302 \"\207" [op/item-cache key plist-get] 3 (#$ . 215)]) #@99 Update the item associated with KEY in `op/item-cache', if `op/item-cache' is nil, initialize it. (defalias 'op/update-cache-item #[(key value) "\203 \303 \n#\210\202 \nD\n\207" [op/item-cache key value plist-put] 4 (#$ . 463)]) #@128 Firstly get item from `op/item-cache' with KEY, if item not found, evaluate BODY and push the result into cache and return it. (defalias 'op/get-cache-create '(macro . #[(key &rest body) "\302\303D\304\305\306\307 BBDEE\207" [key body or op/get-cache-item op/update-cache-item funcall lambda nil] 8 (#$ . 705)])) #@200 Render the header on each page. PARAM-TABLE is the hash table from mustache to render the template. If it is not set or nil, this function will try to build a hash table accordint to current buffer. (defalias 'op/render-header #[(&optional param-table) "\305\306\307!\206\310\307\311\312!\210\313\314P!\" \206M\315\316\317\"\320\321\322\323!\206%\324\325 Q\n#\210\320\326\322\327!\2068\f\2068\330\n#\210\320\331\322\332!\n#\210\320\333\322\334!\n#\210\n)\"\207" [op/template-directory param-table #1=#:ht-temp op/site-main-title user-full-name mustache-render op/get-cache-item :header-template op/update-cache-item message "Read header.mustache from file" file-to-string "header.mustache" make-hash-table :test equal puthash "page-title" op/read-org-option "TITLE" "Untitled" " - " "author" "AUTHOR" "Unknown Author" "description" "DESCRIPTION" "keywords" "KEYWORDS"] 7 (#$ . 1027)]) #@327 Render the navigation bar on each page. it will be read firstly from `op/item-cache', if there is no cached content, it will be rendered and pushed into cache from template. PARAM-TABLE is the hash table for mustache to render the template. If it is not set or nil, this function will try to render from a default hash table. (defalias 'op/render-navigation-bar #[(&optional param-table) "\306\307!\206f\310\307\311\312!\210\313\306\314!\206\310\314\311\315!\210\316\317P!\" \206d\320\321\322\"\323\324 \n#\210\323\325\f\n#\210\323\326\327\330\331\332\333\334\335!\"\336\"\"\n#\210\323\337 \n#\210\323\340\341\342%\"\203]\343\344%\"\202_%\n#\210\n)\"\"\207" [op/template-directory param-table #1=#:ht-temp op/site-main-title op/site-sub-title op/personal-github-link op/get-cache-item :nav-bar-html op/update-cache-item message "Render navigation bar from template" mustache-render :nav-bar-template "Read nav.mustache from file" file-to-string "nav.mustache" make-hash-table :test equal puthash "site-main-title" "site-sub-title" "nav-categories" mapcar #[(cat) "\302\303\304\"\305\306\307\310 !\307Q#\210\305\311\312 !#\210)\207" [#2=#:ht-temp cat make-hash-table :test equal puthash "category-uri" "/" convert-string-to-path "category-name" capitalize] 5] sort remove-if #[(cat) "\301\230\206 \302\230\207" [cat "index" "about"] 2] op/get-file-category nil string-lessp "github" "site-domain" string-match "\\`https?://\\(.*[a-zA-Z]\\)/?\\'" match-string 1 op/site-domain] 13 (#$ . 1927)]) #@190 Render the content on each page. TEMPLATE is the template name for rendering, if it is not set of nil, will use default post.mustache instead. PARAM-TABLE is similar to `op/render-header'. (defalias 'op/render-content #[(&optional template param-table) "\304\305\203\306\307\310\311#!\202\312!\206:\313\203$\306\307\310\311#!\202%\312\314\315\206,\316\317Q!\210\320 \2067\316P!\"\n\206]\321\322\323\"\324\325\326\327!\206L\330 #\210\324\331\332\333\334\211\335\334% #\210 )\"\207" [template op/template-directory param-table #1=#:ht-temp mustache-render op/get-cache-item intern replace-regexp-in-string "\\.mustache$" "-template" :post-template op/update-cache-item message "Read " "post.mustache" " from file" file-to-string make-hash-table :test equal puthash "title" op/read-org-option "TITLE" "Untitled" "content" org-export-as html nil t] 10 (#$ . 3445)]) #@79 Render the footer on each page. PARAM-TABLE is similar to `op/render-header'. (defalias 'op/render-footer #[(&optional param-table) "\306\307\310!\206\311\310\312\313!\210\314\315P!\" \2060\316 \317\320!\206!\321\322\317\323!\206,\324\325!!\317\326!@\2069A\n!B\327BC\"\206K\327\330C\"AD\331D\332\"\331D\333\"\f #E\334\335\336\"F\337\340\331D\341\"F#\210\337\342\331D\343\"F#\210\337\344\fF#\210\337\345\n\204\214\324\325!\202\234\346G\n\"\206\234\324\325\347\350\n!8\"F#\210\337\351 \204\252\352\202\271\353\354\355\356\357\360\361 \362\363#\"\"\364#F#\210\337\365\317\366!\206\313H\206\313\367F#\210\337\370EF#\210\337\371\372\373\356I#EPF#\210\337\374JF#\210\337\375\376\377!\205\370?F#\210\337\201M?F#\210\337\201NKF#\210\337\201O\201P\317\201Q!\206'L\206'\201R!F#\210F.\"\207" [op/template-directory param-table filename title date tags mustache-render op/get-cache-item :footer-template op/update-cache-item message "Read footer.mustache from file" file-to-string "footer.mustache" buffer-file-name op/read-org-option "TITLE" "Untitled" fix-timestamp-string "DATE" format-time-string "%Y-%m-%d" "TAGS" assoc "blog" plist-get :uri-generator :uri-template make-hash-table :test equal puthash "show-meta" :show-meta "show-comment" :show-comment "date" "mod-date" op/git-last-change-date 5 file-attributes "tag-links" "N/A" mapconcat #[(tag-name) "\302\303\304\305\306\"\307\310\311 !#\210\307\312 #\210)\"\207" [#1=#:ht-temp tag-name mustache-render "{{name}}" make-hash-table :test equal puthash "link" op/generate-tag-uri "name"] 6] delete "" mapcar trim-string split-string "[:,]+" t ", " "author" "AUTHOR" "Unknown Author" "disqus-id" "disqus-url" replace-regexp-in-string "/?$" "disqus-shortname" "google-analytics" boundp op/personal-google-analytics-id op/retrieve-category-function op/get-file-category category op/category-config-alist config uri #2=#:ht-temp op/repository-directory user-full-name op/site-domain op/personal-disqus-shortname org-html-creator-string user-mail-address "google-analytics-id" "creator-info" "email" confound-email "EMAIL" "Unknown Email"] 14 (#$ . 4331)]) #@115 Update the default template parameters. It is only needed when user did some customization to relevant variables. (defalias 'op/update-default-template-parameters #[nil "\306\307\310\311\"\312\313\n #\210\312\314 #\210\312\315\f #\210\312\316\317\320 \"\203)\321\322 \"\202* #\210\312\323 #\210\312\324 #\210\312\325\205C\326 #\210 )\"\210\207" [op/default-template-parameters #1=#:ht-temp op/site-main-title op/site-sub-title op/personal-github-link op/site-domain ht-update make-hash-table :test equal puthash "site-main-title" "site-sub-title" "github" "site-domain" string-match "\\`https?://\\(.*[a-zA-Z]\\)/?\\'" match-string 1 "disqus-shortname" "google-analytics-id" "google-analytics" t op/personal-disqus-shortname op/personal-google-analytics-id] 7 (#$ . 6531)]) #@217 Compose parameters for org file represented in current buffer. ATTR-PLIST is the attribute plist of the buffer, retrieved by the combination of `org-export--get-inbuffer-options' and `op/get-inbuffer-extra-options'. (defalias 'op/compose-template-parameters #[(attr-plist content) "\306\307\310!\"\311\312 \313\"!\311\312 \314\"\206 !\315\312 \316\"\206\" !6\312 \317\"7\312 \320\"8\312 \321\"\2119\322=?\205K9\323=?\205K9\324=?:\312 \325\"\203_\326\311\312 \325\"!!\202`\327;\312 \330\"\206j\327<\331\332\312 \333\"\334#=9\335=>\312 \336\"?\337\340\341@#?PA\342\343\344\"B\345BC\"\210\345B\342\343\344\"D\346\347\n\350EQD#\210\346\351\fD#\210\346\3527D#\210\346\3538D#\210\346\354\nD#\210\346\355FD#\210\346\356:D#\210\346\357;D#\210\346\360<D#\210\346\361=D#\210\346\362>D#\210\346\363?D#\210\346\364AD#\210\346\3656D#\210D)\"\210B.\207" [attr-plist info title user-full-name author user-mail-address org-combine-plists org-export--get-global-options html org-element-interpret-data plist-get :title :author confound-email :email :description :keywords :category index about none :date fix-timestamp-string "N/A" :mod-date mapconcat #[(tag-name) "\302\303\304\305\306\"\307\310\311 !#\210\307\312 #\210)\"\207" [#1=#:ht-temp tag-name mustache-render "{{name}}" make-hash-table :test equal puthash "link" op/generate-tag-uri "name"] 6] :tags ", " blog :uri replace-regexp-in-string "/?$" "" make-hash-table :test equal ht-update puthash "page-title" " - " "author" "description" "keywords" "title" "content" "show-meta-info" "creation-date" "modification-date" "tags" "show-comment" "disqus-id" "disqus-url" "email" email description keywords category show-meta-info creation-date mod-date tag-links show-comment disqus-id op/site-domain disqus-url param-table op/default-template-parameters #2=#:ht-temp op/site-main-title content] 8 (#$ . 7326)]) (provide 'op-template)