Categories & Tags

Organize your content with categories and tags. Categories provide broad groupings for your posts, while tags offer flexible cross-cutting labels.

Categories

Categories are broad groupings for organizing your posts. Think of them like folders -- each post can go into one folder. For example, you might create categories like "News," "Tutorials," and "Company Updates."

Each category has:

  • Name: The display name shown on your site (for example, "Tutorials"). Each category name must be unique.
  • Slug: A URL-friendly version of the name (for example, tutorials). This is generated automatically from the name and is used in the category's page URL.

To manage categories, go to the Categories section in the admin sidebar. From there you can create new categories, rename existing ones, or delete categories you no longer need.

Screenshot: Categories management page showing list of categories with post counts
Note

A category cannot be deleted if it still has posts assigned to it. Reassign or remove posts from the category first, then delete it.

Tags

Tags are more specific labels you can apply to posts. Unlike categories, a post can have many tags, and tags work across categories. They are perfect for cross-referencing content by topic.

For example, a post in the "Tutorials" category might be tagged with "ruby," "performance," and "beginner." A post in the "News" category might also be tagged with "ruby." Visitors can then click the "ruby" tag to see all posts about that topic, regardless of category.

A few things to know about tags:

  • Always lowercase and trimmed: Tags are automatically converted to lowercase and any extra whitespace is removed, so "Ruby," " ruby," and "ruby" are all treated as the same tag.
  • Created on the fly: When you type a tag name while editing a post, RailsPress creates the tag automatically if it does not already exist.
  • Comma-separated: When adding tags to a post, type the tag names separated by commas -- for example, "ruby, performance, tips."
  • Unique names: Each tag name must be unique (case-insensitive). Duplicate names are prevented automatically.

You can also manage tags from the Tags section in the admin sidebar -- to rename tags, review which posts use them, or delete tags that are no longer needed.

Screenshot: Tags management page showing list of tags with usage counts

Assigning Categories and Tags

When you are creating or editing a post, the sidebar includes fields for both category and tags.

  • Category: Select a category from the dropdown. Each post can belong to one category. If you do not select a category, the post will remain uncategorized.
  • Tags: Type tag names separated by commas. For example: "ruby, beginner, web development." Existing tags are matched automatically (including slug-style input), and missing tags are created when you save.

You can change a post's category or tags at any time by editing the post and updating these fields.

Readers can browse your blog by category or tag -- each one has its own page that shows all matching posts. This helps visitors discover related content and explore topics they are interested in.

Tip

Use categories for broad topics (like "News" or "Tutorials") and tags for specific subjects (like "ruby" or "performance"). This gives your readers two different ways to find the content they care about.