Raised: $8,195
68% of monthly goal Help us cross the finish line!
Goal: $12,000
Raised: $8,195 Goal: $12,000
68% of monthly goal Help us cross the finish line!
Sponsor DDEV

Markdown Features Demo: Testing All Formatting Options

January 1, 2022 5 min read

Edit this page

This demonstration post showcases all the Markdown formatting features available for blog posts on ddev.com. It’s designed for testing the rendering of various Markdown elements.

Table of Contents

Callout Boxes

Note/Info Callout

ℹ️ Note

Did you know?

DDEV uses Docker containers to provide isolated development environments. This allows you to run multiple projects with different PHP versions, database engines, and configurations without conflicts.

You can also use :::info[] for the same blue-themed styling:

ℹ️ Info

Quick Reference

Use ddev describe to see all your project’s URLs, database credentials, and other configuration details in one place.

Tip Callout

💡 Tip

Pro Tip

Use ddev describe to see all your project’s URLs and credentials.

Here’s a tip without a custom title:

💡 Tip

Run ddev logs to troubleshoot issues with your project. Add -f to follow logs in real-time, or -s db to see database logs specifically.

Warning Callout

⚠️ Warning

Important

Make sure to commit your work before running destructive commands.

Another warning example:

⚠️ Warning

This command will delete your database. Make a backup first with ddev snapshot or ddev export-db > backup.sql.gz!

Danger Callout

🚨 Danger

Breaking Change

Version 2.0 removes support for the legacy configuration format. You’ll need to migrate your .ddev/config.yaml file.

Critical warning example:

🚨 Danger

Running this script in production will cause downtime. Always test destructive operations in a development environment first.

Callout with Multiple Paragraphs and Formatting

ℹ️ Note

Complex Content Example

This callout demonstrates that you can include multiple paragraphs and various formatting options within a single callout box.

You can use bold text to emphasize important points, italics for subtle emphasis, and inline code for commands or configuration values.

You can also include links to other resources and even lists:

  • First item with important information
  • Second item with related details
  • Third item with additional context

GitHub Flavored Markdown Features

The site supports GitHub Flavored Markdown (GFM) which adds several useful features:

URLs automatically become clickable links:

Strikethrough

You can strike through text using double tildes. This is useful for showing deprecated features or corrections.

Example: DDEV v1.0 required manual configuration DDEV now auto-detects project types.

Emoji Support

Emojis are automatically made accessible for screen readers:

  • 🚀 DDEV is fast and powerful
  • Tests passing
  • ⚠️ Warning message
  • 💡 Helpful tip
  • 🎉 Celebrate your success!

Standard Markdown Blockquotes

For simpler callouts that don’t need full styling, you can use standard Markdown blockquotes:

Note: This is a simple note using blockquote syntax.

Tip: Use ddev ssh to open a shell inside your web container.

Update: DDEV v1.25.0 includes support for Docker Compose v2 by default.

Code Blocks

Bash Commands

ddev start
ddev composer install
ddev npm install

Multi-line Bash with Comments

# Start your DDEV project
ddev start

# Import a database
ddev import-db --file=backup.sql.gz

# Run Composer commands
ddev composer require drupal/admin_toolbar

PHP Code

<?php

namespace Drupal\my_module\Controller;

use Drupal\Core\Controller\ControllerBase;

class MyController extends ControllerBase {
  public function content() {
    return [
      '#type' => 'markup',
      '#markup' => $this->t('Hello DDEV!'),
    ];
  }
}

JavaScript

const config = {
  host: "localhost",
  port: 3000,
  environment: "development",
}

function initializeApp() {
  console.log("Starting DDEV-powered app...")
  return config
}

YAML Configuration

name: my-project
type: php
docroot: web
php_version: "8.3"
database:
  type: mysql
  version: "8.0"
nodejs_version: "20"

JSON

{
  "name": "my-ddev-project",
  "version": "1.0.0",
  "scripts": {
    "dev": "ddev npm run dev",
    "build": "ddev npm run build"
  }
}

Internal blog links use filename references: Learn about DDEV performance

Root-relative links: Visit our support page

External links automatically open in a new tab with security attributes: DDEV Documentation

Reference-style links for cleaner Markdown:

Check out the Docker documentation and the Astro guide for more information.

ℹ️ Note

External Link Behavior

All external links (links to domains other than ddev.com) automatically get target="_blank" and rel="noopener noreferrer" attributes for security and usability. You don’t need to add these manually.

Lists

Unordered Lists

  • First item
  • Second item with bold text
  • Third item with inline code
    • Nested item one
    • Nested item two
      • Deeply nested item

Ordered Lists

  1. Start your DDEV project
  2. Configure your application
  3. Import your database
  4. Test your site
    1. Check the homepage
    2. Test user login
    3. Verify email functionality

Task Lists

  • Install DDEV
  • Create new project
  • Configure add-ons
  • Deploy to production

Typography Examples

Emphasis

This text has italic emphasis and this has italic emphasis too.

This text has bold emphasis and this has bold emphasis too.

You can combine bold and italic or italic and bold.

Inline Code

Use ddev start to start your project, ddev stop to stop it, and ddev restart to restart.

Strikethrough

This feature is deprecated Use the new feature instead.

Horizontal Rules

You can use horizontal rules to separate sections:


Content after the horizontal rule.

Tables

CommandDescriptionExample
ddev startStart project containersddev start
ddev stopStop project containersddev stop
ddev restartRestart project containersddev restart
ddev sshSSH into web containerddev ssh

Alignment in tables:

Left AlignedCenter AlignedRight Aligned
Item 1Item 2Item 3
ABC

Nested Content Examples

Callout with Code Block

💡 Tip

Running Commands Inside Containers

You can execute commands inside your DDEV containers using ddev exec:

# Run PHP commands
ddev exec php -v

# Run Composer
ddev exec composer require vendor/package

# Or use the shorthand
ddev composer require vendor/package

This is especially useful for debugging or running one-off commands.

List with Callouts

Here’s a workflow with embedded callouts:

  1. Start your project

    ddev start
  2. Configure your database

    ⚠️ Warning

    Make sure to snapshot your database before making changes: ddev snapshot

  3. Import your content

    ddev import-db --file=backup.sql.gz
  4. Verify everything works

    💡 Tip

    Use ddev launch to open your site in a browser automatically.

Images and Figures

Images are automatically wrapped in semantic <figure> elements with captions generated from alt text:

Installation speed
Installation speed

The alt text becomes the figure caption, improving both accessibility and visual presentation:

Weird installation graph
Weird installation graph
💡 Tip

Image Best Practices

  • Always include descriptive alt text (becomes the caption)
  • Keep images under 1-2MB
  • Use appropriate formats: JPEG for photos, PNG for screenshots, SVG for logos
  • Optimize with tools like ImageOptim before committing

Video Embeds

Videos should be wrapped in a .video-container div for responsive sizing:

Complex Combinations

🚨 Danger

Production Deployment Checklist

Before deploying to production, verify:

  1. Environment Configuration

    # Check environment variables
    ddev exec printenv
  2. Database Backup

    Always create a backup before deployment!

  3. Run Tests

    ddev exec phpunit
    ddev exec npm test
  4. Build Assets

    • Compile CSS and JavaScript
    • Optimize images
    • Clear caches

For more information, see the README or ask in DDEV Discord.

Conclusion

This demo post covers all the major Markdown features available for blog posts on ddev.com. Each section demonstrates different formatting capabilities that can be used when writing actual blog content.

Remember to check the MARKDOWN_FORMATTING.md guide for the latest syntax and examples.

Posted In