Skip to content

how do you create about section (sitelink)? #142

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
gnu-forever opened this issue Mar 4, 2025 · 4 comments
Open

how do you create about section (sitelink)? #142

gnu-forever opened this issue Mar 4, 2025 · 4 comments

Comments

@gnu-forever
Copy link

I have the following configuration:

(setq org-static-blog-publish-title "My blog")
(setq org-static-blog-publish-url "https://example.com/")
(setq org-static-blog-publish-directory "~/projects/org-static-blog/example.com/blog/")
(setq org-static-blog-posts-directory "~/projects/org-static-blog/example.com/blog/posts/")
(setq org-static-blog-drafts-directory "~/projects/org-static-blog/example.com/blog/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\" />")
(setq org-static-blog-page-preamble
      "<div class=\"header\">
<a href=\"https://www.example.com\">My blog site</a>
<div class=\"sitelinks\">
<a href=\"https://www.example.com/archive.html\">Archive</a> | <a href=\"https://www.example.com/about.html\">About</a>
</div>
</div>")
(setq org-static-blog-page-postamble
      "<div id=\"archive\">
<a href=\"https://www.example.com/archive.html\">Other posts</a>
</div>
<center>Generated with <a href=\"https://www.gnu.org/software/emacs\">emacs</a> (<a href=\"https://orgmode.org\">Org mode</a>)<br />Copyright &copy; 2025 - present - <a href=\"https://www.example.com/about.html\">Website</a><br />Powered by <a href=\"https://github.com/bastibe/org-static-blog\">org-static-blog</a> </center>")

How do you create the about.html?

I tried as a draft (about.org) but whenever I org-static-blog-publish, about.html gets generated in "~/projects/org-static-blog/example.com/drafts/about.html" with this href

<div class="post-date">02 Mar 2025</div><h1 class="post-title"><a href="https://example.com/../drafts/about.html">about</a></h1>

I expect about.html to be in "~/projects/org-static-blog/example.com/blog" where other html files are generated.

I didn't configure "~/projects/org-static-blog/example.com/drafts/"

Am I missing something?

Happy GNU.

@gnu-forever
Copy link
Author

By the way, I am using:

GNU Emacs 29.4
Org mode version 9.6.15
org-static-blog 1.6.0

@bastibe
Copy link
Owner

bastibe commented Mar 6, 2025

In my own blog, I put the about page into the drafts directory: https://github.com/bastibe/bastibe.github.com/blob/master/drafts/about.org https://bastibe.de/about.html

The drafts directory is actually kind of a misnomer. Drafts are simply blog posts that are not part of the timeline.

@gnu-forever
Copy link
Author

I installed the package from melpa. It is now working.

The version 1.6.0 on melpa stable still has the issue.

Thank you very much for this wonderful software.

Happy GNU!

@bastibe
Copy link
Owner

bastibe commented Mar 17, 2025

I see the latest release is indeed very old. I'll tag a new stable version soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants