diff --git a/client/app/components/forum-nav/forum-nav.tsx b/client/app/components/forum-nav/forum-nav.tsx index a363483..6e87848 100644 --- a/client/app/components/forum-nav/forum-nav.tsx +++ b/client/app/components/forum-nav/forum-nav.tsx @@ -37,6 +37,8 @@ export class ForumNav extends React.Component { setSelectedCategory(categoryList: CategoryModel[], categoryId: number) { const selectedCategory = find(categoryList, { id: categoryId }); + // set page title here + document.title = selectedCategory!.title; this.setState({ selectedCategory }); } diff --git a/client/app/components/header/header.tsx b/client/app/components/header/header.tsx index fe2dc42..91f22d8 100644 --- a/client/app/components/header/header.tsx +++ b/client/app/components/header/header.tsx @@ -16,7 +16,7 @@ export class Header extends React.Component {
- + Classic WoW Forums
diff --git a/client/app/pages/home/home.tsx b/client/app/pages/home/home.tsx index 1b66627..2c4bbea 100644 --- a/client/app/pages/home/home.tsx +++ b/client/app/pages/home/home.tsx @@ -41,10 +41,14 @@ export class Home extends React.Component { super(props); } + componentDidMount() { + document.title = 'Classic WoW Forums'; + } + private renderTopic(topicId: number | string, title: string, icon: any, text: string): any { return (
- + {title}/
{title}
{text}
@@ -56,7 +60,7 @@ export class Home extends React.Component { private renderClass(title: string, topicId: number, icon: any): any { return (
- + {title}/ {title}
); @@ -88,9 +92,9 @@ export class Home extends React.Component { return ( - + Forum Community
- Welcome to the unofficial Classic WoW Forums! +

Welcome to the unofficial Classic WoW Forums!

I created this site with the intention of providing @@ -133,7 +137,7 @@ export class Home extends React.Component {

- + bullet
Classes
Discuss your favorite class:
@@ -144,21 +148,21 @@ export class Home extends React.Component {
- + Professions
Professions
Discuss professions in detail.
- + pvp
PvP Discussion
Discuss player versus player combat.
- + Quests
Quest Discussion
Talk about and get help with the countless quests in World of Warcraft.
diff --git a/client/app/pages/realms/realms.tsx b/client/app/pages/realms/realms.tsx index 23a0f6e..d30973a 100644 --- a/client/app/pages/realms/realms.tsx +++ b/client/app/pages/realms/realms.tsx @@ -24,6 +24,7 @@ export class Realms extends React.Component { } async componentDidMount() { + document.title = 'Realms'; try { const res = await CategoryService.getCategories(); const realms = chain(res) diff --git a/client/app/pages/thread/thread.tsx b/client/app/pages/thread/thread.tsx index 30fb4c7..f13730e 100644 --- a/client/app/pages/thread/thread.tsx +++ b/client/app/pages/thread/thread.tsx @@ -68,6 +68,7 @@ export class Thread extends React.Component { } private processReplies(thread: ThreadModel, props: Props = this.props) { + document.title = get(thread, 'title'); thread.replies = chain(thread.replies) .orderBy(['inserted_at'], ['asc']) .map((r, i) => { r.index = i; return r; }) diff --git a/client/index.html b/client/index.html index 4c7743f..8e5686a 100644 --- a/client/index.html +++ b/client/index.html @@ -4,6 +4,8 @@ Classic WoW Forums + + diff --git a/client/package.json b/client/package.json index 7fd7b6e..eade4d5 100644 --- a/client/package.json +++ b/client/package.json @@ -1,6 +1,6 @@ { "name": "react_starter", - "version": "1.0.1", + "version": "1.0.2", "description": "A seed for a simple react application with typescript.", "scripts": { "build": "webpack -p --progress --colors", diff --git a/client/public/robots.txt b/client/public/robots.txt index 23918d5..5f10798 100644 --- a/client/public/robots.txt +++ b/client/public/robots.txt @@ -1,4 +1,9 @@ User-agent: * -Disallow: /login -Disallow: /api Allow: / +Allow: /f/* +Allow: /t/* +Allow: /realms +Disallow: /login +Disallow: /api/* + +Sitemap: https://classicwowforums.com/sitemap.xml diff --git a/client/public/sitemap.xml b/client/public/sitemap.xml new file mode 100644 index 0000000..dcf36a5 --- /dev/null +++ b/client/public/sitemap.xml @@ -0,0 +1,24 @@ + + +https://classicwowforums.com/ +2018-02-07 +weekly +0.9 + + +https://classicwowforums.com/realms +weekly +0.6 + + +https://classicwowforums.com/f/133 +2018-02-07 +weekly +0.5 + + +https://classicwowforums.com/f/137 +2018-02-07 +0.3 + + diff --git a/mix.exs b/mix.exs index 94c258d..aa2f8fc 100644 --- a/mix.exs +++ b/mix.exs @@ -4,7 +4,7 @@ defmodule MyApp.Mixfile do def project do [ app: :myapp, - version: "1.0.1", + version: "1.0.2", elixir: "~> 1.5.2", elixirc_paths: elixirc_paths(Mix.env), compilers: [:phoenix, :gettext] ++ Mix.compilers, diff --git a/priv/repo/seeds.exs b/priv/repo/seeds.exs index 7671ae2..4ab03d5 100644 --- a/priv/repo/seeds.exs +++ b/priv/repo/seeds.exs @@ -162,6 +162,7 @@ defmodule Category do # additional realms %{"id" => 143, "category" => "realm", "title" => "Sentinels"}, + %{"id" => 144, "category" => "realm", "title" => "Vek'nilash"}, ] end