add metadata, fix metadata #257

Merged
kauffj merged 3 commits from metadata into master 2019-02-15 18:47:03 +01:00
Showing only changes of commit ca2e2b8b6c - Show all commits

View file

@ -6,14 +6,15 @@
import html from "choo/html"; import html from "choo/html";
// U T I L S // U T I L
import config from "@root/config"; import config from "@root/config";
// E X P O R T // E X P O R T
export default (state, emit) => { export default (state, emit) => {
const newMetadata = state.lbry; const newMetadata = state.lbry;
const description = newMetadata && newMetadata.description ? newMetadata.description : config.meta.description; const description = newMetadata && newMetadata.description ? newMetadata.description : config.meta.description;
const title = newMetadata && newMetadata.title ? newMetadata.title + " - lbry.tech" : "lbry.tech - " + config.meta.tagline; const title = newMetadata && newMetadata.title ? newMetadata.title + " - lbry.tech" : "lbry.tech - " + config.meta.tagline;
@ -21,7 +22,6 @@ export default (state, emit) => {
if (state.title !== title) emit(state.events.DOMTITLECHANGE, title); if (state.title !== title) emit(state.events.DOMTITLECHANGE, title);
state.page = state.page || { }; state.page = state.page || { };
return html` return html`
<meta charset="utf-8"/> <meta charset="utf-8"/>
<title>${title}</title> <title>${title}</title>