Browse Source

Optimize all the search engines.

Add:
        static/img/favicon.ico
                -Add a favicon.

        static/(robots.txt, sitemap.xml)
                -Add search-engine files. `bitshift` is not yet registered with
                Google.
tags/v1.0^2
Severyn Kozak 10 years ago
parent
commit
ba162300e8
5 changed files with 27 additions and 0 deletions
  1. +7
    -0
      app.py
  2. BIN
     
  3. +3
    -0
      static/robots.txt
  4. +16
    -0
      static/sitemap.xml
  5. +1
    -0
      templates/layout.html

+ 7
- 0
app.py View File

@@ -3,6 +3,7 @@ Module to contain all the project's Flask server plumbing.
"""

import datetime
import flask

from json import dumps
from flask import Flask, make_response, render_template, request
@@ -55,5 +56,11 @@ def about():
def developers():
return render_template("developers.html")

@app.route("/robots.txt")
@app.route("/sitemap.xml")
@app.route("/favicon.ico")
def static_from_root():
return flask.send_from_directory(app.static_folder, request.path[1:])

if __name__ == "__main__":
app.run(debug=True)

BIN
View File


+ 3
- 0
static/robots.txt View File

@@ -0,0 +1,3 @@
User-agent: *
Disallow: /search.json
Sitemap: http://www.bitshift.it/sitemap.xml

+ 16
- 0
static/sitemap.xml View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>

<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>http://bitshift.it/</loc>
<changefreq>monthly</changefreq>
</url>
<url>
<loc>http://bitshift.it/about</loc>
<changefreq>monthly</changefreq>
</url>
<url>
<loc>http://bitshift.it/developers</loc>
<changefreq>monthly</changefreq>
</url>
</urlset>

+ 1
- 0
templates/layout.html View File

@@ -16,6 +16,7 @@
<meta name="keywords" content="source code language search engine"/>
<meta name="author" content="Benjamin Attal Ben Kurtovic Severyn Kozak"/>

<link rel="shortcut icon" href="static/img/favicon.ico">
{{ assets.tag("main.css") }}

= block head


Loading…
Cancel
Save