Skip to content

Commit 1fa4914

Browse files
committed
Readme
1 parent 9cdfe79 commit 1fa4914

File tree

1 file changed

+70
-2
lines changed

1 file changed

+70
-2
lines changed

README.md

Lines changed: 70 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,74 @@
1-
# Seo Visualizer for Umbraco
21

3-
This is the branch for Umbraco 10.
2+
3+
Seo Visualizer for Umbraco
4+
============================
5+
Seo Visualizer is a simple property editor for Umbraco 7-10+ used to take seo-related user input and visualize the page in the Google search results for the editor.
6+
7+
![Screenshot of Seo Visualizer](https://github.com/enkelmedia/Umbraco-SeoVisualizer/raw/master/Documentation/seo-example.PNG "Screenshot")
8+
9+
## Installation
10+
The esiest way to install the package is to use nuget:
11+
12+
```
13+
dotnet add package UmbracoSeoVisualizer
14+
```
15+
16+
### Version
17+
* [Version 10 for Umbraco 10](https://github.com/enkelmedia/Umbraco-SeoVisualizer/tree/v10)
18+
* [Version 9 for Umbraco 9](https://github.com/enkelmedia/Umbraco-SeoVisualizer/tree/v9)
19+
* [Version 8 for Umbraco 8](https://github.com/enkelmedia/Umbraco-SeoVisualizer/tree/v8)
20+
* [Version 1 for Umbraco 7](https://github.com/enkelmedia/Umbraco-SeoVisualizer/tree/v1)
21+
22+
### Features
23+
The property editor just shows a form with two fields
24+
25+
* **Page title** Shows a hint for the user if the title is longer than 70 chars which is not good.
26+
* **Meta description** Shows a hint for the user if the title is longer than 155 chars which is not good.
27+
* **Title Suffix** Can be configured so titles will be rendered like eg `My Page | Umbraco`
28+
* **No index-toggle** Can be configured to show next to the seo-settings.
29+
30+
While typing in the textboxes a preview of the Google snippet is shown in the backoffice.
31+
32+
## How to use
33+
34+
### Set up
35+
If you are installing the package using NuGet you'll have to manually add a new data type in the developer section of your Umbraco backoffice. Choose the Property Editor named "Seo Visualizer".
36+
37+
#### Document Types
38+
39+
After that you need to add this data type to one or more of your document types so that the editors can use it, in the examples below we gave the property on the document type the alias "seo".
40+
41+
#### In the views
42+
43+
The recommended approach is to use Models Builder but you can also access the properties like this:
44+
45+
```csharp
46+
@(this.Model.Content.GetPropertyValue<SeoValues>("seo").Description)
47+
```
48+
49+
or like this
50+
51+
```html
52+
@{
53+
var seo = this.Model.Content.GetPropertyValue<SeoValues>("seo");
54+
}
55+
56+
<html>
57+
<head>
58+
<title>@seo.Title</title>
59+
<meta name="description" content="@seo.Description" />
60+
</head>
61+
<body>
62+
</body>
63+
</html>
64+
```
65+
66+
The last approach would perform better as the convertion of the object will only have to be done once.
67+
68+
69+
70+
## Contribution
71+
We welcome any contribution both as in reporting issues and as in writing code, if you're planing to make a Pull Request please start with an issue to let us know and to increase the chances for the PR to be merged.
472

573
## Build for NuGet
674

0 commit comments

Comments
 (0)