Compare commits
4 commits
main
...
php-thames
Author | SHA1 | Date | |
---|---|---|---|
00917bf013 | |||
0fa5edbc9e | |||
af2b0bbdc9 | |||
1fc01d6630 |
1
.envrc
|
@ -1 +0,0 @@
|
|||
use flake
|
|
@ -1,2 +0,0 @@
|
|||
# Move source files into an `src` directory.
|
||||
51c5f5759d667821fc94b9ed170de9a43dfbc848
|
8
.gitignore
vendored
|
@ -1,8 +0,0 @@
|
|||
# Nix.
|
||||
/.direnv/
|
||||
/result
|
||||
|
||||
# pdfpc.
|
||||
/**/*.pdfpc
|
||||
|
||||
/**/*.pdf
|
|
@ -1,5 +0,0 @@
|
|||
vim.keymap.set("n", "<leader>ta", '_iTextAnnotation "<Esc>A"<Esc>j')
|
||||
vim.keymap.set("v", "<leader>ta", ':norm ITextAnnotation "<Esc>gv:norm A"<Esc>')
|
||||
|
||||
vim.keymap.set("n", "<Left>", "gT")
|
||||
vim.keymap.set("n", "<Right>", "gt")
|
|
@ -1,4 +0,0 @@
|
|||
Talks and Presentations by Oliver Davies
|
||||
########################################
|
||||
|
||||
The source files for `my presentation slides <https://www.oliverdavies.uk/presentations>`_, written in reStructuredText and compiled using `rst2pdf <https://rst2pdf.org>`_.
|
Before Width: | Height: | Size: 20 KiB |
|
@ -1,27 +0,0 @@
|
|||
.. raw:: pdf
|
||||
|
||||
PageBreak standardPage
|
||||
|
||||
Result
|
||||
======
|
||||
|
||||
- Easier and faster to create and onboard projects.
|
||||
- One canonical source of truth.
|
||||
- Easy to add new features and fixes for all projects.
|
||||
- Automation is easier due to consistency (e.g. Docker Compose service names).
|
||||
|
||||
Thanks!
|
||||
=======
|
||||
|
||||
References:
|
||||
|
||||
- https://opdavi.es/build-configs
|
||||
- https://github.com/opdavies/docker-example-drupal
|
||||
- https://github.com/opdavies/docker-example-drupal-commerce-kickstart
|
||||
- https://github.com/opdavies/docker-example-drupal-localgov
|
||||
|
||||
|
|
||||
|
||||
Me:
|
||||
|
||||
- https://www.oliverdavies.uk
|
|
@ -1,52 +0,0 @@
|
|||
.. raw:: pdf
|
||||
|
||||
PageBreak standardPage
|
||||
|
||||
Overriding Values
|
||||
=================
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
php:
|
||||
version: 8.1-fpm-bullseye
|
||||
# Disable PHPCS, PHPStan and PHPUnit.
|
||||
phpcs: false
|
||||
phpstan: false
|
||||
phpunit: false
|
||||
|
||||
# Ignore more directories from Git.
|
||||
git:
|
||||
ignore:
|
||||
- /bin/
|
||||
- /libraries/
|
||||
- /web/profiles/contrib/
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
TextAnnotation "Drupal Commerce Kickstart demo. No custom modules to test, and additional paths to ignore from Git."
|
||||
|
||||
PageBreak
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
dockerfile:
|
||||
stages:
|
||||
build:
|
||||
# What additional directories do we need?
|
||||
extra_directories:
|
||||
- config
|
||||
- patches
|
||||
- scripts
|
||||
|
||||
commands:
|
||||
- composer validate --strict
|
||||
- composer install
|
||||
|
||||
# What additional PHP extensions do we need?
|
||||
extensions:
|
||||
install: [bcmath]
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
TextAnnotation "Extra directories and PHP extensions that need to be added".
|
||||
|
|
@ -1,92 +0,0 @@
|
|||
Example
|
||||
=======
|
||||
|
||||
build.yaml:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
name: my-example-project
|
||||
type: drupal
|
||||
language: php
|
||||
|
||||
php:
|
||||
version: 8.1-fpm-bullseye
|
||||
|
||||
|
|
||||
|
||||
Dockerfile:
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
TextAnnotation "Abstract the project-specific values and configuration into this file."
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
FROM php:8.1-fpm-bullseye AS base
|
||||
|
||||
Configuring a Project
|
||||
=====================
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
php:
|
||||
version: 8.1-fpm-bullseye
|
||||
|
||||
# Which PHPCS standards should be used and on which paths?
|
||||
phpcs:
|
||||
paths: [web/modules/custom]
|
||||
standards: [Drupal, DrupalPractice]
|
||||
|
||||
# What level should PHPStan run and on what paths?
|
||||
phpstan:
|
||||
level: max
|
||||
paths: [web/modules/custom]
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
PageBreak
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
docker-compose:
|
||||
# Which Docker Compose services do we need?
|
||||
services:
|
||||
- database
|
||||
- php
|
||||
- web
|
||||
|
||||
dockerfile:
|
||||
stages:
|
||||
build:
|
||||
# What commands do we need to run?
|
||||
commands:
|
||||
- composer validate --strict
|
||||
- composer install
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
PageBreak
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
web:
|
||||
type: nginx # nginx, apache, caddy
|
||||
|
||||
database:
|
||||
type: mariadb # mariadb, mysql
|
||||
version: 10
|
||||
|
||||
# Where is Drupal located?
|
||||
drupal:
|
||||
docroot: web # web, docroot, null
|
||||
|
||||
experimental:
|
||||
createGitHubActionsConfiguration: true
|
||||
runGitHooksBeforePush: true
|
||||
useNewDatabaseCredentials: true
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
TextAnnotation "Experimental opt-in features that I want to trial on certain projects or to disable non-applicable features - e.g. GitHub Actions on Bitbucket."
|
||||
|
||||
PageBreak
|
|
@ -1,300 +0,0 @@
|
|||
.. raw:: pdf
|
||||
|
||||
PageBreak titlePage
|
||||
|
||||
.. class:: centredtitle
|
||||
|
||||
Build Configs internals
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
PageBreak standardPage
|
||||
|
||||
.. code-block::
|
||||
|
||||
src/
|
||||
Action/
|
||||
CreateFinalConfigurationData.php
|
||||
CreateListOfFilesToGenerate.php
|
||||
GenerateConfigurationFiles.php
|
||||
ValidateConfigurationData.php
|
||||
Command/
|
||||
GenerateCommand.php
|
||||
InitCommand.php
|
||||
DataTransferObject/
|
||||
ConfigDto.php
|
||||
TemplateFile.php
|
||||
Enum/
|
||||
Language.php
|
||||
ProjectType.php
|
||||
WebServer.php
|
||||
|
||||
.. code-block:: php
|
||||
:linenos:
|
||||
:startinline: true
|
||||
|
||||
protected function configure(): void
|
||||
$this
|
||||
->addOption(
|
||||
name: 'config-file',
|
||||
shortcut: ['c'],
|
||||
mode: InputOption::VALUE_REQUIRED,
|
||||
description: 'The path to the project\'s build.yaml file',
|
||||
default: 'build.yaml',
|
||||
)
|
||||
->addOption(
|
||||
name: 'output-dir',
|
||||
shortcut: ['o'],
|
||||
mode: InputOption::VALUE_REQUIRED,
|
||||
description: 'The directory to create files in',
|
||||
default: '.',
|
||||
);
|
||||
}
|
||||
|
||||
.. code-block:: php
|
||||
:linenos:
|
||||
:startinline: true
|
||||
|
||||
protected function execute(InputInterface $input, OutputInterface $output): int
|
||||
{
|
||||
$io = new SymfonyStyle($input, $output);
|
||||
|
||||
$configFile = $input->getOption(name: 'config-file');
|
||||
$outputDir = $input->getOption(name: 'output-dir');
|
||||
}
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
PageBreak
|
||||
|
||||
.. code-block:: php
|
||||
:linenos:
|
||||
:startinline: true
|
||||
|
||||
protected function execute(InputInterface $input, OutputInterface $output): int
|
||||
{
|
||||
// ...
|
||||
|
||||
$pipelines = [
|
||||
new CreateFinalConfigurationData(),
|
||||
|
||||
new ValidateConfigurationData(),
|
||||
|
||||
new CreateListOfFilesToGenerate(),
|
||||
|
||||
new GenerateConfigurationFiles(
|
||||
$this->filesystem,
|
||||
$this->twig,
|
||||
$outputDir,
|
||||
),
|
||||
];
|
||||
}
|
||||
|
||||
.. code-block:: php
|
||||
:linenos:
|
||||
:startinline: true
|
||||
|
||||
protected function execute(InputInterface $input, OutputInterface $output): int
|
||||
{
|
||||
// ...
|
||||
|
||||
/**
|
||||
* @var Collection<int,TemplateFile> $generatedFiles
|
||||
* @var ConfigDto $configurationData
|
||||
*/
|
||||
[$configurationData, $generatedFiles] = (new Pipeline())
|
||||
->send($configFile)
|
||||
->through($pipelines)
|
||||
->thenReturn();
|
||||
|
||||
$io->info("Building configuration for {$configurationData->name}.");
|
||||
|
||||
$io->write('Generated files:');
|
||||
$io->listing(static::getListOfFiles(filesToGenerate: $generatedFiles)->toArray());
|
||||
|
||||
return Command::SUCCESS;
|
||||
}
|
||||
|
||||
.. code-block:: php
|
||||
:linenos:
|
||||
:startinline: true
|
||||
|
||||
// CreateFinalConfigurationData.php
|
||||
|
||||
public function handle(string $configFile, \Closure $next) {
|
||||
{
|
||||
$configurationData = Yaml::parseFile(filename: $configFile);
|
||||
|
||||
$configurationData = array_replace_recursive(
|
||||
Yaml::parseFile(filename: __DIR__ . '/../../resources/build.defaults.yaml'),
|
||||
$configurationData,
|
||||
);
|
||||
|
||||
// ...
|
||||
|
||||
return $next($configurationData);
|
||||
}
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
PageBreak
|
||||
|
||||
.. code-block:: php
|
||||
:linenos:
|
||||
:startinline: true
|
||||
|
||||
// ValidateConfigurationData.php
|
||||
|
||||
public function handle(array $configurationData, \Closure $next)
|
||||
{
|
||||
// Convert the input to a configuration data object.
|
||||
$normalizer = new ObjectNormalizer(null, new CamelCaseToSnakeCaseNameConverter());
|
||||
$serializer = new Serializer([$normalizer], [new JsonEncoder()]);
|
||||
|
||||
$configurationDataDto = $serializer->deserialize(
|
||||
json_encode($configurationData),
|
||||
ConfigDto::class,
|
||||
'json',
|
||||
);
|
||||
|
||||
// ...
|
||||
}
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
PageBreak
|
||||
|
||||
.. code-block:: php
|
||||
:linenos:
|
||||
:startinline: true
|
||||
|
||||
// ValidateConfigurationData.php
|
||||
|
||||
public function handle(array $configurationData, \Closure $next)
|
||||
{
|
||||
// ...
|
||||
|
||||
$validator = Validation::createValidatorBuilder()
|
||||
->enableAnnotationMapping()
|
||||
->getValidator();
|
||||
$violations = $validator->validate($configurationDataDto);
|
||||
|
||||
if (0 < $violations->count()) {
|
||||
throw new \RuntimeException('Configuration is invalid.');
|
||||
}
|
||||
|
||||
return $next([$configurationData, $configurationDataDto]);
|
||||
}
|
||||
|
||||
.. code-block:: php
|
||||
:linenos:
|
||||
:startinline: true
|
||||
|
||||
// ConfigDto.php
|
||||
|
||||
#[Assert\Collection(
|
||||
allowExtraFields: false,
|
||||
fields: ['docroot' => new Assert\Choice([null, 'web', 'docroot'])],
|
||||
)]
|
||||
public array $drupal;
|
||||
|
||||
#[Assert\Collection([
|
||||
'ignore' => new Assert\Optional([
|
||||
new Assert\All([
|
||||
new Assert\Type('string'),
|
||||
]),
|
||||
]),
|
||||
])]
|
||||
public array $git;
|
||||
|
||||
#[Assert\Choice(choices: ['javascript', 'php', 'typescript'])]
|
||||
public string $language;
|
||||
|
||||
#[Assert\NotBlank]
|
||||
#[Assert\Type('string')]
|
||||
public string $name;
|
||||
|
||||
#[Assert\Type('string')]
|
||||
public string $projectRoot;
|
||||
|
||||
#[Assert\Choice(choices: [
|
||||
'drupal',
|
||||
'fractal',
|
||||
'php-library',
|
||||
'symfony',
|
||||
])]
|
||||
public string $type;
|
||||
|
||||
.. code-block:: php
|
||||
:startinline: true
|
||||
:linenos:
|
||||
|
||||
// CreateListOfFilesToGenerate.php
|
||||
|
||||
public function handle(array $configurationDataAndDto, \Closure $next)
|
||||
{
|
||||
/**
|
||||
* @var ConfigDto $configDto,
|
||||
* @var array<string,mixed> $configurationData
|
||||
*/
|
||||
[$configurationData, $configDto] = $configurationDataAndDto;
|
||||
|
||||
/** @var Collection<int, TemplateFile> */
|
||||
$filesToGenerate = collect();
|
||||
|
||||
// ...
|
||||
}
|
||||
|
||||
.. code-block:: php
|
||||
:startinline: true
|
||||
:linenos:
|
||||
|
||||
// CreateListOfFilesToGenerate.php
|
||||
|
||||
public function handle(array $configurationDataAndDto, \Closure $next)
|
||||
{
|
||||
// ...
|
||||
|
||||
if (!isset($configDto->php['phpunit']) || $configDto->php['phpunit'] !== false) {
|
||||
|
||||
$filesToGenerate->push(
|
||||
new TemplateFile(
|
||||
data: 'drupal/phpunit.xml.dist',
|
||||
name: 'phpunit.xml.dist',
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// ...
|
||||
|
||||
return $next([$configurationData, $configDto, $filesToGenerate]);
|
||||
}
|
||||
|
||||
.. code-block:: php
|
||||
:linenos:
|
||||
:startinline: true
|
||||
|
||||
// GenerateConfigurationFiles.php
|
||||
|
||||
public function handle(array $filesToGenerateAndConfigurationData, \Closure $next)
|
||||
{
|
||||
// ...
|
||||
|
||||
$filesToGenerate->each(function(TemplateFile $templateFile) use ($configurationData): void {
|
||||
if ($templateFile->path !== null) {
|
||||
if (!$this->filesystem->exists($templateFile->path)) {
|
||||
$this->filesystem->mkdir("{$this->outputDir}/{$templateFile->path}");
|
||||
}
|
||||
}
|
||||
|
||||
$sourceFile = "{$templateFile->data}.twig";
|
||||
|
||||
$outputFile = collect([$this->outputDir, $templateFile->path, $templateFile->name])
|
||||
->filter()->implode('/');
|
||||
|
||||
$this->filesystem->dumpFile($outputFile, $this->twig->render($sourceFile, $configurationData));
|
||||
});
|
||||
|
||||
return $next([$configurationDataDto, $filesToGenerate]);
|
||||
}
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
.. raw:: pdf
|
||||
|
||||
PageBreak standardPage
|
||||
|
||||
What is "Build Configs"?
|
||||
========================
|
||||
|
||||
- Command-line tool.
|
||||
- Inspired by Workspace, name from the TheAltF4Stream.
|
||||
- Built with Symfony.
|
||||
- Creates and manages build configuration files.
|
||||
- Customisable per-project.
|
||||
- Drupal, PHP library, Fractal (TypeScript).
|
||||
- "Sprint zero in a box".
|
||||
|
||||
What Problem Does it Solve?
|
||||
===========================
|
||||
|
||||
- I work on multiple similar projects.
|
||||
- Different configuration values - e.g. ``web`` vs. ``docroot``.
|
||||
- Different versions of PHP, node, etc.
|
||||
- Different Docker Compose (``fpm`` vs. ``apache`` images).
|
||||
- Each project was separate.
|
||||
- Difficult to add new features and fix bugs across all projects.
|
||||
- Inconsistencies across projects.
|
||||
- Out of the box solutions didn't seem like the best fit.
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
TextAnnotation "Multiple projects with similar but different configurations."
|
||||
TextAnnotation ""
|
||||
TextAnnotation "Out of the box solutions tend to focus on one technology, could be hard to customise, and usually had more than I nedeed."
|
||||
TextAnnotation ""
|
||||
TextAnnotation "Start small and build up instead of removing additional things."
|
||||
TextAnnotation ""
|
||||
TextAnnotation "More opportunities to learn the underlying technologies."
|
||||
|
||||
How Does it Work?
|
||||
=================
|
||||
|
||||
.. image:: diagram.png
|
||||
:width: 18cm
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
TextAnnotation "Canonical templates and project-specific configuration goes in, templates come out."
|
||||
|
||||
What Files Does it Generate?
|
||||
============================
|
||||
|
||||
- Dockerfile, Docker Compose, Nix Flake, php.ini, NGINX default.conf.
|
||||
- ``run`` file.
|
||||
- PHPUnit, PHPCS, PHPStan.
|
||||
- GitHub Actions workflow.
|
||||
- Git hooks.
|
|
@ -1,117 +0,0 @@
|
|||
.. raw:: pdf
|
||||
|
||||
PageBreak standardPage
|
||||
|
||||
Dockerfile.twig
|
||||
===============
|
||||
|
||||
.. code-block:: twig
|
||||
:linenos:
|
||||
|
||||
FROM php:{{ php.version }} AS base
|
||||
|
||||
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
|
||||
RUN which composer && composer -V
|
||||
|
||||
ARG DOCKER_UID=1000
|
||||
ENV DOCKER_UID="${DOCKER_UID}"
|
||||
|
||||
WORKDIR {{ project_root }}
|
||||
|
||||
RUN adduser --disabled-password --uid "${DOCKER_UID}" app \
|
||||
&& chown app:app -R {{ project_root }}
|
||||
|
||||
Dockerfile.twig
|
||||
===============
|
||||
|
||||
.. code-block:: twig
|
||||
:linenos:
|
||||
|
||||
{% if dockerfile.stages.build.extensions.install %}
|
||||
RUN docker-php-ext-install
|
||||
{{ dockerfile.stages.build.extensions.install|join(' ') }}
|
||||
{% endif %}
|
||||
|
||||
COPY --chown=app:app phpunit.xml* ./
|
||||
|
||||
{% if dockerfile.stages.build.extra_files %}
|
||||
COPY --chown=app:app {{ dockerfile.stages.build.extra_files|join(" ") }} ./
|
||||
{% endif %}
|
||||
|
||||
{% for directory in dockerfile.stages.build.extra_directories %}
|
||||
COPY --chown=app:app {{ directory }} {{ directory }}
|
||||
{% endfor %}
|
||||
|
||||
docker-compose.yaml.twig
|
||||
========================
|
||||
|
||||
.. code-block:: twig
|
||||
:linenos:
|
||||
|
||||
services:
|
||||
{% if "web" in dockerCompose.services %}
|
||||
web:
|
||||
<<: [*default-proxy, *default-app]
|
||||
build:
|
||||
context: .
|
||||
target: web
|
||||
depends_on:
|
||||
- php
|
||||
profiles: [web]
|
||||
{% endif %}
|
||||
|
||||
phpstan.neon.dist.twig
|
||||
======================
|
||||
|
||||
.. code-block:: twig
|
||||
:linenos:
|
||||
|
||||
parameters:
|
||||
level: {{ php.phpstan.level }}
|
||||
excludePaths:
|
||||
- *Test.php
|
||||
- *TestBase.php
|
||||
paths:
|
||||
{% for path in php.phpstan.paths -%}
|
||||
- {{ path }}
|
||||
{%- endfor %}
|
||||
|
||||
{% if php.phpstan.baseline %}
|
||||
includes:
|
||||
- phpstan-baseline.neon
|
||||
{% endif %}
|
||||
|
||||
phpunit.xml.dist.twig
|
||||
=====================
|
||||
|
||||
.. code-block:: twig
|
||||
:linenos:
|
||||
|
||||
<phpunit
|
||||
beStrictAboutChangesToGlobalState="true"
|
||||
beStrictAboutOutputDuringTests="false"
|
||||
beStrictAboutTestsThatDoNotTestAnything="true"
|
||||
bootstrap="{{ drupal.docroot }}/core/tests/bootstrap.php"
|
||||
cacheResult="false"
|
||||
colors="true"
|
||||
failOnWarning="true"
|
||||
printerClass="\Drupal\Tests\Listeners\HtmlOutputPrinter"
|
||||
>
|
||||
|
||||
phpunit.xml.dist.twig
|
||||
=====================
|
||||
|
||||
.. code-block:: twig
|
||||
:linenos:
|
||||
|
||||
<testsuites>
|
||||
<testsuite name="functional">
|
||||
<directory>./{{ drupal.docroot }}/modules/custom/**/tests/**/Functional</directory>
|
||||
</testsuite>
|
||||
<testsuite name="kernel">
|
||||
<directory>./{{ drupal.docroot }}/modules/custom/**/tests/**/Kernel</directory>
|
||||
</testsuite>
|
||||
<testsuite name="unit">
|
||||
<directory>./{{ drupal.docroot }}/modules/custom/**/tests/**/Unit</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
|
@ -1,29 +0,0 @@
|
|||
.. footer:: @opdavies
|
||||
|
||||
Building "Build Configs"
|
||||
########################
|
||||
|
||||
.. class:: titleslideinfo
|
||||
|
||||
Oliver Davies (@opdavies)
|
||||
|
||||
|
|
||||
|
||||
.. class:: titleslideinfo
|
||||
|
||||
https://opdavi.es/bco
|
||||
|
||||
.. include:: ./sections/intro.rst
|
||||
.. include:: ./sections/example.rst
|
||||
.. include:: ./sections/customisation.rst
|
||||
.. include:: ./sections/templates.rst
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
PageBreak titlePage
|
||||
|
||||
.. class:: centredtitle
|
||||
|
||||
Demo
|
||||
|
||||
.. include:: ./sections/conclusion.rst
|
|
@ -1,4 +0,0 @@
|
|||
Building and presenting slide decks with rst2pdf
|
||||
################################################
|
||||
|
||||
https://www.oliverdavies.uk/talks/building-presenting-slide-decks-rst2pdf
|
|
@ -1,12 +0,0 @@
|
|||
rst2pdf slides.rst
|
||||
|
||||
|
||||
rst2pdf slides.rst --break-level 1 --stylesheets main
|
||||
|
||||
|
||||
rst2pdf slides.rst \
|
||||
--output slides.pdf \
|
||||
--stylesheets main \
|
||||
--break-level 1 \
|
||||
--fit-background-mode scale \
|
||||
--extension-module preprocess
|
|
@ -1,4 +0,0 @@
|
|||
.. code-block:: javascript
|
||||
:include: code/additional-config-options.txt
|
||||
:hl_lines: 2 3 4
|
||||
:linenos:
|
|
@ -1 +0,0 @@
|
|||
.. include:: sections/intro.rst
|
|
@ -1,3 +0,0 @@
|
|||
.. raw:: pdf
|
||||
|
||||
PageBreak standardPage
|
|
@ -1,6 +0,0 @@
|
|||
pageTemplates:
|
||||
standardPage:
|
||||
frames: []
|
||||
[3%, 3%, 92%, 92%]
|
||||
showFooter: true
|
||||
showHeader: false
|
|
@ -1,29 +0,0 @@
|
|||
linkColor: #24608a
|
||||
|
||||
styles:
|
||||
normal:
|
||||
fontSize: 24
|
||||
leading: 32
|
||||
textColor: #383745
|
||||
|
||||
bodytext:
|
||||
alignment: TA_LEFT
|
||||
|
||||
heading:
|
||||
fontSize: 20
|
||||
spaceAfter: 16
|
||||
textColor: #24608a
|
||||
|
||||
title:
|
||||
fontSize: 300%
|
||||
parent: heading
|
||||
textColor: white
|
||||
|
||||
bullet-list:
|
||||
commands: []
|
||||
[LEFTPADDING, [0, 0], [1, -1], 10]
|
||||
[RIGHTPADDING, [0, 0], [1, -1], 0]
|
||||
[VALIGN, [0, 0], [-1, -1], TOP]
|
||||
colWidths: ["20", null]
|
||||
textColor: #aaaaaa
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
Building and presenting slide decks with rst2pdf
|
||||
################################################
|
||||
|
||||
.. class:: titleslideinfo
|
||||
|
||||
Oliver Davies (@opdavies)
|
||||
|
||||
|
||||
What is rst2pdf?
|
||||
================
|
||||
|
||||
* "Use a text editor. Make a PDF."
|
||||
* reStructuredText to PDF
|
||||
* Each slide is a page
|
|
@ -1,14 +0,0 @@
|
|||
.. image:: images/editing.png
|
||||
:width: 20cm
|
||||
|
||||
|
||||
.. code-block:: php
|
||||
:startinline: true
|
||||
:linenos:
|
||||
|
||||
echo 'Hello world!';
|
||||
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
TextAnnotation "This is a speaker note."
|
|
@ -1,8 +0,0 @@
|
|||
nodemon --ext rst,style,txt --exec "
|
||||
rst2pdf slides.rst \
|
||||
--output slides.pdf \
|
||||
--stylesheets main \
|
||||
--break-level 1 \
|
||||
--fit-background-mode scale \
|
||||
--extension-module preprocess
|
||||
"
|
Before Width: | Height: | Size: 225 KiB |
Before Width: | Height: | Size: 71 KiB |
Before Width: | Height: | Size: 119 KiB |
|
@ -1,169 +0,0 @@
|
|||
.. footer:: @opdavies
|
||||
|
||||
Building and presenting slide decks with rst2pdf
|
||||
################################################
|
||||
|
||||
|
|
||||
|
||||
.. class:: titleslideinfo
|
||||
|
||||
Oliver Davies (@opdavies)
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
TextAnnotation "Gave my first talk in 2012."
|
||||
TextAnnotation "A talk about a tool (rst2pdf) that I've been using for the last couple of talks."
|
||||
|
||||
.. page:: standardPage
|
||||
|
||||
What have I used before?
|
||||
========================
|
||||
|
||||
* **UI based:** Keynote, Google Slides, slides.com
|
||||
* **HTML/JavaScript:** reveal.js
|
||||
* **Markdown:** Deckset, Marp, reveal-md
|
||||
|
||||
What is rst2pdf?
|
||||
================
|
||||
|
||||
* "Use a text editor. Make a PDF."
|
||||
* reStructuredText to PDF
|
||||
* Each slide is a page
|
||||
* Page templates for layouts
|
||||
* Not just for slide decks
|
||||
* Table of contents, page numbers, headers, footers
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
TextAnnotation "Use the tools you're familiar with."
|
||||
TextAnnotation "Similar to Markdown."
|
||||
TextAnnotation "Primarily used for technical documentation within the Python community."
|
||||
TextAnnotation "Now maintained by PHPers Rob Allen and Lorna Jane Mitchell."
|
||||
TextAnnotation "Breaks at titles automatically, or you can add manual page breaks."
|
||||
|
||||
Advantages
|
||||
==========
|
||||
|
||||
* Easy to start a new presentation, or update an existing one
|
||||
* Version controllable
|
||||
* Portable
|
||||
* Content is searchable
|
||||
* Easy to re-use content and/or styling
|
||||
* Slides uploaded to SpeakerDeck straight away
|
||||
|
||||
.. page:: imagePage
|
||||
|
||||
.. image:: images/editing.png
|
||||
:width: 23cm
|
||||
|
||||
.. page:: standardPage
|
||||
|
||||
Useful reStructuredText
|
||||
=======================
|
||||
|
||||
.. code-block:: rst
|
||||
:include: code/useful-rst-1.txt
|
||||
:linenos:
|
||||
|
||||
Useful reStructuredText
|
||||
=======================
|
||||
|
||||
.. code-block:: rst
|
||||
:include: code/useful-rst-2.txt
|
||||
:linenos:
|
||||
|
||||
Page Templates
|
||||
==============
|
||||
|
||||
main.style:
|
||||
|
||||
.. code-block:: yaml
|
||||
:include: code/page-templates-style.txt
|
||||
|
||||
slides.rst:
|
||||
|
||||
.. code-block:: rst
|
||||
:include: code/page-templates-rst.txt
|
||||
|
||||
Keeping things organised
|
||||
========================
|
||||
|
||||
Split slides into different sections:
|
||||
|
||||
.. code-block:: rst
|
||||
:include: code/includes-sections.txt
|
||||
|
||||
|
|
||||
|
||||
Including code snippets from separate files:
|
||||
|
||||
.. code-block:: rst
|
||||
:include: code/includes-code.txt
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
TextAnnotation "Includes!"
|
||||
|
||||
Styling
|
||||
=======
|
||||
|
||||
.. code-block:: yaml
|
||||
:include: code/styling.txt
|
||||
:linenos:
|
||||
|
||||
Building
|
||||
========
|
||||
|
||||
.. code-block::
|
||||
:include: code/building.txt
|
||||
|
||||
Watching
|
||||
========
|
||||
|
||||
Re-compiling when something changes.
|
||||
|
||||
|
|
||||
|
||||
.. code-block:: bash
|
||||
:include: code/watching.txt
|
||||
|
||||
Presenting
|
||||
==========
|
||||
|
||||
``pdfpc`` - PDF presenter console
|
||||
|
||||
|
|
||||
|
||||
.. code-block::
|
||||
|
||||
pdfpc slides.pdf
|
||||
|
||||
.. page:: imagePage
|
||||
|
||||
.. image:: images/pdfpc-1.png
|
||||
:width: 23cm
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
PageBreak
|
||||
|
||||
.. image:: images/pdfpc-2.png
|
||||
:width: 23cm
|
||||
|
||||
.. page:: standardPage
|
||||
|
||||
Thanks!
|
||||
=======
|
||||
|
||||
References:
|
||||
|
||||
* https://rst2pdf.org
|
||||
* https://github.com/rst2pdf/rst2pdf
|
||||
* https://github.com/opdavies/talks
|
||||
* https://oliverdavies.link/lorna-rst2pdf-talk
|
||||
|
||||
|
|
||||
|
||||
Me:
|
||||
|
||||
* https://www.oliverdavies.uk
|
20
building-static-websites-sculpin/demo/.gitignore
vendored
|
@ -1,10 +1,18 @@
|
|||
/output_*/
|
||||
|
||||
/.phpunit.cache
|
||||
/.phpunit.result.cache
|
||||
/output_*/
|
||||
/vendor/
|
||||
|
||||
# Nix
|
||||
/.direnv/
|
||||
|
||||
# Composer
|
||||
/vendor/
|
||||
/source/build/*
|
||||
!/source/build/.keep
|
||||
|
||||
# Devenv
|
||||
.devenv*
|
||||
devenv.local.nix
|
||||
|
||||
# direnv
|
||||
.direnv
|
||||
|
||||
# pre-commit
|
||||
.pre-commit-config.yaml
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
sculpin_content_types:
|
||||
# speakers:
|
||||
# permalink: /speakers/:basename/
|
||||
# talks:
|
||||
# permalink: /talks/:basename/
|
||||
speakers:
|
||||
permalink: /speakers/:basename/
|
||||
talks:
|
||||
permalink: /talks/:basename/
|
||||
posts:
|
||||
enabled: false
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
name: 'My New Sculpin Site'
|
||||
name: 'PHP Thames Valley'
|
||||
locale: en
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
export PATH="$PATH:./vendor/bin"
|
||||
|
||||
sculpin generate "$@"
|
|
@ -1,3 +0,0 @@
|
|||
---
|
||||
name: demo
|
||||
template: php-sculpin
|
|
@ -1,5 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
rm -rfv output_* vendor
|
|
@ -1,26 +1,22 @@
|
|||
{
|
||||
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
|
||||
outputs = inputs:
|
||||
outputs =
|
||||
{ nixpkgs, ... }:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = import inputs.nixpkgs { inherit system; };
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
in
|
||||
{
|
||||
devShells.${system}.default =
|
||||
with pkgs;
|
||||
mkShell {
|
||||
buildInputs = [
|
||||
nodePackages.browser-sync
|
||||
|
||||
(php83.buildEnv {
|
||||
extraConfig = ''
|
||||
error_reporting = E_ALL & ~E_DEPRECATED & ~E_USER_DEPRECATED
|
||||
'';
|
||||
})
|
||||
|
||||
php83
|
||||
php83Packages.composer
|
||||
];
|
||||
};
|
||||
|
||||
formatters.${system} = pkgs.nixfmt-rfc-style;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -2,4 +2,18 @@
|
|||
|
||||
{% block content_wrapper %}
|
||||
<h1>{{ page.name }}</h1>
|
||||
|
||||
<img style="height: 50px; width: 50px;" src="{{ page.imageUrl }}"/>
|
||||
|
||||
{% block content %}{% endblock %}
|
||||
|
||||
<hr>
|
||||
|
||||
{% for talk in data.talks if talk.speakers.0 == page.name %}
|
||||
<li>
|
||||
<a href="{{ talk.url }}">
|
||||
{{ talk.title }}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -2,4 +2,10 @@
|
|||
|
||||
{% block content_wrapper %}
|
||||
<h1>{{ page.title }}</h1>
|
||||
|
||||
{{ page.date|date('jS F Y') }}
|
||||
|
||||
{% for speaker in page.speakers %}
|
||||
{{ speaker }}
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
---
|
||||
name: Dan Leech
|
||||
imageUrl: /images/highres_257208698.jpeg
|
||||
layout: speaker
|
||||
use: [talks]
|
||||
---
|
||||
|
|
|
@ -1,4 +1,15 @@
|
|||
---
|
||||
layout: base
|
||||
title: Hello, World!
|
||||
title: Hello, PHP Thames Valley!
|
||||
use: [talks]
|
||||
---
|
||||
|
||||
<ul>
|
||||
{% for talk in data.talks %}
|
||||
<li>
|
||||
<a href="{{ talk.url }}">
|
||||
{{ talk.title }}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
export PATH="$PATH:./vendor/bin"
|
||||
|
||||
sculpin generate --server --watch "$@"
|
|
@ -1,4 +0,0 @@
|
|||
Building static websites with Sculpin
|
||||
#####################################
|
||||
|
||||
https://www.oliverdavies.uk/talks/building-static-websites-sculpin
|
|
@ -1,5 +0,0 @@
|
|||
---
|
||||
name: oliverdavies.uk
|
||||
menu_links:
|
||||
- { title: Home, href: / }
|
||||
- { title: About, href: /about }
|
|
@ -1,10 +0,0 @@
|
|||
---
|
||||
title: My Daily Email Archive
|
||||
layout: default
|
||||
use:
|
||||
- daily_email
|
||||
---
|
||||
|
||||
{% for email in data.daily_emails %}
|
||||
<p>{{ email.title }}</p>
|
||||
{% endfor %}
|
|
@ -1,12 +0,0 @@
|
|||
---
|
||||
...
|
||||
testimonials:
|
||||
- { name: ..., role: ..., text: ..., url: ... }
|
||||
- { name: ..., role: ..., text: ..., url: ... }
|
||||
- { name: ..., role: ..., text: ..., url: ... }
|
||||
---
|
||||
|
||||
{% for testimonial in page.testimonials %}
|
||||
<h2>{{ testimonial.name }} - {{ testimonial.role }}</h2>
|
||||
<p>{{ testimonial.text }}</p>
|
||||
{% endfor %}
|
|
@ -1,5 +0,0 @@
|
|||
---
|
||||
layout: post
|
||||
title: New blog post
|
||||
draft: yes
|
||||
---
|
|
@ -1,9 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Hello!</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Hello, World!</p>
|
||||
</body>
|
||||
</html>
|
|
@ -1,6 +0,0 @@
|
|||
---
|
||||
layout: default
|
||||
title: Hello!
|
||||
---
|
||||
|
||||
Hello, World!
|
|
@ -1,11 +0,0 @@
|
|||
{# source/_layouts/base.html.twig #}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ site.locale|default('en') }}">
|
||||
<head>
|
||||
<title>{{ site.name|default('Sculpin Skeleton') }}</title>
|
||||
</head>
|
||||
<body>
|
||||
{% block body %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
|
@ -1,7 +0,0 @@
|
|||
{# source/_layouts/page.html.twig #}
|
||||
|
||||
{% extends 'base' %}
|
||||
|
||||
{% block body %}
|
||||
{% block content %}{% endblock %}
|
||||
{% endblock %}
|
|
@ -1,13 +0,0 @@
|
|||
app/
|
||||
config/
|
||||
sculpin_kernel.yml
|
||||
sculpin_site.yml
|
||||
composer.json
|
||||
composer.lock
|
||||
output_dev/
|
||||
output_prod/
|
||||
source/
|
||||
_includes/
|
||||
_templates/
|
||||
index.md
|
||||
vendor/
|
|
@ -1,8 +0,0 @@
|
|||
{{ 'today' }}
|
||||
|
||||
{{ 'today'|date }}
|
||||
|
||||
{{ 'today'|date('Y') }}
|
||||
|
||||
{{ 'today'|date('Y') - 2007 }} # 18 (years of experience)
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
---
|
||||
title: Building Static Websites with Sculpin
|
||||
events:
|
||||
- name: PHP Berkshire
|
||||
date: 2024-08-28
|
||||
location: Reading, UK
|
||||
url: https://www.meetup.com/php-berkshire/events/301850284
|
||||
- name: BrumPHP
|
||||
date: 2024-05-23
|
||||
location: Birmingham, UK
|
||||
url: https://www.eventbrite.com/e/brumphp-23rd-may-2024-tickets-803037766577
|
||||
---
|
||||
// end yaml
|
||||
|
||||
// start twig
|
||||
{% set talkCount = 0 %}
|
||||
|
||||
{% for talk in data.talks %}
|
||||
{% for event in talk.events if 'today'|date('U') >= event.date|date('U') %}
|
||||
{% set talkCount = talkCount + 1 %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
<p>I have given {{ talkCount }} talks.</p>
|
|
@ -1,15 +0,0 @@
|
|||
{% set talks = site.talks|filter(talk => talk.speaker == page.name) %}
|
||||
|
||||
{% if talks is not empty %}
|
||||
<section>
|
||||
<h2>Talks by {{ page.name }}</h2>
|
||||
|
||||
<div>
|
||||
<ul>
|
||||
{% for talk in talks %}
|
||||
<li><a href="#0">{{ talk.title }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
{% endif %}
|
|
@ -1,8 +0,0 @@
|
|||
- Adding a new page (`/talks`)
|
||||
- Adding a new menu link
|
||||
- Adding a new content type (talks)
|
||||
- Add a new talk
|
||||
- Show how to use page-level variables, adding events to a talk
|
||||
- Adding the talks page to the menu
|
||||
- Active menu link styling?
|
||||
- Generating a production version of the site
|
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 126 KiB |
Before Width: | Height: | Size: 135 KiB |
|
@ -1,723 +0,0 @@
|
|||
Building static websites with Sculpin
|
||||
#####################################
|
||||
|
||||
|
|
||||
|
||||
.. class:: titleslideinfo
|
||||
|
||||
Oliver Davies
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
PageBreak imagePage
|
||||
|
||||
.. image:: images/druplicon.png
|
||||
:width: 10cm
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
PageBreak
|
||||
TextAnnotation "I primarily work with Drupal and have been a Drupal developer since 2007/8."
|
||||
TextAnnotation "Drupal, WordPress, etc need PHP and a database to run."
|
||||
TextAnnotation "Difficult for new Developers."
|
||||
TextAnnotation "Complex for personal projects."
|
||||
TextAnnotation "Hosting can be expensive."
|
||||
|
||||
.. image:: images/sculpin.png
|
||||
:width: 10cm
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
TextAnnotation "Sculpin - a static site generator written in PHP."
|
||||
TextAnnotation "Not a Sculpin vs. x talk, but I'll make comparisons and comments based on my own experience."
|
||||
PageBreak
|
||||
|
||||
What is a static website?
|
||||
=========================
|
||||
|
||||
.. code::
|
||||
|
||||
.htaccess
|
||||
assets/images/od-logo.jpg
|
||||
bco/index.html
|
||||
build/tailwind.css
|
||||
call/index.html
|
||||
daily/2024/03/18/automated-drupal-11-compatibility-fixes/index.html
|
||||
drupal-upgrade/index.html
|
||||
favicon.ico
|
||||
index.html
|
||||
podcast/19-sam-mortenson/index.html
|
||||
pricing/index.html
|
||||
talks/taking-flight-with-tailwind-css/index.html
|
||||
talks/tdd-test-driven-drupal/index.html
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
TextAnnotation "Before I talk about static site generators, let's talk about static websites."
|
||||
TextAnnotation "Some of the files from my website."
|
||||
TextAnnotation "HTML, CSS, JS. No PHP or server-side code."
|
||||
TextAnnotation "How I started building websites."
|
||||
TextAnnotation "The things you usually have a CMS or framework generate."
|
||||
|
||||
What is Sculpin?
|
||||
================
|
||||
|
||||
* Static site generator.
|
||||
* Developed by Beau Simensen.
|
||||
* Maintained by Kevin Boyd (beryllium).
|
||||
* CLI tool.
|
||||
* Built on Symfony components.
|
||||
* Markdown + Twig = Static HTML.
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
TextAnnotation "Uses various Symfony components - Console, config, DI, Filesystem, Finder, HttpKernel, YAML."
|
||||
TextAnnotation "Uses Twig - Symfony's templating language."
|
||||
TextAnnotation ""
|
||||
TextAnnotation "Transforms markdown files and Twig templates into static HTML websites, 'generates' a static website that can easily be deployed."
|
||||
|
||||
Why use a static site generator?
|
||||
================================
|
||||
|
||||
- Rapid development.
|
||||
- Templating.
|
||||
- Security.
|
||||
- Performance.
|
||||
- Easy and cheap to host.
|
||||
- Fun vs. work.
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
TextAnnotation "Leveraging templating features, such as conditionals, loops, partials and includes, template inheritance."
|
||||
TextAnnotation "Static websites are fast and secure as they don't have a database and only need a simple hosting environment with a basic web server."
|
||||
TextAnnotation "Works with a simple Apache, Nginx or Caddy server, or with services like Vercel and Netlify."
|
||||
|
||||
What do I use it for?
|
||||
=====================
|
||||
|
||||
* My personal website.
|
||||
* Some client websites.
|
||||
* HTML prototypes and testing.
|
||||
* Learning YAML and Twig (and some Symfony).
|
||||
|
||||
Installation
|
||||
============
|
||||
|
||||
``composer require sculpin/sculpin``
|
||||
|
||||
|
|
||||
|
||||
``composer create-project sculpin/blog-skeleton my-blog``
|
||||
|
||||
|
|
||||
|
||||
``composer create-project opdavies/sculpin-skeleton my-site``
|
||||
|
||||
Using Sculpin
|
||||
=============
|
||||
|
||||
* Configuration in ``app/config``
|
||||
* Source files in ``source``.
|
||||
|
||||
* Templates in ``source/_templates`` or ``source/_layouts``.
|
||||
* Includes in ``source/_includes`` or ``source/_partials``.
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
PageBreak
|
||||
|
||||
.. code-block::
|
||||
:include: ./code/project-structure.txt
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
TextAnnotation "The file structure of a Sculpin project."
|
||||
PageBreak
|
||||
|
||||
.. code-block:: bash
|
||||
:include: ./code/project-structure.txt
|
||||
:hl_lines: 5,6,13
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
TextAnnotation "PHP-based project."
|
||||
PageBreak
|
||||
|
||||
.. code-block:: bash
|
||||
:include: ./code/project-structure.txt
|
||||
:hl_lines: 1,2,3,4
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
TextAnnotation "Configuration."
|
||||
PageBreak
|
||||
|
||||
.. code-block:: shell
|
||||
:include: ./code/project-structure.txt
|
||||
:hl_lines: 9,10,11,12
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
TextAnnotation "Source files."
|
||||
PageBreak
|
||||
|
||||
.. code-block:: bash
|
||||
:include: ./code/project-structure.txt
|
||||
:hl_lines: 7,8
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
TextAnnotation "Output directories with generated files."
|
||||
|
||||
Generate a site
|
||||
===============
|
||||
|
||||
* ``vendor/bin/sculpin generate``
|
||||
* ``--server``
|
||||
* ``--watch``
|
||||
* ``--env``
|
||||
|
||||
source/index.md
|
||||
===============
|
||||
|
||||
.. code-block::
|
||||
:include: code/index.md.txt
|
||||
|
||||
|
||||
source/index.md
|
||||
===============
|
||||
|
||||
.. code-block:: bash
|
||||
:include: code/index.md.txt
|
||||
:hl_lines: 1,2,3,4
|
||||
|
||||
source/index.md
|
||||
===============
|
||||
|
||||
.. code-block:: bash
|
||||
:include: code/index.md.txt
|
||||
:hl_lines: 2
|
||||
|
||||
source/index.md
|
||||
===============
|
||||
|
||||
.. code-block:: bash
|
||||
:include: code/index.md.txt
|
||||
:hl_lines: 3
|
||||
|
||||
source/index.md
|
||||
===============
|
||||
|
||||
.. code-block:: bash
|
||||
:include: code/index.md.txt
|
||||
:hl_lines: 6
|
||||
|
||||
output_dev/index.html
|
||||
=====================
|
||||
|
||||
.. code-block:: html
|
||||
:include: ./code/index.html.txt
|
||||
|
||||
output_dev/index.html
|
||||
=====================
|
||||
|
||||
.. code-block:: html
|
||||
:include: ./code/index.html.txt
|
||||
:hl_lines: 4
|
||||
|
||||
output_dev/index.html
|
||||
=====================
|
||||
|
||||
.. code-block:: html
|
||||
:include: ./code/index.html.txt
|
||||
:hl_lines: 7
|
||||
|
||||
Configuration
|
||||
=============
|
||||
|
||||
- Stored in ``app/config``
|
||||
|
||||
- ``sculpin_site.yml``
|
||||
- ``sculpin_site_{env}.yml``
|
||||
|
||||
- Key-value pairs
|
||||
|
||||
|
|
||||
|
||||
.. code-block:: yaml
|
||||
:include: code/configuration.txt
|
||||
|
||||
Using on pages
|
||||
==============
|
||||
|
||||
.. code-block:: html
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>{{ site.name }}</title>
|
||||
</head>
|
||||
</html>
|
||||
|
||||
YAML front matter
|
||||
=================
|
||||
|
||||
.. code-block:: yaml
|
||||
:include: ./code/front-matter1.txt
|
||||
|
||||
YAML front matter
|
||||
=================
|
||||
|
||||
.. code-block:: yaml
|
||||
:include: ./code/front-matter1.txt
|
||||
:hl_lines: 2
|
||||
|
||||
YAML front matter
|
||||
=================
|
||||
|
||||
.. code-block:: yaml
|
||||
:include: ./code/front-matter1.txt
|
||||
:hl_lines: 3
|
||||
|
||||
YAML front matter
|
||||
=================
|
||||
|
||||
.. code-block:: yaml
|
||||
:include: ./code/front-matter1.txt
|
||||
:hl_lines: 4
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
TextAnnotation "Draft pages aren't generated when env=prod".
|
||||
|
||||
More front matter
|
||||
=================
|
||||
|
||||
.. code-block:: yaml
|
||||
:hl_lines: 5,6,7,8
|
||||
|
||||
---
|
||||
layout: post
|
||||
title: New blog post
|
||||
draft: yes
|
||||
tags:
|
||||
- drupal
|
||||
- php
|
||||
- sculpin
|
||||
---
|
||||
|
||||
Even more front matter
|
||||
======================
|
||||
|
||||
.. code-block:: yaml
|
||||
:hl_lines: 9,10
|
||||
|
||||
---
|
||||
layout: post
|
||||
title: New blog post
|
||||
draft: yes
|
||||
tags:
|
||||
- drupal
|
||||
- php
|
||||
- sculpin
|
||||
tweets: yes
|
||||
foo: bar
|
||||
---
|
||||
|
||||
Using on pages
|
||||
==============
|
||||
|
||||
.. code-block:: twig
|
||||
:include: ./code/front-matter-on-pages.txt
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
PageBreak
|
||||
|
||||
Using on pages
|
||||
==============
|
||||
|
||||
.. code-block:: bash
|
||||
:include: ./code/front-matter-on-pages.txt
|
||||
:hl_lines: 3
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
PageBreak
|
||||
|
||||
Using on pages
|
||||
==============
|
||||
|
||||
.. code-block:: bash
|
||||
:include: ./code/front-matter-on-pages.txt
|
||||
:hl_lines: 4,5,6
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
PageBreak
|
||||
|
||||
Using on pages
|
||||
==============
|
||||
|
||||
.. code-block:: bash
|
||||
:include: ./code/front-matter-on-pages.txt
|
||||
:hl_lines: 9,12
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
PageBreak
|
||||
|
||||
Using on pages
|
||||
==============
|
||||
|
||||
.. code-block:: bash
|
||||
:include: ./code/front-matter-on-pages.txt
|
||||
:hl_lines: 10
|
||||
|
||||
Using on pages
|
||||
==============
|
||||
|
||||
.. code-block:: bash
|
||||
:include: ./code/front-matter-on-pages.txt
|
||||
:hl_lines: 11
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
TextAnnotation "`page.` instead of `site.`."
|
||||
|
||||
Layouts
|
||||
=======
|
||||
|
||||
.. code-block:: twig
|
||||
:include: ./code/layout-base.txt
|
||||
|
||||
Layouts
|
||||
=======
|
||||
|
||||
.. code-block:: twig
|
||||
:include: ./code/layout-base.txt
|
||||
:hl_lines: 4,6
|
||||
|
||||
Layouts
|
||||
=======
|
||||
|
||||
.. code-block:: twig
|
||||
:include: ./code/layout-base.txt
|
||||
:hl_lines: 9
|
||||
|
||||
Layouts
|
||||
=======
|
||||
|
||||
.. code-block:: twig
|
||||
:include: ./code/layout-page.txt
|
||||
|
||||
Layouts
|
||||
=======
|
||||
|
||||
.. code-block:: twig
|
||||
:include: ./code/layout-page.txt
|
||||
:hl_lines: 3
|
||||
|
||||
Layouts
|
||||
=======
|
||||
|
||||
.. code-block:: twig
|
||||
:include: ./code/layout-page.txt
|
||||
:hl_lines: 5,7
|
||||
|
||||
Layouts
|
||||
=======
|
||||
|
||||
.. code-block:: twig
|
||||
:include: ./code/layout-page.txt
|
||||
:hl_lines: 6
|
||||
|
||||
Includes
|
||||
========
|
||||
|
||||
.. code-block:: twig
|
||||
|
||||
{% include 'about-author' with {
|
||||
avatar: site.avatar,
|
||||
work: site.work,
|
||||
} only %}
|
||||
|
||||
{% for link in links %}
|
||||
{% include 'menu-link' with { link } only %}
|
||||
{% endfor %}
|
||||
|
||||
Content types
|
||||
=============
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
# app/config/sculpin_kernel.yml
|
||||
|
||||
sculpin_content_types:
|
||||
daily_emails:
|
||||
permalink: daily/:slug_title/
|
||||
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
TextAnnotation "A way to segregate content into different types - e.g. pages, talks, daily emails. Something that was familiar from working with Drupal."
|
||||
|
||||
Accessing custom content types
|
||||
==============================
|
||||
|
||||
.. code-block:: yaml
|
||||
:include: ./code/content-types.txt
|
||||
|
||||
Accessing custom content types
|
||||
==============================
|
||||
|
||||
.. code-block:: yaml
|
||||
:include: ./code/content-types.txt
|
||||
:hl_lines: 4,5
|
||||
|
||||
Accessing custom content types
|
||||
==============================
|
||||
|
||||
.. code-block:: yaml
|
||||
:include: ./code/content-types.txt
|
||||
:hl_lines: 8,9,10
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
PageBreak titlePage
|
||||
|
||||
.. class:: centredtitle
|
||||
|
||||
Making things more dynamic
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
PageBreak standardPage
|
||||
|
||||
.. code-block:: twig
|
||||
:include: ./code/twig-1.txt
|
||||
:hl_lines: 1
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
TextAnnotation "'today' as a string."
|
||||
PageBreak
|
||||
|
||||
.. code-block:: twig
|
||||
:include: ./code/twig-1.txt
|
||||
:hl_lines: 3
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
TextAnnotation "Current date as a string."
|
||||
PageBreak
|
||||
|
||||
.. code-block:: twig
|
||||
:include: ./code/twig-1.txt
|
||||
:hl_lines: 5
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
TextAnnotation "Current year."
|
||||
PageBreak
|
||||
|
||||
.. code-block:: twig
|
||||
:include: ./code/twig-1.txt
|
||||
:hl_lines: 7
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
PageBreak
|
||||
|
||||
.. code-block:: twig
|
||||
|
||||
---
|
||||
title: Daily Email Archive
|
||||
use: [daily_emails]
|
||||
---
|
||||
|
||||
This is an archive of the {{ data.daily_emails|length }}
|
||||
email messages I have sent to my daily email list
|
||||
since the 12th of August, 2022.
|
||||
|
||||
|
|
||||
|
|
||||
|
||||
This is an archive of the 775 email messages I have sent to my daily email list since the 12th of August, 2022.
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
TextAnnotation "Get the emails via their content type and use the `length` filter to get the number of emails."
|
||||
PageBreak
|
||||
|
||||
.. code-block:: php
|
||||
:include: ./code/twig-2.txt
|
||||
:end-before: // end yaml
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
PageBreak
|
||||
|
||||
.. code-block:: twig
|
||||
:include: ./code/twig-2.txt
|
||||
:start-after: // start twig
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
PageBreak
|
||||
|
||||
.. code-block:: twig
|
||||
:include: ./code/twig-2.txt
|
||||
:start-after: // start twig
|
||||
:hl_lines: 1
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
PageBreak
|
||||
|
||||
.. code-block:: javascript
|
||||
:include: ./code/twig-2.txt
|
||||
:hl_lines: 3,7
|
||||
:start-after: // start twig
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
TextAnnotation "Get each talk from the talk content type."
|
||||
PageBreak
|
||||
|
||||
.. code-block:: twig
|
||||
:include: ./code/twig-2.txt
|
||||
:start-after: // start twig
|
||||
:hl_lines: 4,6
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
PageBreak
|
||||
|
||||
.. code-block:: twig
|
||||
:include: ./code/twig-2.txt
|
||||
:start-after: // start twig
|
||||
:hl_lines: 5
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
PageBreak
|
||||
|
||||
.. code-block:: twig
|
||||
:include: ./code/twig-2.txt
|
||||
:start-after: // start twig
|
||||
:hl_lines: 9
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
PageBreak
|
||||
|
||||
.. code-block:: javascript
|
||||
:include: ./code/twig-3.txt
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
PageBreak
|
||||
|
||||
.. code-block:: javascript
|
||||
:include: ./code/twig-3.txt
|
||||
:hl_lines: 1,3,15
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
PageBreak
|
||||
|
||||
.. code-block:: javascript
|
||||
:include: ./code/twig-3.txt
|
||||
:hl_lines: 5
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
PageBreak
|
||||
|
||||
.. code-block:: javascript
|
||||
:include: ./code/twig-3.txt
|
||||
:hl_lines: 9,11
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
PageBreak
|
||||
|
||||
.. code-block:: javascript
|
||||
:include: ./code/twig-3.txt
|
||||
:hl_lines: 10
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
PageBreak titlePage
|
||||
|
||||
.. class:: centredtitle
|
||||
|
||||
Demo
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
PageBreak standardPage
|
||||
|
||||
Extending Sculpin
|
||||
=================
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
# app/config/sculpin_kernel.yml
|
||||
|
||||
...
|
||||
|
||||
services:
|
||||
App\TwigExtension\TalkExtension:
|
||||
tags:
|
||||
- { name: twig.extension }
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
PageBreak imagePage
|
||||
|
||||
.. image:: images/packagist.png
|
||||
:width: 22cm
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
PageBreak standardPage
|
||||
|
||||
|
||||
.. code-block:: php
|
||||
:startinline: true
|
||||
|
||||
// app/SculpinKernel.php
|
||||
|
||||
use Opdavies\Sculpin\Bundle\TwigMarkdownBundle\SculpinTwigMarkdownBundle;
|
||||
use Sculpin\Bundle\SculpinBundle\HttpKernel\AbstractKernel;
|
||||
|
||||
final class SculpinKernel extends AbstractKernel
|
||||
{
|
||||
protected function getAdditionalSculpinBundles(): array
|
||||
{
|
||||
return [
|
||||
SculpinTwigMarkdownBundle::class,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Thanks!
|
||||
=======
|
||||
|
||||
References:
|
||||
|
||||
|
|
||||
|
||||
* https://sculpin.io
|
||||
* https://github.com/sculpin/sculpin
|
||||
* https://code.oliverdavies.uk/opdavies/sculpin-demo
|
||||
* https://code.oliverdavies.uk/opdavies/oliverdavies.uk
|
||||
|
||||
|
|
||||
|
||||
Me:
|
||||
|
||||
* https://www.oliverdavies.uk
|
||||
* ``@opdavies@mastodon.social``
|
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 69 KiB |
Before Width: | Height: | Size: 383 KiB |
Before Width: | Height: | Size: 118 KiB |
Before Width: | Height: | Size: 2 MiB |
Before Width: | Height: | Size: 4.6 MiB |
Before Width: | Height: | Size: 169 KiB |
Before Width: | Height: | Size: 248 KiB |
Before Width: | Height: | Size: 383 KiB |
Before Width: | Height: | Size: 266 KiB |
Before Width: | Height: | Size: 216 KiB |
Before Width: | Height: | Size: 102 KiB |
Before Width: | Height: | Size: 1.9 MiB |
|
@ -1,212 +0,0 @@
|
|||
.. footer::
|
||||
|
||||
@opdavies
|
||||
|
||||
Communities and Contribution
|
||||
############################
|
||||
|
||||
|
|
||||
|
||||
.. class:: titleslideinfo
|
||||
|
||||
Oliver Davies (@opdavies)
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
PageBreak standardPage
|
||||
|
||||
About Me
|
||||
========
|
||||
|
||||
* Self-taught software developer (started in 2007).
|
||||
* Full Stack Software Consultant.
|
||||
* Web Development Manager at Transport for Wales.
|
||||
* PHP and Drupal specialist.
|
||||
* Open-source software maintainer and contributor.
|
||||
* Meetup and conference organiser.
|
||||
* School of Code mentor (BC14 and BC15).
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
TextAnnotation "I'm a self-saught Software Developer. I started learning in 2007 and went full-time in 2010."
|
||||
TextAnnotation "Started at Transport for Wales as Lead Software Developer and I'm currently the Web Development Manager."
|
||||
TextAnnotation "T-shaped Developer."
|
||||
TextAnnotation "Used to organise Drupal and PHP meetups, DrupalCamp Bristol and I've been on the speaker selection committee for DrupalCon."
|
||||
|
||||
How I Started
|
||||
=============
|
||||
|
||||
* Built a website for a Tae Kwon-Do school (HTML and CSS) in 2007.
|
||||
* Learning from online resources like blogs, forums, YouTube, Lynda.com and Total Training.
|
||||
* Learned more as the project developed, including PHP.
|
||||
* Introduced to Drupal in an answer to a forum post.
|
||||
* Started some freelance work and went full-time in 2010.
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
TextAnnotation "This became my playground project."
|
||||
TextAnnotation "Started with HTML and CSS to build the first version and learned more as I needed to, e.g. adding a dynamic news section, instead of trying to learn everything upfront."
|
||||
TextAnnotation ""
|
||||
TextAnnotation "Getting time in the saddle and gaining experience."
|
||||
|
||||
PageBreak imagePage
|
||||
|
||||
.. image:: images/forum-post.png
|
||||
:width: 20cm
|
||||
|
||||
.. image:: images/timmillwood-ono.png
|
||||
:width: 22cm
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
TextAnnotation "A few years later, I took an opportunity to maintain a popular Drupal module."
|
||||
|
||||
.. image:: images/override-node-options-usage.png
|
||||
:width: 26cm
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
TextAnnotation "Used on just over 9,000 websites in April 2012."
|
||||
TextAnnotation "Currently used on 36,000 active Drupal websites."
|
||||
|
||||
My first talk
|
||||
=============
|
||||
|
||||
.. image:: images/unified-diff.png
|
||||
:width: 22cm
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
TextAnnotation "September 2012."
|
||||
TextAnnotation "I've since given 92 talks at meetups and conferences, including this one."
|
||||
|
||||
PageBreak
|
||||
|
||||
Writing for Linux Journal
|
||||
=========================
|
||||
|
||||
.. image:: images/linux-journal2.png
|
||||
:height: 12cm
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
TextAnnotation "September 2012 as well?"
|
||||
TextAnnotation "Writing an article for Linux Journal as part of their special Drupal edition."
|
||||
|
||||
Attending DrupalCon
|
||||
===================
|
||||
|
||||
.. image:: images/drupalcon-prague.jpeg
|
||||
:width: 18cm
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
TextAnnotation "DrupalCon Prague 2013."
|
||||
TextAnnotation "1,800 attendees. ~2,000 for Europe and ~3,000 for U.S."
|
||||
TextAnnotation "Spoken at DrupalCon in 2019 and 2020."
|
||||
TextAnnotation "Worked for the Drupal Association as a Developer on Drupal.org."
|
||||
|
||||
Mentoring at DrupalCon
|
||||
======================
|
||||
|
||||
.. image:: images/drupalcon-barcelona.jpeg
|
||||
:width: 18cm
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
TextAnnotation "Mentoring new contributors at contribution days at DrupalCons."
|
||||
TextAnnotation ""
|
||||
TextAnnotation "I was interested in contributing but was asked to join as a mentor."
|
||||
TextAnnotation "3-6 people per table, working on their first contributions to Drupal core."
|
||||
|
||||
Mentoring at DrupalCon
|
||||
======================
|
||||
|
||||
.. image:: images/drupalcon-los-angeles.jpeg
|
||||
:width: 22cm
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
TextAnnotation "Prague, Amsterdam, Los Angeles, Barcelona, Vienna, Amsterdam."
|
||||
|
||||
PageBreak imagePage
|
||||
|
||||
.. image:: images/gabor.png
|
||||
:width: 24cm
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
PageBreak standardPage
|
||||
|
||||
Contributing to Drupal core
|
||||
===========================
|
||||
|
||||
.. image:: images/drupal-core1.png
|
||||
:width: 22cm
|
||||
|
||||
.. image:: images/drupal-core2.png
|
||||
:width: 22cm
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
TextAnnotation "Later, I got my own commits to Drupal core."
|
||||
TextAnnotation "First was a documentation fix, the second was adding a new function."
|
||||
|
||||
Communities
|
||||
===========
|
||||
|
||||
* Drupal and PHP
|
||||
* JavaScript
|
||||
* Linux and DevOps
|
||||
* Tailwind CSS
|
||||
* Neovim
|
||||
* Accessibility and security
|
||||
* School of Code (students and mentors)
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
TextAnnotation "I found out about School of Code at a meetup!"
|
||||
TextAnnotation "Communities exist online and offline with mailing lists, forums, Slack and Discord groups, in-person and remote meetups and conferences."
|
||||
TextAnnotation "Communities and sub-communities e.g. PHP/Drupal, Linux/Nix."
|
||||
TextAnnotation "Mini-communities such as rst2pdf."
|
||||
|
||||
Why?
|
||||
====
|
||||
|
||||
* Paying it forward.
|
||||
* Giving something back.
|
||||
* Helping me and others learn.
|
||||
* Developing a personal brand.
|
||||
* Building and growing a network.
|
||||
* Improving opportunities.
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
TextAnnotation "If I make money with free software, I can at least contribute back."
|
||||
TextAnnotation "Helping others helps me, and helping others to learn helps me learn."
|
||||
TextAnnotation "Developing 'soft/interpersonal skills'."
|
||||
TextAnnotation "Better career and work opportunities."
|
||||
|
||||
Summary
|
||||
=======
|
||||
|
||||
* Software is not just about code.
|
||||
* Communities are great for getting experience, learning and networking.
|
||||
* Open-source, public speaking, blogging, mentoring look good on a CV.
|
||||
|
||||
Thanks!
|
||||
=======
|
||||
|
||||
References:
|
||||
|
||||
* https://www.oliverdavies.uk/talks
|
||||
* https://www.drupal.org
|
||||
* https://meetup.com
|
||||
* https://www.phpconference.co.uk
|
||||
|
||||
|
|
||||
|
||||
Me:
|
||||
|
||||
* https://www.oliverdavies.uk
|
||||
* @opdavies
|
|
@ -1,23 +0,0 @@
|
|||
# Blue Conf 2019
|
||||
|
||||
The code for my Blue Conf 2019 talk - [Decoupling Drupal with Vue.js](https://www.oliverdavies.uk/talks/decoupling-drupal-vuejs).
|
||||
|
||||
## Installation
|
||||
|
||||
1. Clone the repository
|
||||
|
||||
```
|
||||
git clone https://github.com/opdavies/blue-conf-2019
|
||||
cd blue-conf-2019
|
||||
```
|
||||
|
||||
1. Follow the instructions for [setting up the Drupal back-end][drupal].
|
||||
|
||||
1. Follow the instructions for [setting up the Vue.js front-end][vuejs].
|
||||
|
||||
## Author
|
||||
|
||||
[Oliver Davies](https://www.oliverdavies.uk)
|
||||
|
||||
[drupal]: /docs/setting-up-drupal.md
|
||||
[vuejs]: /docs/setting-up-vue-js.md
|
|
@ -1,22 +0,0 @@
|
|||
# Setting up the Back-End Drupal Application
|
||||
|
||||
The Drupal back-end for my Blue Conf 2019 talk - [Decoupling Drupal with Vue.js](https://www.oliverdavies.uk/talks/decoupling-drupal-vuejs). This was used alongside the Vue.js front-end application for viewing and submitting fictional talk proposals that were stored in Drupal.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
* [Docksal](https://docksal.io)
|
||||
* [VirtualBox](https://www.virtualbox.org/wiki/Downloads) (can be changed to use Docker natively)
|
||||
|
||||
## Setup instructions
|
||||
|
||||
1. Run `fin init` to initialise the project, including installing all of the Composer dependencies, installing Drupal and importing the original configuration and creating some test content.
|
||||
|
||||
```bash
|
||||
cd drupal
|
||||
|
||||
fin init
|
||||
```
|
||||
|
||||
1. Visit `http://blueconf.docksal` to view the Drupal website, or run `fin drush status` to ensure that everything is running.
|
||||
|
||||
1. Run `fin drush uli` to generate a one-time login link in order to access the site.
|
|
@ -1,28 +0,0 @@
|
|||
# Setting up the Front-End Vue.js Application
|
||||
|
||||
The Vue.js front-end for my Blue Conf 2019 talk - [Decoupling Drupal with Vue.js](https://www.oliverdavies.uk/talks/decoupling-drupal-vuejs). It is a [Vue CLI](https://cli.vuejs.org) application, and uses [Tailwind CSS](https://tailwindcss.com) for styling.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
* [npm](https://docs.npmjs.com/cli/npm)
|
||||
* [yarn](https://yarnpkg.com) (optional)
|
||||
|
||||
## Setup instructions
|
||||
|
||||
1. Install the npm dependencies using either `npm` or `yarn`.
|
||||
|
||||
```bash
|
||||
cd vuejs
|
||||
|
||||
# Using npm
|
||||
npm install
|
||||
|
||||
# Using yarn
|
||||
yarn
|
||||
```
|
||||
|
||||
1. Change the URL to the Drupal back-end if needed in `.env`.
|
||||
|
||||
1. Use `yarn serve` to start a local web server.
|
||||
|
||||
1. Visit the URL (usually `http://localhost:8080`) to view the front-end application.
|
|
@ -1 +0,0 @@
|
|||
/docksal-local.*
|
|
@ -1,37 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
#: exec_target = cli
|
||||
|
||||
## Creates a phpunit.xml file and runs PHPUnit tests in Drupal 8
|
||||
##
|
||||
## Usage: fin phpunit <args>
|
||||
##
|
||||
## This first ensures that a `core/phpunit.xml` file exists, either by copying a
|
||||
## stub from `.docksal/drupal/core/phpunit.xml` if that exists, or copying and
|
||||
## renaming `core/phpunit.xml.dist`.
|
||||
##
|
||||
## If `core/phpunit.xml` exists, the phpunit command with then be run, appending
|
||||
## any optional arguments such as the directory path (run `fin phpunit -h`) to
|
||||
## see a full list of options.
|
||||
|
||||
DOCROOT_PATH="${PROJECT_ROOT}/${DOCROOT}"
|
||||
DRUPAL_CORE_PATH="${DOCROOT_PATH}/core"
|
||||
|
||||
run_tests() {
|
||||
${PROJECT_ROOT}/vendor/bin/phpunit -c ${DRUPAL_CORE_PATH} "$@"
|
||||
}
|
||||
|
||||
if [ ! -e ${DRUPAL_CORE_PATH}/phpunit.xml ]; then
|
||||
if [ -e "${PROJECT_ROOT}/.docksal/drupal/core/phpunit.xml" ]; then
|
||||
echo "Copying ${PROJECT_ROOT}/.docksal/drupal/core/phpunit.xml to ${DRUPAL_CORE_PATH}/phpunit.xml"
|
||||
cp "${PROJECT_ROOT}/.docksal/drupal/core/phpunit.xml" ${DRUPAL_CORE_PATH}/phpunit.xml
|
||||
run_tests "$@"
|
||||
else
|
||||
echo "Copying phpunit.xml.dist to phpunit.xml."
|
||||
echo "Please edit it's values as needed and re-run 'fin phpunit'."
|
||||
cp ${DRUPAL_CORE_PATH}/phpunit.xml.dist ${DRUPAL_CORE_PATH}/phpunit.xml
|
||||
exit 1;
|
||||
fi
|
||||
else
|
||||
run_tests "$@"
|
||||
fi
|
|
@ -1,67 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
## Opens SequelPro
|
||||
##
|
||||
## Usage: fin sequelpro
|
||||
|
||||
# Abort if anything fails
|
||||
set -e
|
||||
|
||||
container_port=$(docker ps --all --filter 'label=com.docker.compose.service=db' --filter "label=com.docker.compose.project=${COMPOSE_PROJECT_NAME}" --format '{{.Ports}}' | sed 's/.*0.0.0.0://g'|sed 's/->.*//g')
|
||||
HOST=${VIRTUAL_HOST}
|
||||
DB=${MYSQL_DATABASE:-default}
|
||||
USER=${MYSQL_USER:-user}
|
||||
PASS=${MYSQL_PASSWORD:-user}
|
||||
NAME=${COMPOSE_PROJECT_NAME}
|
||||
|
||||
PORT=${PORT:-$container_port}
|
||||
|
||||
FILENAME=/tmp/docksal-sequelpro-${RANDOM}.spf
|
||||
cat <<EOT >> $FILENAME
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>ContentFilters</key>
|
||||
<dict/>
|
||||
<key>auto_connect</key>
|
||||
<true/>
|
||||
<key>data</key>
|
||||
<dict>
|
||||
<key>connection</key>
|
||||
<dict>
|
||||
<key>database</key>
|
||||
<string>${DB}</string>
|
||||
<key>host</key>
|
||||
<string>${HOST}</string>
|
||||
<key>name</key>
|
||||
<string>${NAME}</string>
|
||||
<key>user</key>
|
||||
<string>${USER}</string>
|
||||
<key>password</key>
|
||||
<string>${PASS}</string>
|
||||
<key>port</key>
|
||||
<integer>${PORT}</integer>
|
||||
<key>rdbms_type</key>
|
||||
<string>mysql</string>
|
||||
</dict>
|
||||
<key>session</key>
|
||||
<dict/>
|
||||
</dict>
|
||||
<key>encrypted</key>
|
||||
<false/>
|
||||
<key>format</key>
|
||||
<string>connection</string>
|
||||
<key>queryFavorites</key>
|
||||
<array/>
|
||||
<key>queryHistory</key>
|
||||
<array/>
|
||||
<key>rdbms_type</key>
|
||||
<string>mysql</string>
|
||||
<key>version</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
</plist>
|
||||
EOT
|
||||
|
||||
open $FILENAME
|
|
@ -1,49 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
die ()
|
||||
{
|
||||
echo "$1"
|
||||
exit 1
|
||||
}
|
||||
|
||||
## Generate one time user login link. Add -s to use https in url.
|
||||
## Usage fin uli @drushalias -s
|
||||
## The drush alias and -s flags are optional.
|
||||
|
||||
cd "$PROJECT_ROOT/$DOCROOT" || die "Could not change dir to $PROJECT_ROOT/$DOCROOT"
|
||||
|
||||
https=0 # Default to not use https
|
||||
|
||||
# Check the first two options / arguments given on the the command line for
|
||||
# what looks like a Drush site alias or the -s option to use https in the url.
|
||||
count=2
|
||||
while [ $count -ne 0 ]; do
|
||||
if [[ $1 == @* ]]; then
|
||||
drushalias=$1
|
||||
shift 1
|
||||
elif [[ $1 == "-s" ]]; then
|
||||
https=1
|
||||
shift 1
|
||||
fi
|
||||
count=$[$count-1]
|
||||
done
|
||||
|
||||
if [ $https -eq 0 ]; then
|
||||
uli=$(fin drush $drushalias uli "$@" 2>&1 | sed "s/default/$VIRTUAL_HOST/")
|
||||
elif [ $https -eq 1 ]; then
|
||||
uli=$(fin drush $drushalias uli "$@" 2>&1 | sed "s/default/$VIRTUAL_HOST/" | sed "s/http\:/https:/")
|
||||
else
|
||||
exit 2
|
||||
fi
|
||||
echo "$uli"
|
||||
[[ "$uli" == *"Error"* ]] && exit 1
|
||||
|
||||
# Mac OSX copy uli to clipboard with pbcopy
|
||||
( which pbcopy >/dev/null 2>&1 ) &&
|
||||
echo "$uli" | pbcopy &&
|
||||
echo "[+] Copied to clipboard"
|
||||
|
||||
# Linux copy uli to both the selection buffer and clipboard with xclip.
|
||||
( which xclip >/dev/null 2>&1 ) &&
|
||||
echo "$uli" | xclip -i -sel c -f |xclip -i -sel p &&
|
||||
echo "[+] Copied to clipboard and selection buffer"
|
|
@ -1,37 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
## Initialize stack and site (full reset)
|
||||
##
|
||||
## Usage: fin init
|
||||
|
||||
# Abort if anything fails
|
||||
set -e
|
||||
|
||||
#-------------------------- Helper functions --------------------------------
|
||||
|
||||
# Console colors
|
||||
red='\033[0;31m'
|
||||
green='\033[0;32m'
|
||||
green_bg='\033[1;97;42m'
|
||||
yellow='\033[1;33m'
|
||||
NC='\033[0m'
|
||||
|
||||
echo-red () { echo -e "${red}$1${NC}"; }
|
||||
echo-green () { echo -e "${green}$1${NC}"; }
|
||||
echo-green-bg () { echo -e "${green_bg}$1${NC}"; }
|
||||
echo-yellow () { echo -e "${yellow}$1${NC}"; }
|
||||
|
||||
#-------------------------- Execution --------------------------------
|
||||
|
||||
# Stack initialization
|
||||
echo -e "${green_bg} Step 1 ${NC}${green} Initializing stack...${NC}"
|
||||
fin project reset -f
|
||||
|
||||
# Site initialization
|
||||
echo -e "${green_bg} Step 2 ${NC}${green} Initializing site...${NC}"
|
||||
# This runs inside cli using http://docs.docksal.io/en/v1.4.0/fin/custom-commands/#executing-commands-inside-cli
|
||||
fin init-site
|
||||
|
||||
echo -e "${green_bg} DONE! ${NC}${green} Completed all initialization steps.${NC}"
|
||||
|
||||
#-------------------------- END: Execution --------------------------------
|
|
@ -1,85 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
#: exec_target = cli
|
||||
|
||||
## Initialize/reinstall site
|
||||
##
|
||||
## Usage: fin init-site
|
||||
|
||||
# Abort if anything fails
|
||||
set -e
|
||||
|
||||
#-------------------------- Helper functions --------------------------------
|
||||
|
||||
copy_settings_file() {
|
||||
local source="$1"
|
||||
local dest="$2"
|
||||
|
||||
echo "Copying ${dest}..."
|
||||
cp $source $dest
|
||||
}
|
||||
|
||||
composer_install() {
|
||||
echo "Installing Composer dependencies..."
|
||||
composer install
|
||||
}
|
||||
|
||||
#-------------------------- END: Helper functions --------------------------------
|
||||
|
||||
#-------------------------- END: Functions --------------------------------
|
||||
|
||||
init_settings() {
|
||||
copy_settings_file ../files/settings.php ../../web/sites/default
|
||||
}
|
||||
|
||||
site_install() {
|
||||
composer_install
|
||||
|
||||
echo "Installing Drupal..."
|
||||
drush site:install -y
|
||||
}
|
||||
|
||||
import_config() {
|
||||
drush config:set -y system.site uuid de7ba5dc-5795-4cb5-9d38-1edcc27be491
|
||||
|
||||
drush config:delete -y shortcut.set.default uuid
|
||||
|
||||
echo "Importing configuration..."
|
||||
drush config:import -y --source=../config/sync
|
||||
}
|
||||
|
||||
import_content() {
|
||||
echo "Importing speakers from CSV..."
|
||||
drush php:eval '\Drupal::service("Drupal\dtc_import\Service\Importer\CsvSpeakerImporter")->import()'
|
||||
|
||||
echo "Importing sessions from CSV..."
|
||||
drush php:eval '\Drupal::service("Drupal\dtc_import\Service\Importer\CsvSessionImporter")->import()'
|
||||
}
|
||||
|
||||
setup_users() {
|
||||
echo "Creating the API user..."
|
||||
drush user:create api --password=api
|
||||
drush user:role:add api_user api
|
||||
|
||||
echo "Resetting uuid for the admin user..."
|
||||
drush sql:query "UPDATE users SET uuid = '11dad4c2-baa8-4fb2-97c6-12e1ce925806' WHERE uid = 1"
|
||||
|
||||
echo "Resetting uuid for the API user..."
|
||||
drush sql:query "UPDATE users SET uuid = '63936126-87cd-4166-9cb4-63b61a210632' WHERE uid = 7"
|
||||
|
||||
echo "Rebuilding cache..."
|
||||
drush cache:rebuild
|
||||
}
|
||||
|
||||
#-------------------------- END: Functions --------------------------------
|
||||
|
||||
#-------------------------- Execution --------------------------------
|
||||
|
||||
site_install
|
||||
import_config
|
||||
import_content
|
||||
setup_users
|
||||
|
||||
echo -e "Open ${yellow}http://${VIRTUAL_HOST}${NC} in your browser to verify the setup."
|
||||
|
||||
#-------------------------- END: Execution --------------------------------
|
|
@ -1,6 +0,0 @@
|
|||
COMPOSE_PROJECT_NAME="blueconf"
|
||||
DOCKSAL_STACK=default
|
||||
DOCROOT="web"
|
||||
MYSQL_DATABASE=default
|
||||
MYSQL_PASSWORD=user
|
||||
MYSQL_USER=user
|
|
@ -1,8 +0,0 @@
|
|||
version: "2.1"
|
||||
services:
|
||||
cli:
|
||||
environment:
|
||||
- MYSQL_DATABASE
|
||||
- MYSQL_PASSWORD
|
||||
- MYSQL_USER
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
# Drupal editor configuration normalization
|
||||
# @see http://editorconfig.org/
|
||||
|
||||
# This is the top-most .editorconfig file; do not search in parent directories.
|
||||
root = true
|
||||
|
||||
# All files.
|
||||
[*]
|
||||
end_of_line = LF
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[composer.{json,lock}]
|
||||
indent_size = 4
|
|
@ -1,27 +0,0 @@
|
|||
#
|
||||
# Copy and rename this file to .env at root of this project.
|
||||
#
|
||||
|
||||
# A common use case is to supply database creds via the environment. Edit settings.php
|
||||
# like so:
|
||||
#
|
||||
# $databases['default']['default'] = [
|
||||
# 'database' => getenv('MYSQL_DATABASE'),
|
||||
# 'driver' => 'mysql',
|
||||
# 'host' => getenv('MYSQL_HOSTNAME'),
|
||||
# 'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql',
|
||||
# 'password' => getenv('MYSQL_PASSWORD'),
|
||||
# 'port' => getenv('MYSQL_PORT'),
|
||||
# 'prefix' => '',
|
||||
# 'username' => getenv('MYSQL_USER'),
|
||||
# ];
|
||||
#
|
||||
# Uncomment and populate as needed.
|
||||
# MYSQL_DATABASE=
|
||||
# MYSQL_HOSTNAME=
|
||||
# MYSQL_PASSWORD=
|
||||
# MYSQL_PORT=
|
||||
# MYSQL_USER=
|
||||
|
||||
# Another common use case is to set Drush's --uri via environment.
|
||||
# DRUSH_OPTIONS_URI=http://example.com
|
|
@ -1,61 +0,0 @@
|
|||
# Drupal git normalization
|
||||
# @see https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
|
||||
# @see https://www.drupal.org/node/1542048
|
||||
|
||||
# Normally these settings would be done with macro attributes for improved
|
||||
# readability and easier maintenance. However macros can only be defined at the
|
||||
# repository root directory. Drupal avoids making any assumptions about where it
|
||||
# is installed.
|
||||
|
||||
# Define text file attributes.
|
||||
# - Treat them as text.
|
||||
# - Ensure no CRLF line-endings, neither on checkout nor on checkin.
|
||||
# - Detect whitespace errors.
|
||||
# - Exposed by default in `git diff --color` on the CLI.
|
||||
# - Validate with `git diff --check`.
|
||||
# - Deny applying with `git apply --whitespace=error-all`.
|
||||
# - Fix automatically with `git apply --whitespace=fix`.
|
||||
|
||||
*.config text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
|
||||
*.css text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
|
||||
*.dist text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
|
||||
*.engine text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
|
||||
*.html text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=html
|
||||
*.inc text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
|
||||
*.install text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
|
||||
*.js text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
|
||||
*.json text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
|
||||
*.lock text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
|
||||
*.map text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
|
||||
*.md text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
|
||||
*.module text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
|
||||
*.php text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
|
||||
*.po text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
|
||||
*.profile text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
|
||||
*.script text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
|
||||
*.sh text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
|
||||
*.sql text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
|
||||
*.svg text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
|
||||
*.theme text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
|
||||
*.twig text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
|
||||
*.txt text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
|
||||
*.xml text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
|
||||
*.yml text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
|
||||
|
||||
# Define binary file attributes.
|
||||
# - Do not treat them as text.
|
||||
# - Include binary diff in patches instead of "binary files differ."
|
||||
*.eot -text diff
|
||||
*.exe -text diff
|
||||
*.gif -text diff
|
||||
*.gz -text diff
|
||||
*.ico -text diff
|
||||
*.jpeg -text diff
|
||||
*.jpg -text diff
|
||||
*.otf -text diff
|
||||
*.phar -text diff
|
||||
*.png -text diff
|
||||
*.svgz -text diff
|
||||
*.ttf -text diff
|
||||
*.woff -text diff
|
||||
*.woff2 -text diff
|
|
@ -1,42 +0,0 @@
|
|||
# Ignore directories generated by Composer
|
||||
/drush/contrib/
|
||||
/vendor/
|
||||
/web/core/
|
||||
/web/modules/contrib/
|
||||
/web/themes/contrib/
|
||||
/web/profiles/contrib/
|
||||
/web/libraries/
|
||||
|
||||
# Ignore sensitive information
|
||||
/web/sites/*/settings.php
|
||||
/web/sites/*/settings.local.php
|
||||
|
||||
# Ignore Drupal's file directory
|
||||
/web/sites/*/files/
|
||||
|
||||
# Ignore SimpleTest multi-site environment.
|
||||
/web/sites/simpletest
|
||||
|
||||
# Ignore files generated by PhpStorm
|
||||
/.idea/
|
||||
|
||||
# Ignore .env files as they are personal
|
||||
/.env
|
||||
|
||||
# Ignore Drupal Scaffold files
|
||||
/web/.csslintrc
|
||||
/web/.editorconfig
|
||||
/web/.eslintignore
|
||||
/web/.eslintrc.json
|
||||
/web/.gitattributes
|
||||
/web/.ht.router.php
|
||||
/web/.htaccess
|
||||
/web/index.php
|
||||
/web/robots.txt
|
||||
/web/sites/default/default.settings.php
|
||||
/web/sites/default/default.services.yml
|
||||
/web/sites/development.services.yml
|
||||
/web/sites/example.settings.local.php
|
||||
/web/sites/example.sites.php
|
||||
/web/update.php
|
||||
/web/web.config
|
|
@ -1,33 +0,0 @@
|
|||
test:
|
||||
image: php:7.2
|
||||
|
||||
cache:
|
||||
paths:
|
||||
- vendor/
|
||||
|
||||
before_script:
|
||||
- apt-get update -yqq
|
||||
- apt-get install git wget unzip zip -yqq
|
||||
|
||||
# Add additonal extensions that are required by Drupal.
|
||||
- apt-get install libpng-dev -y
|
||||
- docker-php-ext-install gd
|
||||
|
||||
# Install Composer.
|
||||
- wget https://composer.github.io/installer.sig -O - -q | tr -d '\n' > installer.sig
|
||||
- php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
|
||||
- php -r "if (hash_file('SHA384', 'composer-setup.php') === file_get_contents('installer.sig')) { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
|
||||
- php composer-setup.php
|
||||
- php -r "unlink('composer-setup.php'); unlink('installer.sig');"
|
||||
- php composer.phar install
|
||||
|
||||
# Start a server for web tests.
|
||||
- php -S localhost:9000 -t web 2>&1 &
|
||||
|
||||
variables:
|
||||
SIMPLETEST_BASE_URL: http://localhost:9000
|
||||
SIMPLETEST_DB: 'sqlite://localhost:9000//tmp/test.sqlite'
|
||||
|
||||
script:
|
||||
- cd web
|
||||
- ../vendor/bin/phpunit -c core modules/custom
|
|
@ -1,51 +0,0 @@
|
|||
language: php
|
||||
dist: trusty
|
||||
sudo: false
|
||||
|
||||
php:
|
||||
- 5.6
|
||||
- 7.0
|
||||
- 7.1
|
||||
- 7.2
|
||||
|
||||
env:
|
||||
global:
|
||||
- SIMPLETEST_DB=sqlite://tmp/site.sqlite
|
||||
- SIMPLETEST_BASE_URL="http://127.0.0.1:8080"
|
||||
matrix:
|
||||
- RELEASE=stable COMPOSER_CHANNEL=stable
|
||||
- RELEASE=dev COMPOSER_CHANNEL=stable
|
||||
- RELEASE=stable COMPOSER_CHANNEL=snapshot
|
||||
|
||||
matrix:
|
||||
exclude:
|
||||
- php: 5.6
|
||||
env: RELEASE=dev COMPOSER_CHANNEL=stable
|
||||
- php: 5.6
|
||||
env: RELEASE=stable COMPOSER_CHANNEL=snapshot
|
||||
|
||||
before_install:
|
||||
- if [[ $TRAVIS_PHP_VERSION = 5.6 ]]; then export COMPOSER_MEMORY_LIMIT=-1; fi;
|
||||
- echo 'sendmail_path = /bin/true' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
|
||||
- phpenv config-rm xdebug.ini
|
||||
- composer --verbose self-update --$COMPOSER_CHANNEL
|
||||
- composer --version
|
||||
|
||||
install:
|
||||
- composer --verbose validate
|
||||
- composer --verbose install
|
||||
|
||||
script:
|
||||
- if [[ $RELEASE = dev ]]; then composer --verbose remove --no-update drupal/console; fi;
|
||||
- if [[ $RELEASE = dev ]]; then composer --verbose require --no-update drupal/core:8.7.x-dev webflo/drupal-core-require-dev:8.7.x-dev; fi;
|
||||
- if [[ $RELEASE = dev ]]; then composer --verbose update; fi;
|
||||
- cd $TRAVIS_BUILD_DIR/web
|
||||
- ./../vendor/bin/drush site-install --verbose --yes --db-url=sqlite://tmp/site.sqlite
|
||||
- ./../vendor/bin/drush runserver $SIMPLETEST_BASE_URL &
|
||||
- until curl -s $SIMPLETEST_BASE_URL; do true; done > /dev/null
|
||||
# Skip core/tests/Drupal/Tests/ComposerIntegrationTest.php because web/ has no composer.json
|
||||
# Ignore PageCache group temporarily, @see https://www.drupal.org/node/2770673
|
||||
# Ignore Setup group temporarily, @see https://www.drupal.org/node/2962157
|
||||
- ./../vendor/bin/phpunit -c core --testsuite unit --exclude-group Composer,DependencyInjection,PageCache,Setup
|
||||
- ./../vendor/bin/drush
|
||||
- if [[ $RELEASE = stable ]]; then ./../vendor/bin/drupal; fi;
|
|
@ -1,339 +0,0 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
{description}
|
||||
Copyright (C) {year} {fullname}
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
{signature of Ty Coon}, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
|
@ -1,88 +0,0 @@
|
|||
{
|
||||
"name": "opdavies/blue-conf-2019-drupal",
|
||||
"description": "Project template for Drupal 8 projects with composer",
|
||||
"type": "project",
|
||||
"license": "GPL-2.0-or-later",
|
||||
"authors": [
|
||||
{
|
||||
"name": "",
|
||||
"role": ""
|
||||
}
|
||||
],
|
||||
"repositories": [
|
||||
{
|
||||
"type": "composer",
|
||||
"url": "https://packages.drupal.org/8"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=7.1",
|
||||
"composer/installers": "^1.2",
|
||||
"cweagans/composer-patches": "^1.6.5",
|
||||
"drupal-composer/drupal-scaffold": "^2.5",
|
||||
"drupal/admin_toolbar": "^1.26",
|
||||
"drupal/console": "^1.0.2",
|
||||
"drupal/core": "^8.7.0",
|
||||
"drush/drush": "^9.0.0",
|
||||
"josephlavin/tap": "^1.0",
|
||||
"tightenco/collect": "^6.2",
|
||||
"vlucas/phpdotenv": "^2.4",
|
||||
"webflo/drupal-finder": "^1.0.0",
|
||||
"webmozart/path-util": "^2.3",
|
||||
"zaporylie/composer-drupal-optimizations": "^1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"webflo/drupal-core-require-dev": "^8.7.0"
|
||||
},
|
||||
"conflict": {
|
||||
"drupal/drupal": "*"
|
||||
},
|
||||
"minimum-stability": "dev",
|
||||
"prefer-stable": true,
|
||||
"config": {
|
||||
"sort-packages": true
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"scripts/composer/ScriptHandler.php"
|
||||
],
|
||||
"files": ["load.environment.php"]
|
||||
},
|
||||
"scripts": {
|
||||
"drupal-scaffold": "DrupalComposer\\DrupalScaffold\\Plugin::scaffold",
|
||||
"pre-install-cmd": [
|
||||
"DrupalProject\\composer\\ScriptHandler::checkComposerVersion"
|
||||
],
|
||||
"pre-update-cmd": [
|
||||
"DrupalProject\\composer\\ScriptHandler::checkComposerVersion"
|
||||
],
|
||||
"post-install-cmd": [
|
||||
"DrupalProject\\composer\\ScriptHandler::createRequiredFiles",
|
||||
"@drupal-scaffold"
|
||||
],
|
||||
"post-update-cmd": [
|
||||
"DrupalProject\\composer\\ScriptHandler::createRequiredFiles",
|
||||
"@drupal-scaffold"
|
||||
]
|
||||
},
|
||||
"extra": {
|
||||
"composer-exit-on-patch-failure": true,
|
||||
"patchLevel": {
|
||||
"drupal/core": "-p2"
|
||||
},
|
||||
"installer-paths": {
|
||||
"web/core": ["type:drupal-core"],
|
||||
"web/libraries/{$name}": ["type:drupal-library"],
|
||||
"web/modules/contrib/{$name}": ["type:drupal-module"],
|
||||
"web/profiles/contrib/{$name}": ["type:drupal-profile"],
|
||||
"web/themes/contrib/{$name}": ["type:drupal-theme"],
|
||||
"drush/Commands/{$name}": ["type:drupal-drush"]
|
||||
},
|
||||
"drupal-scaffold": {
|
||||
"initial": {
|
||||
".editorconfig": "../.editorconfig",
|
||||
".gitattributes": "../.gitattributes"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
8656
decoupling-drupal-vuejs/demo/blue-conf/drupal/composer.lock
generated
|
@ -1,24 +0,0 @@
|
|||
# Deny all requests from Apache 2.4+.
|
||||
<IfModule mod_authz_core.c>
|
||||
Require all denied
|
||||
</IfModule>
|
||||
|
||||
# Deny all requests from Apache 2.0-2.2.
|
||||
<IfModule !mod_authz_core.c>
|
||||
Deny from all
|
||||
</IfModule>
|
||||
|
||||
# Turn off all options we don't need.
|
||||
Options -Indexes -ExecCGI -Includes -MultiViews
|
||||
|
||||
# Set the catch-all handler to prevent scripts from being executed.
|
||||
SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
|
||||
<Files *>
|
||||
# Override the handler again if we're run later in the evaluation list.
|
||||
SetHandler Drupal_Security_Do_Not_Remove_See_SA_2013_003
|
||||
</Files>
|
||||
|
||||
# If we know how to do it safely, disable the PHP engine entirely.
|
||||
<IfModule mod_php5.c>
|
||||
php_flag engine off
|
||||
</IfModule>
|
|
@ -1 +0,0 @@
|
|||
This directory contains configuration to be imported into your Drupal site. To make this configuration active, visit admin/config/development/configuration/sync. For information about deploying configuration between servers, see https://www.drupal.org/documentation/administer/config
|
|
@ -1,3 +0,0 @@
|
|||
interval: 10800
|
||||
_core:
|
||||
default_config_hash: fUksROt4FfkAU9BV4hV2XvhTBSS2nTNrZS4U7S-tKrs
|
|
@ -1,27 +0,0 @@
|
|||
uuid: 893e2320-dcd8-4cde-97f0-adfe0bb1688f
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- system.menu.account
|
||||
module:
|
||||
- system
|
||||
theme:
|
||||
- bartik
|
||||
_core:
|
||||
default_config_hash: 8a31Ywc1t2zlddGd3bmDrFMefWqgSK2E02ceFdr-bfc
|
||||
id: bartik_account_menu
|
||||
theme: bartik
|
||||
region: secondary_menu
|
||||
weight: 0
|
||||
provider: null
|
||||
plugin: 'system_menu_block:account'
|
||||
settings:
|
||||
id: 'system_menu_block:account'
|
||||
label: 'User account menu'
|
||||
provider: system
|
||||
label_display: '0'
|
||||
level: 1
|
||||
depth: 1
|
||||
expand_all_items: false
|
||||
visibility: { }
|