Giter Site home page Giter Site logo

mazondo / ember-page-title Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ember-cli/ember-page-title

0.0 2.0 0.0 3.88 MB

Page title management for Ember.js Apps

Home Page: http://tim-evans.github.io/ember-page-title/

License: MIT License

JavaScript 56.63% HTML 24.25% CSS 19.12%

ember-page-title's Introduction

{{title}} Ember Observer Score Build Status Code Climate Test Coverage

Greenkeeper badge

This addon provides a helper for changing the title of the page you're on.

Installing via ember-cli

ember-page-title follows the release format provided in The Ember 2.x Project. For support of Ember versions below 1.13, please use 1.1.11 (named as ember-document-title):

ember install [email protected]

For any other app, follow the scheme outlined in the blog post. Previous versions of the addon may work with newer versions of Ember, but that is not guaranteed-- YMMV. If you're on the latest stable release of Ember, you may install the addon without a version number.

ember install ember-page-title

Post Install Cleanup

As of v3.0.0 this addon maintains the page title by using the <title> tag in your document's <head>. This is necessary for FastBoot compatibility.

Non-fastboot apps should keep the <title> tag in index.html to ensure that the initial page is valid HTML. The title will be removed and replaced when your app boots.

Fastboot apps MUST remove the <title> tag from index.html.

Digging in

Visit the Docs site

Fastboot

When working with other addons that use ember-cli-head, you'll need to create a custom head.hbs file that exposes the <title> tag properly:

<title>{{model.title}}</title>

This file is added automatically if you use ember install. This is for all the folks using ember-cli-head addons like ember-cli-meta-tags.

API

attribute type default
separator string `"
prepend boolean false
replace boolean false

These defaults are configurable in config/environment.js:

// config/environment.js
/* jshint node: true */

module.exports = function(environment) {
  var ENV = {
    pageTitle: {
      replace: true
    }
  };

  return ENV;
};

Contributing

Contributors are welcome! Please provide a reproducible test case. Details will be worked out on a case-per-case basis. Maintainers will get in touch when they can, so delays are possible. For contribution guidelines, see the code of conduct.

Publishing Documentation

To publish documentation, run the following command:

ember github-pages:commit --message "update documentation"
git push origin gh-pages:gh-pages

ember-page-title's People

Contributors

ahmadsoe avatar begedin avatar chrislopresto avatar ember-tomster avatar fotinakis avatar greenkeeper[bot] avatar jakesjews avatar mazondo avatar pgrippi avatar pimterry avatar rlivsey avatar ronco avatar tim-evans avatar turbo87 avatar vlascik avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.