{"id":16737200,"url":"https://github.com/jcypret/middleman-title","last_synced_at":"2025-04-10T12:42:40.369Z","repository":{"id":16924116,"uuid":"19685557","full_name":"jcypret/middleman-title","owner":"jcypret","description":"A Middleman extension that allows you to easily set page titles for your website.","archived":false,"fork":false,"pushed_at":"2019-10-29T03:23:28.000Z","size":32,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-03-14T22:22:56.201Z","etag":null,"topics":["middleman","middleman-extension","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jcypret.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-12T04:12:10.000Z","updated_at":"2019-10-29T03:23:26.000Z","dependencies_parsed_at":"2022-07-14T20:17:21.180Z","dependency_job_id":null,"html_url":"https://github.com/jcypret/middleman-title","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcypret%2Fmiddleman-title","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcypret%2Fmiddleman-title/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcypret%2Fmiddleman-title/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcypret%2Fmiddleman-title/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jcypret","download_url":"https://codeload.github.com/jcypret/middleman-title/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248217160,"owners_count":21066634,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["middleman","middleman-extension","ruby"],"created_at":"2024-10-13T00:25:18.015Z","updated_at":"2025-04-10T12:42:40.351Z","avatar_url":"https://github.com/jcypret.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Middleman Title\n![Build Status](https://github.com/jcypret/middleman-title/workflows/build/badge.svg?branch=master)\n[![Gem Version](https://badge.fury.io/rb/middleman-title.svg)](https://badge.fury.io/rb/middleman-title)\n[![Code Climate](https://codeclimate.com/github/jcypret/middleman-title/badges/gpa.svg)](https://codeclimate.com/github/jcypret/middleman-title)\n[![Test Coverage](https://codeclimate.com/github/jcypret/middleman-title/badges/coverage.svg)](https://codeclimate.com/github/jcypret/middleman-title/coverage)\n\nThis Middleman extension allows you to easily set page titles for your website.\n\n## Setup\nAdd the following line to `Gemfile`, then run `bundle install`:\n\n```Ruby\ngem 'middleman-title'\n```\n\nAfter installation, activate the extension in `config.rb`:\n\n```Ruby\nactivate :title, site: 'Your Website Name', separator: ' — '\n```\n\n*The separator is optional and will default to a dash.*\n\n\n## Setting Title and Adding to Layout\n\nIn your layout file, you can use the `page_title` helper to output the current page title:\n\n```HTML+ERB\n\u003ctitle\u003e\u003c%= page_title %\u003e\u003c/title\u003e\n```\n\nThen, add a page `title` to the Frontmatter any page:\n\n```YAML\n---\ntitle: The title of this page goes here\n---\n```\n\nThis would output:\n\n```Text\nThe title of this page goes here — Your Website Name\n```\n\n## Outputting Website Name First\n\nSometimes it is desirable to put the website name first, such as on the home page. This can be done by setting `title_reverse` to `true` in the frontmatter of the page.\n\n```YAML\n---\ntitle: The title of this page goes here\ntitle_reverse: true\n---\n```\n\nThis would output:\n\n```Text\nYour Website Name — The title of this page goes here\n```\n\nYou can also put the website name first on every page by setting it when you activate the extension:\n\n```Ruby\nactivate :title, site: 'Your Website Name', reverse: true\n```\n\nThen on any page where you want the website name to come last, you can set `title_reverse` to false in the Frontmatter:\n\n```YAML\n---\ntitle: The title of this page goes here\ntitle_reverse: false\n---\n```\n\n\n## Multi-level Page Titles\n\nWhen your website has heirachy, it is sometimes desirable to have multiple parts to the title. This can be done by passing an array in the Frontmatter:\n\n```YAML\n---\ntitle:\n- John Doe\n- Staff\n---\n```\n\nThis would output:\n\n```Text\nJohn Doe — Staff — Your Website Name\n```\n\n## Override Page Title\n\nIf at any point you want to completely override the page title, you can use `page_title` in the Frontmatter.\n\n```YAML\npage_title: The title of a page to be used as-is in \u003ctitle\u003e without site name\n```\n\n## Contributing\n\n1. Fork it ( https://github.com/jcypret/middleman-title/fork )\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcypret%2Fmiddleman-title","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjcypret%2Fmiddleman-title","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcypret%2Fmiddleman-title/lists"}