# Search Engine Optimization in Hugo Add automatically generated Search Engine Optimization to your Website ## Install 1. Add this code to your `
` structure (e.g in `layouts/_default/baseof.html`): ```html {{ range .AlternativeOutputFormats -}} {{ printf `` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} {{ end -}} ``` 2. Add the default key/value `private = true` to `/archetypes/default.md` ```yaml --- title: "{{ replace .Name "-" " " | title }}" date: {{ .Date }} draft: true ## Add this key with value 'false' for indexing by search engines enabled by default private: false --- ``` ## Usage Add these keys and values to any page's settings: ```toml +++ ... tags = ["fruit", "apple", "health"] # Fitting keywords that describe your post/page private = true # true if you want it private/unlisted +++ ``` ## Preview ### Public ### Example Post ```html ``` #### Index ```html ``` ### Private > 404 Page is private by default ```html ```