1
0
mirror of https://github.com/mgerb/classic-wow-forums synced 2026-01-10 09:02:50 +00:00

trying to improve seo

This commit is contained in:
2018-02-07 13:54:09 -06:00
parent 5972d2f8c6
commit dedd77fb7d
11 changed files with 53 additions and 13 deletions

View File

@@ -37,6 +37,8 @@ export class ForumNav extends React.Component<Props, State> {
setSelectedCategory(categoryList: CategoryModel[], categoryId: number) {
const selectedCategory = find(categoryList, { id: categoryId });
// set page title here
document.title = selectedCategory!.title;
this.setState({ selectedCategory });
}

View File

@@ -16,7 +16,7 @@ export class Header extends React.Component<Props, State> {
<div>
<div className="wowlogo2">
<Link to="/">
<img src={wowlogo2}/>
<img src={wowlogo2} alt="Classic WoW Forums"/>
</Link>
</div>

View File

@@ -41,10 +41,14 @@ export class Home extends React.Component<Props, State> {
super(props);
}
componentDidMount() {
document.title = 'Classic WoW Forums';
}
private renderTopic(topicId: number | string, title: string, icon: any, text: string): any {
return (
<div className="topic-item">
<img className="topic-item-icon" src={icon} />
<img className="topic-item-icon" src={icon} alt={title}/>
<div>
<Link to={typeof topicId === 'number' ? `/f/${topicId}` : topicId}>{title}</Link>
<div>{text}</div>
@@ -56,7 +60,7 @@ export class Home extends React.Component<Props, State> {
private renderClass(title: string, topicId: number, icon: any): any {
return (
<div className="flex flex--center" style={{ flex: 1 }}>
<img className="topic-item-icon" src={icon} />
<img className="topic-item-icon" src={icon} alt={title}/>
<Link to={`/f/${topicId}`}>{title}</Link>
</div>
);
@@ -88,9 +92,9 @@ export class Home extends React.Component<Props, State> {
return (
<ScrollToTop>
<ContentContainer>
<img src={header_forms} />
<img src={header_forms} alt="Forum Community"/>
<div>
<b>Welcome to the unofficial Classic WoW Forums!</b>
<h1 style={{ margin: '0', fontSize: '10pt', fontWeight: 'bolder' }}>Welcome to the unofficial Classic WoW Forums!</h1>
</div>
<p>
I created this site with the intention of providing
@@ -133,7 +137,7 @@ export class Home extends React.Component<Props, State> {
<div className="topic-row topic-row__classes">
<div className="topic-item topic-item__classes">
<div className="flex" style={{ marginBottom: '10px' }}>
<img className="topic-item-icon" src={bullet} />
<img className="topic-item-icon" src={bullet} alt="bullet"/>
<div>
<b>Classes</b>
<div>Discuss your favorite class:</div>
@@ -144,21 +148,21 @@ export class Home extends React.Component<Props, State> {
<div className="topic-item topic-item__classes">
<div className="item-row" style={{ minWidth: '250px' }}>
<img className="topic-item-icon" src={professions} />
<img className="topic-item-icon" src={professions} alt="Professions"/>
<div>
<Link to="/f/140">Professions</Link>
<div>Discuss professions in detail.</div>
</div>
</div>
<div className="item-row">
<img className="topic-item-icon" src={pvp} />
<img className="topic-item-icon" src={pvp} alt="pvp"/>
<div>
<Link to="/f/141">PvP Discussion</Link>
<div>Discuss player versus player combat.</div>
</div>
</div>
<div className="item-row">
<img className="topic-item-icon" src={quests} />
<img className="topic-item-icon" src={quests} alt="Quests"/>
<div>
<Link to="/f/142">Quest Discussion</Link>
<div>Talk about and get help with the countless quests in World of Warcraft.</div>

View File

@@ -24,6 +24,7 @@ export class Realms extends React.Component<Props, State> {
}
async componentDidMount() {
document.title = 'Realms';
try {
const res = await CategoryService.getCategories();
const realms = chain(res)

View File

@@ -68,6 +68,7 @@ export class Thread extends React.Component<Props, State> {
}
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; })

View File

@@ -4,6 +4,8 @@
<title>Classic WoW Forums</title>
<link href="https://fonts.googleapis.com/css?family=Roboto:100" rel="stylesheet">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"/>
<meta name="description" content="Classic WoW Forums: Unofficial World of Warcraft forums as they were in 2005."/>
<meta name="keywords" content="wow, forums, world of warcraft, classic wow, classic world of warcraft, classic wow forums, classic world of warcraft forums"/>
</head>
<body>

View File

@@ -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",

View File

@@ -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

24
client/public/sitemap.xml Normal file
View File

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://classicwowforums.com/</loc>
<lastmod>2018-02-07</lastmod>
<changefreq>weekly</changefreq>
<priority>0.9</priority>
</url>
<url>
<loc>https://classicwowforums.com/realms</loc>
<changefreq>weekly</changefreq>
<priority>0.6</priority>
</url>
<url>
<loc>https://classicwowforums.com/f/133</loc>
<lastmod>2018-02-07</lastmod>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc>https://classicwowforums.com/f/137</loc>
<lastmod>2018-02-07</lastmod>
<priority>0.3</priority>
</url>
</urlset>

View File

@@ -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,

View File

@@ -162,6 +162,7 @@ defmodule Category do
# additional realms
%{"id" => 143, "category" => "realm", "title" => "Sentinels"},
%{"id" => 144, "category" => "realm", "title" => "Vek'nilash"},
]
end