Comments (6)
@WillemDeGroef Thank you. I understand the general idea, which is great. Just to confirm the specifics:
- 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.) - Currently an
<h1>
element -- either "All Posts" or "Posts tagged X" -- is automatically inserted as the first thing on index pages. Do you envision theheader.md
going above or below this? - Do you envision
header.md
going on...
a. index pages: Yes.
b. post pages: ??
c. non-post pages: ??
Thanks again!
from frog.
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 theheader.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 withinheader.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.
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:
- No one else but me uses Frog, so it's N/A. :)
- There does need to be some kind of template.
- 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.
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.
@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.
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)
- Host Frog over IPFS HOT 1
- Linking to images from Scribble files HOT 6
- Scribble cross-references to user-scope libraries HOT 4
- Switch from scribble/manual to something else HOT 3
- Requiring in the template is cumbersome HOT 2
- (Question) rational for mapping section and title to h1? HOT 1
- add-racket-doc-links doesn't work at non-toplevel HOT 1
- Date formatting weirdness HOT 6
- Different (current-posts-per-page) for some tags? HOT 3
- No index page generation without non-draft posts
- Undefined Tag to "Gotchas"
- Unicode URL slug gotcha HOT 3
- License status question HOT 2
- Document uri-prefix HOT 3
- MathJax 3 support HOT 7
- Fail regexp matching in `frog-version` HOT 6
- reStructuredText HOT 2
- How are descriptions determined for non-post pages?
- PDF documentation build fails HOT 3
- Feature request - livereload support
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 frog.