Skip to content
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

Specify page location for "all posts" index page #54

Closed
shofetim opened this issue Oct 6, 2013 · 5 comments
Closed

Specify page location for "all posts" index page #54

shofetim opened this issue Oct 6, 2013 · 5 comments
Assignees

Comments

@shofetim
Copy link

shofetim commented Oct 6, 2013

I would like to generate a site that includes a blog, rather then a site that is a blog. So I would like to have full control over the top level index page, and then have the blog or "all posts" index page at a different url, like /blog/index.html

I think the change would mean a new configuration option in .frogrc,

Default to index.html to keep the existing behavior

all-posts-index = index.html

and then use the setting in frog.rkt around line 641.

Great job BTW.

@greghendershott
Copy link
Owner

I was wondering if/when someone would ask for that. :)

If it's just the index files (plural because there can be index2.html ... indexN.html) then I think the config var as you suggest is probably the way to go and should be straightforward to do.

However can you help me understand what you would want to be done with some other files and dirs currently written to the site root?

  1. /feeds/*: Is it OK for this to remain at site root?
  2. /sitemap.txt: Is it OK for this to be put at site root, or would you want to disable it since you'll generate one for your full site?
  3. /img/posts/*: This is used for Scribble format posts that generate images. Is it OK for that posts subdir to be glommed into /img:

p.s. This FR is a bit awkward timing as I'll likely be away from a dev computer for about a week, starting a few days from now. Not trying to duck doing this, ever. Just want to be up-front that it might be a couple weeks if I'm to do anything non-trivial, safely. Thank you again for the great feature request.

@shofetim
Copy link
Author

shofetim commented Oct 9, 2013

I think the /feeds/* is alright, it seems like a good namespace for what it is. I suppose someone could want a "feeds" that wasn't RSS (an agricultural site selling animal "feeds"?) but I think that would be and edge case and best left that way.

Anything in the /img/, /js/, /css/ seems good by me. They usually get a little cluttered by the default paths in 3rd party js & css libraries anyway.

I think leaving the sitemap.txt at the site root is a good idea, and very handy actually. So far the sitemap has caught every page I have (including my index page, though it seemed to like an empty _src/index.md to pick it up). I'm not sure that it will be possible, but it looks like since markdown just passes through all html, every page on the site will be in _src/ and automatically included in the sitemap.txt. Keeps things nice and simple. As a work around I've changed line 640-641 from

;; Write the index page for all posts
(write-index-pages posts (current-title) #f "all"
                     (build-path (www-path) "index.html"))

to

;; Write the index page for all posts
(write-index-pages posts (current-title) #f "all"
                     (build-path (www-path) "blog" "index.html"))

Which keeps things humming right along for me.

@greghendershott
Copy link
Owner

Thanks for the extra information! The scenario where you're generating all (or almost all) of the whole site using Frog, is simpler. (I misunderstood maybe you wanted Frog to co-exist as a subset of a site generated mostly in other ways, which would have more opportunity for conflicts with things like /sitemap.txt, and so on.,)

I'm glad the change you made is working fine for you. I'll update Frog with similar when I'm able to (within the next week). Thanks again.

@greghendershott
Copy link
Owner

@shofetim I pushed a commit to close this. You might want to use that instead of your local change, because my commit covers a couple other things (such as the URI used for the Atom and RSS feeds).

Thanks again for the feature request.

greghendershott pushed a commit that referenced this issue Oct 16, 2013
The default should be /index.html.

While I'm at it, improve the comments.
@shofetim
Copy link
Author

Thank you, it looks great!

greghendershott pushed a commit that referenced this issue Oct 20, 2013
* 'master' of github.com:greghendershott/frog:
  Fix default in commit 0e810e7 for issue #54.
  Add posts-index-uri .frogrc var. Closes #54.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants