Spacing
A. Today
A page on this site starts life as an idea in a notes file and ends up as a row in a database, and most of what happens in between is boring on purpose. The writing lives in one place, the metadata lives in another, and a small amount of glue keeps the two honest. That glue is the part worth getting right, because when it works nobody notices it, and when it doesn't, a page quietly goes missing from a list and nobody can say why.
How pages get here
There are two kinds of pages. Some are written as markdown and stored in the database, and some are written as code and live in the repository next to the components they use. Both end up in the same table, which is what lets one search find either kind. The difference only shows up when you want to edit one: markdown goes through the content tools, and code goes through your editor and a push.
A code page is identified by the id on the first line of its page.tsx, not by where it sits, so the folder can move without the page losing its history. The sync sends each page's path and toc to goatboat on every push to main, and anything it stops sending is hidden until the file returns.
Before you push
- Make sure the new page has a title and a one-line description.
- Check that nothing was copied along with another page's id, because two files with the same id make the stamp refuse to run, and the commit hook fails in the same way, which is confusing the first time it happens.
- Push to
main. - Open the notes list and look for the page. If it isn't there, it probably has no project or section yet, which is the most common reason by a wide margin and the easiest to fix.
The steps, in order
- Write the page as a file under the notes folder, with a title and a few headings so the contents list has something to show.
- Run the stamp so the file gets its id, then push, and wait for the sync to finish, which usually takes under a minute.
- Give it a project, a section and a short description, so it shows up where people will look for it.
Most of what makes a page feel well made is spacing, and most of what makes spacing feel wrong is that two things are almost the same distance apart.
When it gets tight
This one is the stress test, with as much inline code as a real note ever has. Each of createContent(), updateContent() and moveContent() goes through ops.ts, so a change made in drizzle studio skips extractToc(body) and leaves content.toc stale until the next write. The renderer maps h2 through h6 to H2 through H6, a fenced block to CodeBlock and a link to NextLink, and it drops raw div and script tags before they reach PageBody.
A closing paragraph of plain text, so you can see the gap that follows a stress test and how a normal paragraph sits against the heading above it. It should be long enough to wrap onto at least two lines, which this one now is.
B. Slightly tighter
A page on this site starts life as an idea in a notes file and ends up as a row in a database, and most of what happens in between is boring on purpose. The writing lives in one place, the metadata lives in another, and a small amount of glue keeps the two honest. That glue is the part worth getting right, because when it works nobody notices it, and when it doesn't, a page quietly goes missing from a list and nobody can say why.
How pages get here
There are two kinds of pages. Some are written as markdown and stored in the database, and some are written as code and live in the repository next to the components they use. Both end up in the same table, which is what lets one search find either kind. The difference only shows up when you want to edit one: markdown goes through the content tools, and code goes through your editor and a push.
A code page is identified by the id on the first line of its page.tsx, not by where it sits, so the folder can move without the page losing its history. The sync sends each page's path and toc to goatboat on every push to main, and anything it stops sending is hidden until the file returns.
Before you push
- Make sure the new page has a title and a one-line description.
- Check that nothing was copied along with another page's id, because two files with the same id make the stamp refuse to run, and the commit hook fails in the same way, which is confusing the first time it happens.
- Push to
main. - Open the notes list and look for the page. If it isn't there, it probably has no project or section yet, which is the most common reason by a wide margin and the easiest to fix.
The steps, in order
- Write the page as a file under the notes folder, with a title and a few headings so the contents list has something to show.
- Run the stamp so the file gets its id, then push, and wait for the sync to finish, which usually takes under a minute.
- Give it a project, a section and a short description, so it shows up where people will look for it.
Most of what makes a page feel well made is spacing, and most of what makes spacing feel wrong is that two things are almost the same distance apart.
When it gets tight
This one is the stress test, with as much inline code as a real note ever has. Each of createContent(), updateContent() and moveContent() goes through ops.ts, so a change made in drizzle studio skips extractToc(body) and leaves content.toc stale until the next write. The renderer maps h2 through h6 to H2 through H6, a fenced block to CodeBlock and a link to NextLink, and it drops raw div and script tags before they reach PageBody.
A closing paragraph of plain text, so you can see the gap that follows a stress test and how a normal paragraph sits against the heading above it. It should be long enough to wrap onto at least two lines, which this one now is.
C. Tight
A page on this site starts life as an idea in a notes file and ends up as a row in a database, and most of what happens in between is boring on purpose. The writing lives in one place, the metadata lives in another, and a small amount of glue keeps the two honest. That glue is the part worth getting right, because when it works nobody notices it, and when it doesn't, a page quietly goes missing from a list and nobody can say why.
How pages get here
There are two kinds of pages. Some are written as markdown and stored in the database, and some are written as code and live in the repository next to the components they use. Both end up in the same table, which is what lets one search find either kind. The difference only shows up when you want to edit one: markdown goes through the content tools, and code goes through your editor and a push.
A code page is identified by the id on the first line of its page.tsx, not by where it sits, so the folder can move without the page losing its history. The sync sends each page's path and toc to goatboat on every push to main, and anything it stops sending is hidden until the file returns.
Before you push
- Make sure the new page has a title and a one-line description.
- Check that nothing was copied along with another page's id, because two files with the same id make the stamp refuse to run, and the commit hook fails in the same way, which is confusing the first time it happens.
- Push to
main. - Open the notes list and look for the page. If it isn't there, it probably has no project or section yet, which is the most common reason by a wide margin and the easiest to fix.
The steps, in order
- Write the page as a file under the notes folder, with a title and a few headings so the contents list has something to show.
- Run the stamp so the file gets its id, then push, and wait for the sync to finish, which usually takes under a minute.
- Give it a project, a section and a short description, so it shows up where people will look for it.
Most of what makes a page feel well made is spacing, and most of what makes spacing feel wrong is that two things are almost the same distance apart.
When it gets tight
This one is the stress test, with as much inline code as a real note ever has. Each of createContent(), updateContent() and moveContent() goes through ops.ts, so a change made in drizzle studio skips extractToc(body) and leaves content.toc stale until the next write. The renderer maps h2 through h6 to H2 through H6, a fenced block to CodeBlock and a link to NextLink, and it drops raw div and script tags before they reach PageBody.
A closing paragraph of plain text, so you can see the gap that follows a stress test and how a normal paragraph sits against the heading above it. It should be long enough to wrap onto at least two lines, which this one now is.
D. Tighter
A page on this site starts life as an idea in a notes file and ends up as a row in a database, and most of what happens in between is boring on purpose. The writing lives in one place, the metadata lives in another, and a small amount of glue keeps the two honest. That glue is the part worth getting right, because when it works nobody notices it, and when it doesn't, a page quietly goes missing from a list and nobody can say why.
How pages get here
There are two kinds of pages. Some are written as markdown and stored in the database, and some are written as code and live in the repository next to the components they use. Both end up in the same table, which is what lets one search find either kind. The difference only shows up when you want to edit one: markdown goes through the content tools, and code goes through your editor and a push.
A code page is identified by the id on the first line of its page.tsx, not by where it sits, so the folder can move without the page losing its history. The sync sends each page's path and toc to goatboat on every push to main, and anything it stops sending is hidden until the file returns.
Before you push
- Make sure the new page has a title and a one-line description.
- Check that nothing was copied along with another page's id, because two files with the same id make the stamp refuse to run, and the commit hook fails in the same way, which is confusing the first time it happens.
- Push to
main. - Open the notes list and look for the page. If it isn't there, it probably has no project or section yet, which is the most common reason by a wide margin and the easiest to fix.
The steps, in order
- Write the page as a file under the notes folder, with a title and a few headings so the contents list has something to show.
- Run the stamp so the file gets its id, then push, and wait for the sync to finish, which usually takes under a minute.
- Give it a project, a section and a short description, so it shows up where people will look for it.
Most of what makes a page feel well made is spacing, and most of what makes spacing feel wrong is that two things are almost the same distance apart.
When it gets tight
This one is the stress test, with as much inline code as a real note ever has. Each of createContent(), updateContent() and moveContent() goes through ops.ts, so a change made in drizzle studio skips extractToc(body) and leaves content.toc stale until the next write. The renderer maps h2 through h6 to H2 through H6, a fenced block to CodeBlock and a link to NextLink, and it drops raw div and script tags before they reach PageBody.
A closing paragraph of plain text, so you can see the gap that follows a stress test and how a normal paragraph sits against the heading above it. It should be long enough to wrap onto at least two lines, which this one now is.
E. Tightest
A page on this site starts life as an idea in a notes file and ends up as a row in a database, and most of what happens in between is boring on purpose. The writing lives in one place, the metadata lives in another, and a small amount of glue keeps the two honest. That glue is the part worth getting right, because when it works nobody notices it, and when it doesn't, a page quietly goes missing from a list and nobody can say why.
How pages get here
There are two kinds of pages. Some are written as markdown and stored in the database, and some are written as code and live in the repository next to the components they use. Both end up in the same table, which is what lets one search find either kind. The difference only shows up when you want to edit one: markdown goes through the content tools, and code goes through your editor and a push.
A code page is identified by the id on the first line of its page.tsx, not by where it sits, so the folder can move without the page losing its history. The sync sends each page's path and toc to goatboat on every push to main, and anything it stops sending is hidden until the file returns.
Before you push
- Make sure the new page has a title and a one-line description.
- Check that nothing was copied along with another page's id, because two files with the same id make the stamp refuse to run, and the commit hook fails in the same way, which is confusing the first time it happens.
- Push to
main. - Open the notes list and look for the page. If it isn't there, it probably has no project or section yet, which is the most common reason by a wide margin and the easiest to fix.
The steps, in order
- Write the page as a file under the notes folder, with a title and a few headings so the contents list has something to show.
- Run the stamp so the file gets its id, then push, and wait for the sync to finish, which usually takes under a minute.
- Give it a project, a section and a short description, so it shows up where people will look for it.
Most of what makes a page feel well made is spacing, and most of what makes spacing feel wrong is that two things are almost the same distance apart.
When it gets tight
This one is the stress test, with as much inline code as a real note ever has. Each of createContent(), updateContent() and moveContent() goes through ops.ts, so a change made in drizzle studio skips extractToc(body) and leaves content.toc stale until the next write. The renderer maps h2 through h6 to H2 through H6, a fenced block to CodeBlock and a link to NextLink, and it drops raw div and script tags before they reach PageBody.
A closing paragraph of plain text, so you can see the gap that follows a stress test and how a normal paragraph sits against the heading above it. It should be long enough to wrap onto at least two lines, which this one now is.
F. Half-line gaps
A page on this site starts life as an idea in a notes file and ends up as a row in a database, and most of what happens in between is boring on purpose. The writing lives in one place, the metadata lives in another, and a small amount of glue keeps the two honest. That glue is the part worth getting right, because when it works nobody notices it, and when it doesn't, a page quietly goes missing from a list and nobody can say why.
How pages get here
There are two kinds of pages. Some are written as markdown and stored in the database, and some are written as code and live in the repository next to the components they use. Both end up in the same table, which is what lets one search find either kind. The difference only shows up when you want to edit one: markdown goes through the content tools, and code goes through your editor and a push.
A code page is identified by the id on the first line of its page.tsx, not by where it sits, so the folder can move without the page losing its history. The sync sends each page's path and toc to goatboat on every push to main, and anything it stops sending is hidden until the file returns.
Before you push
- Make sure the new page has a title and a one-line description.
- Check that nothing was copied along with another page's id, because two files with the same id make the stamp refuse to run, and the commit hook fails in the same way, which is confusing the first time it happens.
- Push to
main. - Open the notes list and look for the page. If it isn't there, it probably has no project or section yet, which is the most common reason by a wide margin and the easiest to fix.
The steps, in order
- Write the page as a file under the notes folder, with a title and a few headings so the contents list has something to show.
- Run the stamp so the file gets its id, then push, and wait for the sync to finish, which usually takes under a minute.
- Give it a project, a section and a short description, so it shows up where people will look for it.
Most of what makes a page feel well made is spacing, and most of what makes spacing feel wrong is that two things are almost the same distance apart.
When it gets tight
This one is the stress test, with as much inline code as a real note ever has. Each of createContent(), updateContent() and moveContent() goes through ops.ts, so a change made in drizzle studio skips extractToc(body) and leaves content.toc stale until the next write. The renderer maps h2 through h6 to H2 through H6, a fenced block to CodeBlock and a link to NextLink, and it drops raw div and script tags before they reach PageBody.
A closing paragraph of plain text, so you can see the gap that follows a stress test and how a normal paragraph sits against the heading above it. It should be long enough to wrap onto at least two lines, which this one now is.
Related
- Hover speed
- Hover highlights
- Responsive report
- Layouts with route groups
The plan to give each kind of page its own layout with Next.js route groups: (site), (notes) with a left notes aside, (bare), and (artifacts) for self-contained HTML files.