Comments (6)
I see this in the readme.org:
But even if the html files already exist, they are being re rendered.
from org-static-blog.
Only the changed org-file should be re-exported. Regrettably, this does change all the ids in the HTML file, as they seem to be randomly generated by org-mode on every export. (If anyone knows a way of preventing that, I'd be most interested!) Existing HTML files should not be changed, however.
You can check out my own config to see if there are any notable differences between yours and mine. You could also try to configure your org-static-blog with absolute directory paths instead of relative ones. I've run into no ends of problems with that sort of thing, so that's perhaps worth a try.
from org-static-blog.
"Only the changed org-file should be re-exported."
"Existing HTML files should not be changed, however."
I tried making a little experiment. Today is Dec 18th. I have launched emacs with "emacs -q" not to load any additional configuration.
As we can see in the image I have 3 org files in /home/nixos/GIT/org-static-blog/org directory
- Dec 16 18:46 alpine.org
- Dec 11 19:24 crontab__code_linux.org
- Dec 16 10:01 windows-keybindings__windows.org
I have just generated them all, so we can see the html file creation time is Dec 18th, 06:23:
- Dec 18 06:23 alpine.html
- Dec 18 06:23 archive.html
- Dec 18 06:23 crontab__code_linux.html
- Dec 18 06:23 index.html
- Dec 18 06:23 rss.xml
- Dec 18 06:23 tag-code.html
- Dec 18 06:23 tag-linux.html
- Dec 18 06:23 tags.html
- Dec 18 06:23 tag-windows.html
- Dec 18 06:23 windows-keybindings__windows.html
I will go and modify one org file called "crontab__code_linux.org", which was last modified on Dec 11th.
Now I will regenerate the html files wiht my build command:
We can see that 6:44 I have changed the org file, then 06:45 I have regenerated the the html files and instead of only regenerating "crontab__code_linux.html", ALL html files got regenerated
So in the "Archive" page or in the post page, the date that we will see will not be from
- #+date: [2023-11-25 Sat 19:05] field that we specify in each org file (which would be my goal)
- from the actual org file creation date
But it wil always be the date of when the file was generated. Which will always be the date when you make a change to ANY of your .org file.
I wish there was a way to use these in org-static-blog export:
So I would clearly see the date that I specify in org file, the a clear date when the file was created and when the file was modified.
In org-static-blog it seems that I only can see the date modifed, which changes with each change in any of the org file it seems.
from org-static-blog.
Placed the above for reference, what I will try now is:
- create new posts with
org-static-blog-create-new-post
instead any other way - try to use absolute directory paths instead of relative ones
will let you know how it goes
from org-static-blog.
Okay so seems like having org-static-blog configuration in a separate file like I have(build-site.el
) and then running it with build.sh
script (like I described in my initial message) to generate the html files is responsible for this strange behavior where everything gets re-rendered.
IF I place my org-static-blog configuration(build-site.el
) content into my emacs config, together with the rest of the packages - the behavior is proper, ONLY the modified .org files get re-rendered.
So basically this way of having multiple org-static-blog configs for different blogs does not really work(by the way, got this idea here - https://systemcrafters.net/publishing-websites-with-org-mode/building-the-site/ ).
from org-static-blog.
Thank you for your deep analysis!
Org-static-blog decides who gets re-rendered in the function org-static-blog-needs-publishing-p
, which simply checks file modification dates of pub-filename
and post-filename
. I bet it trips up with the pub-filename
generation, probably due to some unresolved path thing. Emacs and path normalization is often an issue.
But I have no idea how that could be related to having the config in a different place.
Regarding dates, the #+date
(and #+title
) field is extracted from the post with a simple regex search. It would be simple to additionally extract some other fields. It's not quite so simple to include them in your templates, however, as the formatting is currently implemented with the builtin format-time-string
, which uses a single date.
from org-static-blog.
Related Issues (20)
- Drafts are published to directory relative to posts directory instead of drafts directory HOT 6
- Warning : 'the function ‘list-length’ is not known tobe defined.' HOT 1
- customize index page HOT 3
- Publish not working all the time HOT 1
- Generated blog posts goes to "example.com/$file-name" HOT 1
- Switch from ox-publish to org-static-blog HOT 1
- Cannot output files to blog directory HOT 5
- Have `index.html` and other `html` files in different locations HOT 1
- Unknown "nil" back-end: Aborting export HOT 7
- Annoying warnings HOT 1
- Is this still maintained? HOT 3
- Last package (20221018.933) is broken. Just a typo. HOT 2
- Backend unset or broken: `org-export-barf-if-invalid-backend: Unknown "nil" back-end: Aborting export` HOT 4
- Is there a way to run multiple blogs with this package? HOT 1
- Icorrect table rendering HOT 6
- Show only post titles in multipost pages (no preview, no contents) HOT 4
- Is it possible to support navigation in tags.html HOT 1
- Add a publish-to (eg local/prod) function? HOT 2
- Perhaps use `org-collect-keywords` to extract date? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from org-static-blog.