Skip to content

Commit

Permalink
fix: docs typos
Browse files Browse the repository at this point in the history
  • Loading branch information
BernhardBaumrock committed Apr 2, 2023
1 parent fc53fdf commit 96b04fc
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 8 deletions.
4 changes: 2 additions & 2 deletions docs/alfred/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ It has two main goals:

See the video here: https://www.youtube.com/watch?v=7CoIj--u4ps&t=1714s

## Easier frontend editing for your clients
## Easier Frontend Editing for Your Clients

A typical example that almost every website has are footer links - that's why RockFrontend comes with a migration that creates a footerlinks field for you. It creates that field on the `home` page and the client can manage the footerlinks by editing the `home` page in the PW backend.

Expand Down Expand Up @@ -55,7 +55,7 @@ When using regular PHP templates simply use `<?= alfred(...) ?>` instead of `{al
>
```

## Easier development
## Easier Development

<img src=footer.png class=blur>

Expand Down
1 change: 0 additions & 1 deletion docs/left.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@

- Introduction
- Quickstart
- Module Config
46 changes: 41 additions & 5 deletions docs/seo/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,34 @@

RockFrontend comes with tools that help you build SEO optimized websites in no time.

## Concept

The Concept of RockFrontend's SEO tools differ from many other solutions where you add many fields to every template and then have the user fill all these fields.

This might be the best solution in terms of search engine rankings but it is not the best solution in terms of efficiency in my opinion. In all websites that I develop **I usually have the content for those SEO fields already available** in one field or another.

So what RockFrontend's SEO Tools do is to make it super simple to grab the available content and turn it into state of the art SEO markup!

<div class=uk-alert>Note: In the future we might also add custom inputfields for the user to overwrite values generated by RockFrontend. What do you think? Let me know in the forum!</div>

## Usage

While you can customise every aspect of the output the main goal is that usage is still very simple.
While you can customise every aspect of the output the main goal is that usage is still very simple. You can even use it without any customizations:

`label: usage with default settings`
```php
<head>
<?php echo $rockfrontend->seo(); ?>
</head>
```

Just inspect the generated HTML markup and then further adjust settings to your needs. RockFrontend will take care of the tedious parts!

For example you can simply return a `PageImage` object in the `og:image` callback and RockFrontend will take care of creating the correct image size and return the correct url necessary for SEO tags including the host scheme.

For example you just return a `PageImage` object in the `og:image` tag and RockFrontend will take care of getting the correct image url and size.
Or you can just throw the content of a TinyMCE field into the `description()` function and RockFrontend will take care of removing all html tags and truncating the text to the desired length.

Or you can just throw the content of a TinyMCE field into the `description()` function and RockFrontend will take care of removing all html tags and truncating the text to the desired length:
An example used for the page that you are currently viewing could look something like this:

`label: /site/templates/_main.php`
```php
Expand All @@ -17,10 +38,10 @@ Or you can just throw the content of a TinyMCE field into the `description()` fu
<?php
echo $rockfrontend->seo()

->title("ACME - " . $page->title)
->title("RockFrontend - " . $page->title)

->description(function (Page $page) {
if($page->template == 'car') return $page->cardescription;
if($page->template == 'docs') return $page->getDocs();
return $page->body;
})

Expand All @@ -33,6 +54,21 @@ Or you can just throw the content of a TinyMCE field into the `description()` fu
</head>
```

`label: output`
```html
<title>RockFrontend - SEO Tools</title>
<meta property="og:title" content="RockFrontend - SEO Tools">
<meta name="description" content="SEO Tools; RockFrontend comes with...">
<meta property="og:description" content="SEO Tools; RockFrontend comes with...">
<link rel='icon' type='image/png' sizes='32x32' href=/site/assets/files/1/favicon.32x32.png>
<link rel='icon' type='image/png' sizes='16x16' href=/site/assets/files/1/favicon.16x16.png>
<link rel='icon' type='image/png' sizes='48x48' href=/site/assets/files/1/favicon.48x48.png>
<link rel='icon' type='image/png' sizes='192x192' href=/site/assets/files/1/favicon.192x192.png>
<link rel='apple-touch-icon' type='image/png' sizes='167x167' href=/site/assets/files/1/favicon.167x167.png>
<link rel='apple-touch-icon' type='image/png' sizes='180x180' href=/site/assets/files/1/favicon.180x180.png>
<link rel="manifest" href="/website.webmanifest">
```

Most values can either be set as string (for simple situations like the `title` in the example above) or as a callback that receives the current `$page` as first argument (like in the `description` in the example above).

## Default Configuration
Expand Down

0 comments on commit 96b04fc

Please sign in to comment.