<commit_before>var Express = require("express");
var brochure = new Express.Router();
var finder = require("finder");
var tex = require("./tools/tex");
var config = require("config");
var Breadcrumbs = require("./tools/breadcrumbs");

var TITLES = {
  publishing: "How to use Blot"
};

var REDIRECTS = {
  "/help/tags": "/publishing/metadata"
};

// Renders the folders and text editors
brochure.use(finder.middleware);

// Renders TeX
brochure.use(tex);

brochure.use(function(req, res, next) {
  res.locals.breadcrumbs = new Breadcrumbs();
  next();
});

// Renders dates dynamically
brochure.use(require("./tools/dates"));

// Fixes basic typographic errors
// See typeset.js for more information
brochure.use(require("./tools/typeset"));

// CSS required to render the windows
brochure.get("/css/finder.css", function(req, res) {
  res.setHeader("Content-Type", "text/css");
  res.send(finder.css());
});

brochure.get("/about", function(req, res) {
  res.locals.title = "Blot – About";
  res.render("about");
});

brochure.get("/support", function(req, res) {
  res.locals.title = "Blot – Support";
  res.render("support");
});

brochure.get("/contact", function(req, res) {
  res.locals.title = "Contact";
  res.render("contact");
});

brochure.get("/terms", function(req, res) {
  res.locals.title = "Terms of use";
  res.locals.layout = "/partials/layout-focussed.html";
  res.render("terms");
});

brochure.get("/privacy", function(req, res) {
  res.locals.title = "Privacy policy";
  res.locals.layout = "/partials/layout-focussed.html";
  res.render("privacy");
});

brochure.get("/sitemap.xml", require("./sitemap"));

brochure.use("/developers", require("./developers"));

// brochure.use("/templates", require("./templates"));

brochure.use("/news", require("./news"));

brochure.use("/sign-up", require("./sign-up"));

brochure.use("/log-in", require("./log-in"));

brochure.use(function(req, res, next) {
  res.locals.base = "";
  res.locals.selected = {};
  next();
});

brochure.param("section", function(req, res, next, section) {
  var title = TITLES[section] || capitalize(section);
  res.locals.sectionTitle = title;
  res.locals.selected[section] = "selected";
  res.locals.breadcrumbs.add(title, section);
  next();
});

brochure.param("subsection", function(req, res, next, subsection) {
  var title = TITLES[subsection] || capitalize(subsection);
  res.locals.sectionTitle = title;
  res.locals.selected[subsection] = "selected";
  res.locals.breadcrumbs.add(title, subsection);
  next();
});

brochure.param("subsubsection", function(req, res, next, subsubsection) {
  var title = TITLES[subsubsection] || capitalize(subsubsection);
  res.locals.sectionTitle = title;
  res.locals.selected[subsubsection] = "selected";
  res.locals.breadcrumbs.add(title, subsubsection);
  next();
});

brochure.get("/featured", function(req, res) {
  res.locals.layout = 'featured-layout';
  res.locals.featured = require("./featured/output.json");
  res.render("featured");
});


brochure.get("/", function(req, res) {
  res.locals.title = "Blot – A blogging platform with no interface";
  res.locals.selected.index = "selected";
  res.locals.featured = require("./featured/output.json");
  res.render("index");
});<commit_msg>Updated index page sites<commit_after>var Express = require("express");
var brochure = new Express.Router();
var finder = require("finder");
var tex = require("./tools/tex");
var config = require("config");
var Breadcrumbs = require("./tools/breadcrumbs");

var TITLES = {
  publishing: "How to use Blot"
};

var REDIRECTS = {
  "/help/tags": "/publishing/metadata"
};

// Renders the folders and text editors
brochure.use(finder.middleware);

// Renders TeX
brochure.use(tex);

brochure.use(function(req, res, next) {
  res.locals.breadcrumbs = new Breadcrumbs();
  next();
});

// Renders dates dynamically
brochure.use(require("./tools/dates"));

// Fixes basic typographic errors
// See typeset.js for more information
brochure.use(require("./tools/typeset"));

// CSS required to render the windows
brochure.get("/css/finder.css", function(req, res) {
  res.setHeader("Content-Type", "text/css");
  res.send(finder.css());
});

brochure.get("/about", function(req, res) {
  res.locals.title = "Blot – About";
  res.render("about");
});

brochure.get("/support", function(req, res) {
  res.locals.title = "Blot – Support";
  res.render("support");
});

brochure.get("/contact", function(req, res) {
  res.locals.title = "Contact";
  res.render("contact");
});

brochure.get("/terms", function(req, res) {
  res.locals.title = "Terms of use";
  res.locals.layout = "/partials/layout-focussed.html";
  res.render("terms");
});

brochure.get("/privacy", function(req, res) {
  res.locals.title = "Privacy policy";
  res.locals.layout = "/partials/layout-focussed.html";
  res.render("privacy");
});

brochure.get("/sitemap.xml", require("./sitemap"));

brochure.use("/developers", require("./developers"));

// brochure.use("/templates", require("./templates"));

brochure.use("/news", require("./news"));

brochure.use("/sign-up", require("./sign-up"));

brochure.use("/log-in", require("./log-in"));

brochure.use(function(req, res, next) {
  res.locals.base = "";
  res.locals.selected = {};
  next();
});

brochure.param("section", function(req, res, next, section) {
  var title = TITLES[section] || capitalize(section);
  res.locals.sectionTitle = title;
  res.locals.selected[section] = "selected";
  res.locals.breadcrumbs.add(title, section);
  next();
});

brochure.param("subsection", function(req, res, next, subsection) {
  var title = TITLES[subsection] || capitalize(subsection);
  res.locals.sectionTitle = title;
  res.locals.selected[subsection] = "selected";
  res.locals.breadcrumbs.add(title, subsection);
  next();
});

brochure.param("subsubsection", function(req, res, next, subsubsection) {
  var title = TITLES[subsubsection] || capitalize(subsubsection);
  res.locals.sectionTitle = title;
  res.locals.selected[subsubsection] = "selected";
  res.locals.breadcrumbs.add(title, subsubsection);
  next();
});

brochure.get("/", function(req, res) {
  res.locals.title = "Blot – A blogging platform with no interface";
  res.locals.selected.index = "selected";
  // Only show the first six sites on the homepage
  res.locals.featured = require("./featured/output.json").slice(0, 6);
  res.render("index");
});
{'fraction_non_alphanumeric': 0.1951984936450651, 'fraction_numerical': 0.00031382394476698575, 'mean_word_length': 4.752707581227437, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5872255', 'n_tokens_mistral': 2213, 'n_tokens_neox': 2221, 'n_words': 415}