Welcome

Welcome to the notes interface

This is the standalone notes interface. It provides a flexible way to organize and present your markdown content with a clean, navigable sidebar and automatic table of contents generation.

Overview

This notes interface provides a clean, modern way to display your content with table of contents, smooth scrolling, and hash-based navigation. Whether you're creating documentation, a personal knowledge base, or course materials, this system is designed to make your content easily accessible and pleasant to read.

The interface automatically extracts headings from your markdown files and generates a navigable table of contents. Each section gets its own anchor link, allowing you to share direct links to specific parts of any note. This makes collaboration and reference sharing straightforward and intuitive.

Features

  • Table of contents that updates on scroll - The table of contents automatically highlights the current section as you scroll through the content, giving you a clear sense of where you are in the document.
  • Hash-based URL navigation - Each section gets a unique URL hash that you can share with others to jump directly to that specific part of the note.
  • Smooth scrolling between sections - Clicking on table of contents items smoothly scrolls to the corresponding section rather than jumping abruptly.
  • Mobile-friendly responsive design - The interface works well on devices of all sizes, from large desktop monitors to mobile phones.

The table of contents is particularly useful for longer documents where readers might want to skip to specific sections or get an overview of the content before diving in. It provides an at-a-glance view of the document structure without requiring readers to scroll through everything.

Getting Started

Getting up and running with this notes system is straightforward. You'll need to add your content files to the appropriate directory and register them in the sidebar configuration. The system handles all the rendering and navigation automatically.

  1. Add your .mdx files to the content folder - Place your markdown files with the .mdx extension in the content/ directory at the root of the project. These files will become your notes.
  2. Update lib/data.ts to add them to the sidebar - Open the lib/data.ts file and add your new notes to the units array to make them appear in the sidebar navigation.

When creating new notes, make sure to include proper frontmatter at the top of each file. This includes at minimum a title and description, which are used for the sidebar label and SEO purposes if applicable.

Configuration

The notes system is highly configurable through several mechanisms. You can customize the sidebar structure, control which notes appear in navigation, and adjust how content is displayed.

Content Directory

By default, content is loaded from the content/ folder. This is where all your .mdx files should reside. The system reads these files at build time, so adding new content requires a rebuild to appear in the interface.

The content directory is set in lib/getNotes.ts if you need to change it for any reason. This might be useful if you want to organize content in multiple directories or use a different location for your files.

The sidebar is controlled by the units array in lib/data.ts. Each unit represents a group of related notes, and within each unit you can add multiple topic items. The structure allows for flexible organization of your content into logical sections.

You can create nested hierarchies by adding more units, and each item in a unit needs a topic name (displayed in the sidebar) and a slug (the filename without the .mdx extension). The slug must match the filename of your content file for the link to work correctly.

{
  title: "Unit Title",
  items: [
    { topic: "Note Title", slug: "note-filename" }
  ]
}

The system automatically generates previous and next navigation links based on the order of items in the sidebar. This creates a natural reading flow through your notes, allowing readers to move sequentially through related content without returning to the sidebar each time.

If you need to customize the navigation order, simply reorder the items in the units array in lib/data.ts. The system will automatically adjust the previous and next links accordingly.

Content Format

Your notes are written in MDX, which combines the simplicity of markdown with the power of JSX. This means you can use standard markdown syntax for formatting while also embedding React components if needed.

Markdown Features

The markdown parser supports all standard markdown features including headings, lists, code blocks, links, images, tables, and more. You can use the full range of markdown syntax to format your content effectively.

Code blocks support syntax highlighting for many programming languages, making this system ideal for technical documentation. Simply specify the language after the opening triple backticks and the syntax will be highlighted automatically.

Custom Components

Since MDX supports JSX, you can create and import custom components to enhance your notes. This might include interactive demos, callout boxes, or specialized UI elements that wouldn't be possible with plain markdown.

For most use cases, standard markdown provides all the formatting capabilities you'll need. The MDX support is there if you need to create more advanced interactive content.

Best Practices

When creating notes for this system, consider the following best practices to get the most out of the interface and provide the best experience for readers.

Writing Effective Notes

Structure your notes with clear headings that accurately describe the content that follows. This helps the table of contents accurately represent your document and makes it easier for readers to find what they're looking for. Each major section should have at least one heading, and you can use multiple heading levels to create a clear hierarchy.

Keep paragraphs focused on a single idea or topic. This makes your content easier to scan and understand. If you find a paragraph is getting too long, consider breaking it into multiple paragraphs or creating a new subsection.

Organizing Content

Group related notes together in the same unit in the sidebar. This helps readers navigate between related topics without having to search through unrelated content. Think about the logical flow of information and arrange your notes to match how someone would naturally learn about the subject.

Consider adding an introductory note for each unit that provides an overview of what will be covered. This gives readers context before they dive into the specific topics and helps them understand how the pieces fit together.