# Make Page Command

The `make:page` command allows you to create a new page - including [page data class](/stancy/basics/pagedata.md) and [content file](/stancy/basics/content.md).

```bash
php artisan make:page Post --collection=blog
```

This command will create the following two files.

{% tabs %}
{% tab title="app/Pages/Post.php" %}

```php
<?php

namespace App\Pages;

use Astrotomic\Stancy\Models\PageData;
use Astrotomic\Stancy\Traits\PageHasContent;
use Astrotomic\Stancy\Traits\PageHasDate;
use Astrotomic\Stancy\Traits\PageHasOrder;
use Astrotomic\Stancy\Traits\PageHasSlug;

class Post extends PageData
{

}
```

{% endtab %}

{% tab title="resources/content/blog/post.md" %}

```
---
_pageData: \App\Pages\Post
_view: null
---
```

{% endtab %}
{% endtabs %}

After this you can rename the created markdown file, add the view to use and your content.

{% hint style="info" %}
The `make:page` command works with sheet collections with markdown, JSON or YAML content (`.md`, `.json`, `.yaml`, `.yml`). For all other extensions it will only create an empty file.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.astrotomic.info/stancy/basics/make-command.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
