mirror of
https://github.com/Mikaela/Limnoria-doc.git
synced 2024-12-26 05:02:37 +01:00
develop/httpserver.rst: fix links & HTML5
All links to the plugins went to ProgVal/Limnoria, most of them are really at ProgVal/Supybot-plugins. Code examples now use HTML5.
This commit is contained in:
parent
a69a0e975d
commit
e8a0590f48
@ -21,9 +21,9 @@ Some example plugins are `Factoids`_, `WebStats`_, `GitHub`_, UfrPaste, and
|
|||||||
`WebDoc`_
|
`WebDoc`_
|
||||||
|
|
||||||
.. _Factoids: https://github.com/ProgVal/Limnoria/tree/master/plugins/Factoids
|
.. _Factoids: https://github.com/ProgVal/Limnoria/tree/master/plugins/Factoids
|
||||||
.. _WebStats: https://github.com/ProgVal/Limnoria/tree/master/plugins/WebStats
|
.. _WebStats: https://github.com/ProgVal/Supybot-plugins/tree/master/WebStats
|
||||||
.. _GitHub: https://github.com/ProgVal/Limnoria/tree/master/plugins/GitHub
|
.. _GitHub: https://github.com/ProgVal/Supybot-plugins/tree/master/GitHub
|
||||||
.. _WebDoc: https://github.com/ProgVal/Limnoria/tree/master/plugins/WebDoc
|
.. _WebDoc: https://github.com/ProgVal/Supybot-plugins/tree/master/WebDoc
|
||||||
|
|
||||||
|
|
||||||
Using the HTTP server in a plugin
|
Using the HTTP server in a plugin
|
||||||
@ -143,8 +143,10 @@ Here is the code of the callback... pretty much simple, as ever::
|
|||||||
handler.send_header('Content-type', 'text/html') # This is the MIME for HTML data
|
handler.send_header('Content-type', 'text/html') # This is the MIME for HTML data
|
||||||
handler.end_headers() # We won't send more headers
|
handler.end_headers() # We won't send more headers
|
||||||
handler.wfile.write(b"""
|
handler.wfile.write(b"""
|
||||||
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
<title>Supystory</title>
|
<title>Supystory</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
@ -163,8 +165,10 @@ Here is the code of the callback... pretty much simple, as ever::
|
|||||||
handler.send_header('Content-type', 'text/html') # This is the MIME for HTML data
|
handler.send_header('Content-type', 'text/html') # This is the MIME for HTML data
|
||||||
handler.end_headers() # We won't send more headers
|
handler.end_headers() # We won't send more headers
|
||||||
handler.wfile.write(b"""
|
handler.wfile.write(b"""
|
||||||
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
<title>Error</title>
|
<title>Error</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
@ -200,8 +204,10 @@ are the only 'big' pages), like this::
|
|||||||
|
|
||||||
DEFAULT_TEMPLATES = {
|
DEFAULT_TEMPLATES = {
|
||||||
'supystory/index.html': """
|
'supystory/index.html': """
|
||||||
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
<title>Supystory</title>
|
<title>Supystory</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
@ -215,8 +221,10 @@ are the only 'big' pages), like this::
|
|||||||
</body>
|
</body>
|
||||||
</html>""",
|
</html>""",
|
||||||
'supystory/error.html': """
|
'supystory/error.html': """
|
||||||
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
<title>Error</title>
|
<title>Error</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
Loading…
Reference in New Issue
Block a user