pugjs

    1熱度

    1回答

    我爲我的項目使用pugjs。我無法在pug模板中加載css文件。我使用下面的代碼 index.pug link(rel="stylesheet", href="views/styles/products.css", type="text/css") This is my project structure

    4熱度

    2回答

    這裏是我的index.js文件: const express = require('express') const app = express() app.set('views', __dirname + '/views'); app.set('view engine', 'pug') app.get('/', function (req, res) { res.render

    0熱度

    1回答

    我使用gulp與gulp-pug,這樣我可以在我的模板分割成可重用的組件。帕格抓住任何現有的* .pug(翡翠)文件,並將其轉換爲瀏覽器同步和/或項目構建(在我的情況下)的通用html文件。 gulp.task('views', function buildHTML() { return gulp.src('src/views/*.pug') .pipe(changed('src',

    0熱度

    1回答

    不管,如果我用一口哈巴狗或只是哈巴狗,我得到這個錯誤:即使它看起來 SyntaxError: Unexpected token (12:15) at Parser.pp$4.raise (C:\Users\freet\AppData\Roaming\npm\node_modules\pug\node_modules\acorn-globals\node_modules\acorn\dis

    1熱度

    1回答

    據我所知,帕格不支持動態包括或擴展模板。即 extend path/to/template 的作品,但不 extend #{dynamic_path_to_template} 有一種解決方法(但令人費解的),將允許修改 語境在運行時使用的視圖模板相同的目標:我的用例是我正在開發一個npm模塊,並且用於擴展其他視圖的模板位於模塊內部。在模塊發佈和安裝之後,路徑將被定義(即node_modul

    1熱度

    1回答

    我想在電子上使用帕格。 我有一個問題,我的第二個.pug文件無法正確顯示,它只是輸出帕格代碼本身。 首先我有一個由main.js doctype html(lang='en') head meta(charset='utf-8') title HIMS body div(id="app") script. require('

    0熱度

    2回答

    當我嘗試編譯此: doctype html html(lang="en") head meta(http-equiv = "Content-Type " content ="text/html ;charset=utf-8") title = category.name body h1 Сьпiс таварау h2 Катэгоры

    0熱度

    1回答

    誰能告訴我爲什麼哈巴狗API不具有簡單的例子,從他們的文檔頁面 const pug = require('pug'); // Compile the source code const compiledFunction = pug.compileFile('template.pug'); // Render a set of data console.log(compiledFunct

    4熱度

    2回答

    Hello guys我正在嘗試在pug html屬性中注入一個值。我似乎無法找到有關如何執行此操作的任何文檔。這裏是我的代碼 input(type='hidden', name='country', value='#{val.snippet.id.videoId}') ,你可以想像val.snippet.id.videoId只是一個javascript變量我從我的服務器端傳遞。所以我想將val

    1熱度

    2回答

    以下: span.M 很好地產生到: <span class='M'> 然而, span.glyphicon glyphicon-book 不起作用。 這是一種保存打字和轉換類名的方法嗎?