Coder Social home page Coder Social logo

Comments (8)

bastibe avatar bastibe commented on May 17, 2024 1

How did you configure org-static-blog?

from org-static-blog.

66tree avatar 66tree commented on May 17, 2024

I added the following to my .emacs:

Under (custom-set-variables:

    '(org-static-blog-enable-tags t)

    '(package-selected-packages
   (quote
    (bug-hunter org-static-blog...

;; -----------------------------------------------------------------------------
;; Set up blogging in Emacs
;; -----------------------------------------------------------------------------

(setq org-static-blog-publish-title "My Site Name")
(setq org-static-blog-publish-url "https://mysite.com")
(setq org-static-blog-publish-directory "~/Code/mysite/")
(setq org-static-blog-posts-directory "~/Code/mysite/posts/")
(setq org-static-blog-drafts-directory "~/Code/mysite/drafts/")
(setq org-static-blog-enable-tags t)
(setq org-export-with-toc nil)
(setq org-export-with-section-numbers nil)

(setq org-static-blog-page-header
"<meta name=\"author\" content=\"My Name\">
<meta name=\"referrer\" content=\"no-referrer\">
<link href= \"static/style.css\" rel=\"stylesheet\" type=\"text/css\" />
<link rel=\"icon\" href=\"static/favicon.ico\">
<link rel=\"apple-touch-icon-precomposed\" href=\"static/favicon-152.png\">
<link rel=\"msapplication-TitleImage\" href=\"static/favicon-144.png\">
<link rel=\"msapplication-TitleColor\" href=\"#859900\">
<script src=\"static/katex.min.js\"></script>
<script src=\"static/auto-render.min.js\"></script>
<link rel=\"stylesheet\" href=\"static/katex.min.css\">
<script>document.addEventListener(\"DOMContentLoaded\", function() { renderMathInElement(document.body); });</script>
<meta http-equiv=\"content-type\" content=\"application/xhtml+xml; charset=UTF-8\">
<meta name=\"viewport\" content=\"initial-scale=1,width=device-width,minimum-scale=1\">")

(setq org-static-blog-page-preamble
"<div class=\"header\">
      <a href=\"https://mysite.com\">My Site</a>
      <div class=\"sitelinks\">
        <a href=\"https://mysite.com/my-story.html\">My Story</a>
      </div>
    </div>")

(setq org-static-blog-page-postamble
"<div id=\"archive\">
  <a href=\"https://mysite.com/archive.html\">Other posts</a>
</div>")
;;; end website code ;;;

In /home/username/.emacs.d/elpa/org-static-blog-20180528.648/org-static-blog.el:

;;; org-static-blog.el --- a simple org-mode based static blog generator

;; Author: Bastian Bechtold
;; URL: https://github.com/bastibe/org-static-blog
;; Package-Version: 20180528.648
;; Version: 1.2.1
;; Package-Requires: ((emacs "24.3"))

;; Omitted Commentary

;;; Code:

(require 'org)
(require 'ox-html)

(defgroup org-static-blog nil
  "Settings for a static blog generator using org-mode"
  :version "1.2.1"
  :group 'applications)

(defcustom org-static-blog-publish-url "https://mysite.com"
  "URL of the blog."
  :group 'org-static-blog)

(defcustom org-static-blog-publish-title "My Site Name"
  "Title of the blog."
  :group 'org-static-blog)

(defcustom org-static-blog-publish-directory "~/Code/mysite/"
  "Directory where published HTML files are stored."
  :group 'org-static-blog)

(defcustom org-static-blog-posts-directory "~/Code/mysite/posts/"
  "Directory where published ORG files are stored.
When publishing, posts are rendered as HTML, and included in the
index, archive, tags, and RSS feed."
  :group 'org-static-blog)

(defcustom org-static-blog-drafts-directory "~/Code/mysite/drafts/"
  "Directory where unpublished ORG files are stored.
When publishing, draft are rendered as HTML, but not included in
the index, archive, tags, or RSS feed."
  :group 'org-static-blog)

...omitted because unchanged...

(defcustom org-static-blog-page-header "Customized Name of My Site"
  "HTML to put in the <head> of each page."
  :group 'org-static-blog)

Thank you for your help. It is very much appreciated!

from org-static-blog.

bastibe avatar bastibe commented on May 17, 2024

I still don't know the cause of your problem, and haven't been able to reproduce it yet. However, you should not edit org-static-blog.el at all. The customizations in your .emacs are sufficient for that (they overwrite the default values from org-static-blog.el).

Other than that, your config is identical to mine, so that's probably not the problem.

But, my Emacs is newer and my org-mode is older. Would you mind trying to run org-static-blog on Emacs 26.1 with its pre-installed version of org-mode to see if that's the problem? (Once we find the problem, we can hopefully fix it for your current Emacs).

from org-static-blog.

66tree avatar 66tree commented on May 17, 2024

Reinstalled org-static-blog via package-install to get a default org-static-blog.el back. I'm still receiving the same error so I'm going to install on a different system with emacs default org and report back.

from org-static-blog.

66tree avatar 66tree commented on May 17, 2024

I had a spare laptop with Ubuntu 16.04. I installed a "fresh" Emacs 24.5.1 with apt and Org 8.2.10 installed by default. I simply reused the .emacs configuration above changing the package repository code to the following:

(add-to-list 'package-archives
         '("melpa-stable" . "https://stable.melpa.org/packages/") t)

I replicated the same blog post file, issued a M-x org-static-blog-publish and the site generated. Not sure what it was yet but I'm going to try to fix my other install now.
Edit: Maybe I should have mentioned my original install was Ubuntu 18.04 and Emacs 25.2.2 with Org 9.2.

from org-static-blog.

66tree avatar 66tree commented on May 17, 2024

Is it possible that when I unintentionally upgraded Org from 8.x to 9.2 the html exporter broke due to this change?

from org-static-blog.

66tree avatar 66tree commented on May 17, 2024

Okay. Got it. On my original setup all I had to do was delete the org 9.2 package folder and export worked. I hope this issue I had helps someone. @bastibe Thank you for your help and for writing org-static-blog.

from org-static-blog.

bastibe avatar bastibe commented on May 17, 2024

Good to know that there are issues with 9.2, though. Thank you for your bug report, and investigation.

from org-static-blog.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.