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

Add the option to include a header.md file before the index list #16

Closed
WillemDeGroef opened this issue Mar 25, 2013 · 6 comments
Closed
Assignees

Comments

@WillemDeGroef
Copy link
Contributor

+---------------+
| navbar
+---------------+
| header.md
+---------------+
| post 1
| post 2
| ...
| post N
+---------------+

@greghendershott
Copy link
Owner

@WillemDeGroef Thank you. I understand the general idea, which is great. Just to confirm the specifics:

  1. Could you share an example of how would you use this? (One reason I ask: Although I agree there should be a general header.md, maybe there should also be an even easier way to do what you have in mind.)
  2. Currently an <h1> element -- either "All Posts" or "Posts tagged X" -- is automatically inserted as the first thing on index pages. Do you envision the header.md going above or below this?
  3. Do you envision header.md going on...
    a. index pages: Yes.
    b. post pages: ??
    c. non-post pages: ??

Thanks again!

@WillemDeGroef
Copy link
Contributor Author

I quickly hacked a hardcore version of my idea in frog, so that is driving my answers:

  • I had the header.md only on the index page. Basically, I wanted the index page to become a non-post page (consisting of the header.md contents) with a list of the N latest blog posts.
  • I removed the <h1> tag on the index page, because it could easily be replaced with an appropriate tag within header.md.

Actually, I also inserted a right-sidebar.md to enhance the right-sidebar e.g. with a short Bio or a list of links to interesting sites.

I have a feeling that in the long term, their should be a template outside of frog.rkt, but having some hardcoded includes would already be a big step forward :)

@greghendershott
Copy link
Owner

Yeah the bodies->page function has always felt weird to me, because it effectively bakes in the layout. Although that lets a number of features just-work out-of-the-box, it's also limiting.

For the time being I've imagined it will work out in one of the following ways:

  1. No one else but me uses Frog, so it's N/A. :)
  2. There does need to be some kind of template.
  3. Perhaps people will just fork/mod. (So just make sure it's fork/mod friendly.)

At times I've actually leaned towards 3, because (a) does the world need Yet Another Template System, and (b) would it be any easier than xexprs in plain Racket? But we'll see. It could also just turn out to be 1. :)

Actually maybe there's also:

Four. Have bodies->page be "overridable". Which could have the pros of fork/mod without (most of) the downsides.

@WillemDeGroef
Copy link
Contributor Author

I would also go for option 3.
I'll fork and add a line of two of code to include a header.md for the index page ;)

@greghendershott
Copy link
Owner

@dherman would also like, at least, the ability to change the <h1> and <title> on the main site index.html from "All Posts" to something else.

@greghendershott
Copy link
Owner

I ended up naming the file homehead.md instead of header.md because it only applies to the home page, and I wanted the name to make that clear.

(By contrast footer.md does go into the <footer> element for every page.)

greghendershott pushed a commit that referenced this issue May 24, 2013
Related to Issue #16.

This isn't a full-on template for the entire HTML of the page, but it
allows control over the main "content" <div>.
@ghost ghost assigned greghendershott May 29, 2013
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