emacsorphanage / org-page

[INACTIVE] A static site generator based on Emacs and org mode.
673 stars 99 forks source link

Generate content on main index page #180

Closed Linuus closed 8 years ago

Linuus commented 8 years ago

Hi!

I'm trying to create my blog with org-page but have som questions.

  1. The main index file is static? Can I replace it with a list of my posts (like the archive page) instead? (Like this http://nick.balestra.ch)
  2. Can I preview the site before committing? It seems I have to stage and commit locally before previewing, is that correct?

Thanks

sillykelvin commented 8 years ago
  1. if you do not provider an index.org, org-page will generate one index page for you, basically it's a list of posts.
  2. yes, you can, there is a function doing this job: op/do-publication-and-preview-site.
Linuus commented 8 years ago
  1. Oh, nice. I'll try that!
  2. Yes, I ran that function but it didn't update anything unless I did a commit first.
    • Edit files
    • Run op/do-publication-and-preview-site => No updates in preview
    • Commit changes
    • Run op/do-publication-and-preview-site => Changes are displayed

Is that the intended behavior?

Update Removing the index.org file did work. Thanks.

I hade to delete it, stage and commit the deletion before I could preview it. Otherwise it complained that it could find the index file.

Linuus commented 8 years ago

Another update. So the issue with content not being previewed was that it must be added to git first. So when you create a new blog post it must be staged before you can preview it. After that you can just add away and run the preview command. Cool!

Trevoke commented 8 years ago

This is one of those things that should probably be added to the Readme :)

sandric commented 8 years ago

Looks like its not working now - if I remove index.org file I get in messages buffer Opening input file: No such file or directory, /Users/sandric/.emacs.d/sandric.github.io/index.org

sillykelvin commented 8 years ago

try removing and then committing the change?