Updated HTML docs

This commit is contained in:
Griatch 2021-10-26 21:41:11 +02:00
parent 66d0ad0bc9
commit 7900aad365
2073 changed files with 32986 additions and 41197 deletions

View file

@ -14,6 +14,8 @@
<script src="../../../_static/underscore.js"></script>
<script src="../../../_static/doctools.js"></script>
<script src="../../../_static/language_data.js"></script>
<script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"processClass": "tex2jax_process|mathjax_process|math|output_area"}})</script>
<link rel="shortcut icon" href="../../../_static/favicon.ico"/>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
@ -38,13 +40,13 @@
<div class="bodywrapper">
<div class="body" role="main">
<section id="web-tutorial">
<section class="tex2jax_ignore mathjax_ignore" id="web-tutorial">
<h1>Web Tutorial<a class="headerlink" href="#web-tutorial" title="Permalink to this headline"></a></h1>
<p>Evennia uses the <a class="reference external" href="https://www.djangoproject.com/">Django</a> web framework as the basis of both its
database configuration and the website it provides. While a full understanding of Django requires
reading the Django documentation, we have provided this tutorial to get you running with the basics
and how they pertain to Evennia. This text details getting everything set up. The
<a class="reference internal" href="../../Web-Character-View-Tutorial.html"><span class="doc">Web-based Character view Tutorial</span></a> gives a more explicit example of making a
<a class="reference internal" href="../../Web-Character-View-Tutorial.html"><span class="doc std std-doc">Web-based Character view Tutorial</span></a> gives a more explicit example of making a
custom web page connected to your game, and you may want to read that after finishing this guide.</p>
<section id="a-basic-overview">
<h2>A Basic Overview<a class="headerlink" href="#a-basic-overview" title="Permalink to this headline"></a></h2>
@ -61,7 +63,7 @@ like <a class="reference external" href="https://en.wikipedia.org/wiki/CSS">CSS<
and Image files (You may note your mygame/web folder does not have a <code class="docutils literal notranslate"><span class="pre">static</span></code> or <code class="docutils literal notranslate"><span class="pre">template</span></code> folder.
This is intended and explained further below). Django applications may also have a <code class="docutils literal notranslate"><span class="pre">models.py</span></code> file
for storing information in the database. We will not change any models here, take a look at the
<a class="reference internal" href="../../../Concepts/New-Models.html"><span class="doc">New Models</span></a> page (as well as the <a class="reference external" href="https://docs.djangoproject.com/en/1.7/topics/db/models/">Django docs</a> on models) if you are interested.</p>
<a class="reference internal" href="../../../Concepts/New-Models.html"><span class="doc std std-doc">New Models</span></a> page (as well as the <a class="reference external" href="https://docs.djangoproject.com/en/1.7/topics/db/models/">Django docs</a> on models) if you are interested.</p>
<p>There is also a root <code class="docutils literal notranslate"><span class="pre">urls.py</span></code> that determines the URL structure for the entire project. A starter
<code class="docutils literal notranslate"><span class="pre">urls.py</span></code> is included in the default game template, and automatically imports all of Evennias
default URLs for you. This is located in <code class="docutils literal notranslate"><span class="pre">web/urls.py</span></code>.</p>
@ -115,8 +117,8 @@ everything) in the <code class="docutils literal notranslate"><span class="pre">
scratch.</p>
</div></blockquote>
</section>
<section id="changing-the-front-page-s-text">
<h2>Changing the Front Pages Text<a class="headerlink" href="#changing-the-front-page-s-text" title="Permalink to this headline"></a></h2>
<section id="changing-the-front-pages-text">
<h2>Changing the Front Pages Text<a class="headerlink" href="#changing-the-front-pages-text" title="Permalink to this headline"></a></h2>
<p>The default front page for Evennia contains information about the Evennia project. Youll probably
want to replace this information with information about your own project. Changing the page template
is done in a similar way to changing static resources.</p>
@ -127,7 +129,7 @@ means that when you edit a template, the changes are instant. You dont have t
run any extra commands to see these changes - reloading the web page in your browser is enough.</p>
<p>To replace the index pages text, well need to find the template for it. Well go into more detail
about how to determine which template is used for rendering a page in the
<a class="reference internal" href="../../Web-Character-View-Tutorial.html"><span class="doc">Web-based Character view Tutorial</span></a>. For now, you should know that the template we want to change
<a class="reference internal" href="../../Web-Character-View-Tutorial.html"><span class="doc std std-doc">Web-based Character view Tutorial</span></a>. For now, you should know that the template we want to change
is stored in <code class="docutils literal notranslate"><span class="pre">evennia/web/website/templates/website/index.html</span></code>.</p>
<p>To replace this template file, you will put your changed template inside the
<code class="docutils literal notranslate"><span class="pre">web/template_overrides/website</span></code> directory in your game folder. In the same way as with static
@ -140,7 +142,7 @@ original file already has all the markup and tags, ready for editing.</p>
<section id="further-reading">
<h2>Further reading<a class="headerlink" href="#further-reading" title="Permalink to this headline"></a></h2>
<p>For further hints on working with the web presence, you could now continue to the
<a class="reference internal" href="../../Web-Character-View-Tutorial.html"><span class="doc">Web-based Character view Tutorial</span></a> where you learn to make a web page that
<a class="reference internal" href="../../Web-Character-View-Tutorial.html"><span class="doc std std-doc">Web-based Character view Tutorial</span></a> where you learn to make a web page that
displays in-game character stats. You can also look at <a class="reference external" href="https://docs.djangoproject.com/en/1.7/intro/tutorial01/">Djangos own
tutorial</a> to get more insight in how Django
works and what possibilities exist.</p>
@ -172,7 +174,7 @@ works and what possibilities exist.</p>
<li><a class="reference internal" href="#">Web Tutorial</a><ul>
<li><a class="reference internal" href="#a-basic-overview">A Basic Overview</a></li>
<li><a class="reference internal" href="#changing-the-logo-on-the-front-page">Changing the logo on the front page</a></li>
<li><a class="reference internal" href="#changing-the-front-page-s-text">Changing the Front Pages Text</a></li>
<li><a class="reference internal" href="#changing-the-front-pages-text">Changing the Front Pages Text</a></li>
<li><a class="reference internal" href="#further-reading">Further reading</a></li>
</ul>
</li>
@ -198,7 +200,7 @@ works and what possibilities exist.</p>
<h3>Versions</h3>
<ul>
<li><a href="Web-Tutorial.html">1.0-dev (develop branch)</a></li>
<li><a href="../../../../0.9.5/index.html">0.9.5 (v0.9.5 branch)</a></li>
<li><a href="../../../../0.95/index.html">0.95 (v0.9.5 branch)</a></li>
</ul>
</div>