Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs] Is It Possible to Load Text from Site/Page Field? #1

Closed
luxlogica opened this issue Nov 3, 2018 · 2 comments
Closed

[Docs] Is It Possible to Load Text from Site/Page Field? #1

luxlogica opened this issue Nov 3, 2018 · 2 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@luxlogica
Copy link

luxlogica commented Nov 3, 2018

The docs show how we can configure the robots.txt by using config settings, but is it possible to load the text directly from a field?

Asking because we often setup sites that are going to be 'tweaked' by SEO experts, who sometimes like to change the content on robots.txt - and I'd rather they did this in the Panel, and not have to access the config.php file directly...

@luxlogica luxlogica changed the title [Docs [Docs] Is It Possible to Load Text from Site/Page Field? Nov 3, 2018
@bnomei bnomei self-assigned this Jan 8, 2019
@bnomei bnomei added good first issue Good for newcomers enhancement New feature or request labels Jan 8, 2019
bnomei added a commit that referenced this issue Jan 8, 2019
Signed-off-by: Bruno Meilick <b@bnomei.com>
@bnomei
Copy link
Owner

bnomei commented Jan 8, 2019

sorry. did not notice issue sooner. good idea. all options can be callbacks in v1.0.3.

@bnomei bnomei closed this as completed Jan 8, 2019
@bnomei bnomei pinned this issue Jan 8, 2019
@bnomei
Copy link
Owner

bnomei commented Jan 8, 2019

<?php
return [
    'bnomei.robots-txt.content' => function() {
        return site()->myRobotsTxtContentField()->value();
    },
];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants