How to add a mobile site with Jekyll and GitHub?

I currently have a desktop version of my site. I do not want to change this. But I thought about adding a mobile website. For this website, I would remove some HTML elements to speed up loading (like a tag cloud and some images) and change the style to make better use of the screen.

I would like to use a subdomain for this, for example

  http://martin-thoma.com/check-point-inside-polygon/ # Desktop verson
http://m.martin-thoma.com/check-point-inside-polygon/ # Mobile version

How can I use both a subdomain m.and my domain with GitHub pages?

Another question is more about Jekyll. I do not know how it should be in the underlying file system. I think that may be so.

./css/
./images/
./_drafts/
./_posts/
./_plugins/
./_site/
    |- ./css/
    |- ./images/
    |- ... (all posts, tags, titles)
    |- ./m/
         |- ./css/
         |- ./images/
         |- ... (all posts, tags, titles)

jekyll. , - . jekyll ? (, layout:desktop layout:mobile, .)

, : Jekyll / ? , media="handheld" media="only screen and (max-device-width: 480px)" (-)

, . HTTP-, :

Request URL:https://de.wikipedia.org/wiki/Benutzer:MartinThoma
Request Method:GET
Status Code:302 Found

Request Headers
GET /wiki/Benutzer:MartinThoma HTTP/1.1
Host: de.wikipedia.org
Connection: keep-alive
Cache-Control: max-age=0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
User-Agent: Mozilla/5.0 (Linux; U; Android 2.3.6; en-us; Nexus S Build/GRK39F) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1
Accept-Encoding: gzip,deflate,sdch
Accept-Language: de-DE,de;q=0.8,en;q=0.6,en-US;q=0.4
Cookie: uls-previous-languages=%5B%22de%22%5D; clicktracking-session=SOME_SESSION_VAR; wikimedia-SUL-final-CN-general=5; mediaWiki.user.sessionId=MY_USER_ID; dewiki_session=ANOTHER_SESSION_ID; dewikiUserID=ANOTHER_USER_ID; dewikiUserName=MartinThoma; dewikiSession=ANOTHER_SESSION_ID; centralauth_User=MartinThoma; centralauth_Token=BLA; centralauth_Session=BLA; forceHTTPS=1; centralnotice_bucket=0-4.2; wikiEditor-0-toolbar-section=advanced; vector-nav-p-lang=true
If-Modified-Since: Thu, 09 Jan 2014 05:14:25 GMT


Response Headers
HTTP/1.1 302 Found
Server: nginx/1.1.19
Date: Thu, 09 Jan 2014 05:14:53 GMT
Transfer-Encoding: chunked
Connection: keep-alive
Location: https://de.m.wikipedia.org/wiki/Benutzer:MartinThoma
Accept-Ranges: bytes
X-Varnish: 161481560
Age: 0
Via: 1.1 varnish
X-Cache: amssq57 frontend miss (0)
Cache-Control: private, s-maxage=0, max-age=0, must-revalidate

, , User-Agent, , . , .htaccess (. htaccess). .

+4

All Articles