This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{# | |
Use case a podcast website: | |
- programs (have asset and categories) | |
- episodes (relation source) | |
#} | |
{# get all programs Ids #} | |
{% set allProgramsIds = craft.entries() | |
.section("programs") | |
.limit(null) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{# Layout File: src/_includes/layouts/sidebar.njk (in 11ty, layouts have to be in src/_includes by default) #} | |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>{{ metaTitle }}</title> | |
</head> | |
<body> | |
{% block content %}{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "sass-npm-scripts", | |
"version": "1.0.0", | |
"author": "Jérôme Coupé", | |
"description": "Minimal Sass NPM scripts", | |
"main": "index.js", | |
"scripts": { | |
"build:styles": "sass --style=compressed src/scss/:dist/css/", | |
"watch:styles": "onchange src/scss/**/*.scss -- npm run build:styles", | |
"watch": "npm-run-all --parallel watch:**", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Craft CMS deployments | |
on: | |
push: | |
branches: [master] | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{# variables #} | |
{% set allNews = [] %} | |
{% set today = "now"|date("Y-m-d") %} | |
{# create custom allNews array of objects #} | |
{% set news = craft.entries() | |
.section(["news"]) | |
.with([ | |
"newsImage" | |
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const cases = [ | |
{ | |
id: "123456", | |
title: "This is a case red blue", | |
categories: [ | |
{ id: "1", slug: "red" }, | |
{ id: "2", slug: "blue" } | |
] | |
}, | |
{ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Only use spaces to indent your .yml configuration. | |
# $SSH_USER $ROOT_PATH $SSH_IP:$SSH_PATH are environment variables | |
# image | |
image: node:latest | |
# pipelines | |
pipelines: | |
default: | |
- step: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
// Load plugins | |
const autoprefixer = require("autoprefixer"); | |
const browsersync = require("browser-sync").create(); | |
const cp = require("child_process"); | |
const cssnano = require("cssnano"); | |
const del = require("del"); | |
const eslint = require("gulp-eslint"); | |
const gulp = require("gulp"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
// --------------------------------------- | |
// packages | |
// --------------------------------------- | |
const del = require("del"); | |
const deleteEmpty = require("delete-empty"); | |
const globby = require("globby"); | |
const gulp = require("gulp"); |
NewerOlder