howto
This commit is contained in:
parent
159cb02bf0
commit
4261972931
|
@ -11,7 +11,6 @@
|
|||
"dependencies": {
|
||||
"express": "^4.16.2",
|
||||
"express-handlebars": "^3.0.0",
|
||||
"highlight": "^0.2.4",
|
||||
"highlight.js": "^9.12.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,5 +4,8 @@ const router = express.Router();
|
|||
router.get("/", (req, res) => {
|
||||
res.render("about");
|
||||
});
|
||||
router.get("/howto", (req, res) => {
|
||||
res.render("howto");
|
||||
});
|
||||
|
||||
export default router;
|
|
@ -2,7 +2,6 @@ import express from "express";
|
|||
const router = express.Router();
|
||||
|
||||
import highlight from "highlight.js";
|
||||
console.log(highlight.highlightAuto("<?php\necho 'blah';\n?>"));
|
||||
|
||||
router.get("/", (req, res) => {
|
||||
const data = {
|
||||
|
|
27
views/howto.handlebars
Normal file
27
views/howto.handlebars
Normal file
|
@ -0,0 +1,27 @@
|
|||
<h1><a name="howto">How to use fpaste.cc</a></h1>
|
||||
<p>To create a paste simply go to <a href="/">the start page</a> and enter your paste, add an optional description (see below) and select your highlighting language of choice.</p>
|
||||
<p>The <em>description</em> has a special markup language. You can: </p>
|
||||
<ul>
|
||||
<li>Reply to (mention) a paste by adding <pre class="inline">/<ID>/</pre> to your description. This is done automatically if you click the <pre class="inline">New reply</pre> button on the viewing page of a paste.</li>
|
||||
<li>Use tags to make it easier to find your pastes again. Simply add <pre class="inline">#<TAG></pre> to your description. A tag may consist of any number or char. Most of the common special chars are also supported.</li>
|
||||
</ul>
|
||||
<p>To customize the presentation of your paste you can use the URL to change syntax highlighting or the HTML layout:</p>
|
||||
<ul>
|
||||
<li><pre class="inline">fpaste.cc/<ID>/</pre> shows the full paste with layout and highlighting (notice the trailing slash)</li>
|
||||
<li><pre class="inline">fpaste.cc/<ID>/<LANGUAGE></pre> shows the full paste with the new <pre class="inline"><LANGUAGE></pre> syntax highlighting. You can either define the full language name, the common file extension or a full file name with extension, e.g. <pre class="inline">fpaste.cc/<ID>/Haskell</pre>, <pre class="inline">fpaste.cc/<ID>/hs</pre> or <pre class="inline">fpaste.cc/<ID>/example.hs</pre></li>
|
||||
<li><pre class="inline">fpaste.cc/<ID></pre> without a trailing slash shows the paste as plaintext without HTML markup (which makes it easy to download a paste)</li>
|
||||
</ul>
|
||||
<p><a name="filter"></a>Filtering pastes is done either by clicking IDs, tags or language links directly, or by using the following rules. Note that you can combine these rules, such that all of them have to be met for a paste to be listed.</p>
|
||||
<ul>
|
||||
<li><pre class="inline">/<ID>/</pre>: List all pastes that have or contain (in their description) the given ID</li>
|
||||
<li><pre class="inline">#<TAG></pre>: List all pastes that share the same tag</li>
|
||||
<li><pre class="inline">"<DESC>"</pre>: List all pastes where <DESC> is part of the description</li>
|
||||
<li><pre class="inline"><LANG></pre>: List all pastes with the given language (no special chars needed)</li>
|
||||
</ul>
|
||||
<p>On the main website all pages are accessible via one letter keywords:</p>
|
||||
<ul>
|
||||
<li><pre class="inline">fpaste.cc</pre> or <pre class="inline">fpaste.cc/</pre> is where you add new pastes</li>
|
||||
<li><pre class="inline">fpaste.cc/v</pre><em>view</em> all recent pastes</li>
|
||||
<li><pre class="inline">fpaste.cc/v/t/<TAG></pre> view all recent pastes which contain the given <em>tag</em> in their description</li>
|
||||
<li><pre class="inline">fpaste.cc/a</pre> is the current <em>about</em> page</li>
|
||||
</ul>
|
Loading…
Reference in New Issue
Block a user