Code Monkey home page Code Monkey logo

Comments (6)

greghendershott avatar greghendershott commented on August 23, 2024

@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!

from frog.

WillemDeGroef avatar WillemDeGroef commented on August 23, 2024

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 :)

from frog.

greghendershott avatar greghendershott commented on August 23, 2024

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.

from frog.

WillemDeGroef avatar WillemDeGroef commented on August 23, 2024

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 ;)

from frog.

greghendershott avatar greghendershott commented on August 23, 2024

@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.

from frog.

greghendershott avatar greghendershott commented on August 23, 2024

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.)

from frog.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.