Merge reading-college/main

This commit is contained in:
Oliver Davies 2025-10-02 08:59:28 +01:00
commit e85167d5eb
15 changed files with 18530 additions and 0 deletions

View file

@ -0,0 +1 @@
use flake .

View file

@ -0,0 +1,20 @@
#!/usr/bin/env bash
tmux new-window -dn scratch
tmux new-window -dn static -c static
tmux send-keys -t static "simple-http-server --index --port 4000" Enter
tmux new-window -dn sculpin_install -c sculpin
tmux send-keys -t sculpin_install "composer install" Enter
tmux new-window -dn sculpin_run -c sculpin
tmux send-keys -t sculpin_run "vendor/bin/sculpin generate --server --port 4001 --watch" Enter
tmux new-window -dn drupal_install -c drupal
tmux send-keys -t drupal_install "composer install" Enter
tmux new-window -dn drupal_run -c drupal
tmux send-keys -t drupal_run "vendor/bin/drush runserver :4002" Enter
nvim .

View file

@ -0,0 +1,88 @@
{
"name": "drupal/cms",
"version": "1.1.0",
"description": "Drupal CMS is a ready-to-use platform built on Drupal core, offering smart defaults to get started quickly and enterprise-grade tools for marketers, designers, and content creators.",
"type": "project",
"license": "GPL-2.0-or-later",
"homepage": "https://www.drupal.org/project/drupal",
"support": {
"docs": "https://drupal.org/docs/user_guide/en/index.html",
"chat": "https://drupal.org/node/314178"
},
"repositories": {
"drupal": {
"type": "composer",
"url": "https://packages.drupal.org/8"
}
},
"require": {
"composer/installers": "^2.3",
"drupal/core-composer-scaffold": "^11.1.4",
"drupal/core-project-message": "^11.1.4",
"drupal/core-recommended": "^11.1.4",
"drupal/drupal_cms_accessibility_tools": "~1.1.0",
"drupal/drupal_cms_ai": "~1.1.0",
"drupal/drupal_cms_analytics": "~1.1.0",
"drupal/drupal_cms_blog": "~1.1.0",
"drupal/drupal_cms_case_study": "~1.1.0",
"drupal/drupal_cms_events": "~1.1.0",
"drupal/drupal_cms_forms": "~1.1.0",
"drupal/drupal_cms_news": "~1.1.0",
"drupal/drupal_cms_page": "~1.1.0",
"drupal/drupal_cms_person": "~1.1.0",
"drupal/drupal_cms_project": "~1.1.0",
"drupal/drupal_cms_seo_tools": "~1.1.0",
"drupal/drupal_cms_starter": "~1.1.0",
"drupal/project_browser": "@beta",
"drupal/recipe_installer_kit": "^1-alpha3@alpha",
"drupal/webform": "@beta",
"drush/drush": "^13"
},
"conflict": {
"drupal/drupal": "*"
},
"minimum-stability": "stable",
"prefer-stable": true,
"config": {
"allow-plugins": {
"composer/installers": true,
"drupal/core-composer-scaffold": true,
"drupal/core-project-message": true,
"php-http/discovery": true
},
"sort-packages": true,
"optimize-autoloader": true
},
"extra": {
"drupal-scaffold": {
"locations": {
"web-root": "web/"
}
},
"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/contrib/{$name}": ["type:drupal-drush"],
"web/modules/custom/{$name}": ["type:drupal-custom-module"],
"web/profiles/custom/{$name}": ["type:drupal-custom-profile"],
"recipes/{$name}": ["type:drupal-recipe"],
"web/themes/custom/{$name}": ["type:drupal-custom-theme"]
},
"drupal-core-project-message": {
"include-keys": ["homepage", "support"],
"post-create-project-cmd-message": [
"<bg=blue;fg=white> </>",
"<bg=blue;fg=white> Congratulations, youve installed Drupal CMS! </>",
"<bg=blue;fg=white> </>",
"",
"<bg=yellow;fg=black>Next steps</>:",
" * Read the user guide: https://www.drupal.org/docs/user_guide/en/index.html",
" * Get support: https://drupal.org/support",
" * Get involved with the Drupal community: https://drupal.org/getting-involved"
]
}
}
}

14786
reading-college/demo/drupal/composer.lock generated Normal file

File diff suppressed because it is too large Load diff

27
reading-college/demo/flake.lock generated Normal file
View file

@ -0,0 +1,27 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1746461020,
"narHash": "sha256-7+pG1I9jvxNlmln4YgnlW4o+w0TZX24k688mibiFDUE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "3730d8a308f94996a9ba7c7138ede69c1b9ac4ae",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

View file

@ -0,0 +1,31 @@
{
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
outputs =
{ nixpkgs, ... }:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in
{
devShells.${system}.default =
let
php = pkgs.php83.buildEnv {
extraConfig = ''
memory_limit = 512M
'';
};
phpPackages = pkgs.php83Packages;
in
pkgs.mkShell {
packages = with pkgs; [
php
phpPackages.composer
simple-http-server
sqlite
];
};
formatter.${system} = pkgs.nixfmt-classic;
};
}

View file

@ -0,0 +1,16 @@
Installation:
composer require sculpin/sculpin
vendor/bin/sculpin generate --server --watch
composer create drupal/cms
vendor/bin/drush site:install --db-url sqlite://localhost/db.sql --account-pass admin
vendor/bin/drush runserver
vendor/bin/drush sql:drop
Usage:
Starts a static web server in `static` on port 4000.
Starts a Sculpin website in `sculpin` on port 4001.
Starts a Drupal website in `drupal` on port 4002.

11
reading-college/demo/reset Executable file
View file

@ -0,0 +1,11 @@
#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
tmux list-windows -F '#{window_name} #{window_active}' \
| awk '$2 == 0 {print $1}' \
| xargs -n1 tmux kill-window -t
./.tmux-sessionizer

View file

@ -0,0 +1,2 @@
output_*
vendor

View file

@ -0,0 +1,3 @@
sculpin_content_types:
posts:
enabled: false

View file

@ -0,0 +1 @@
---

View file

@ -0,0 +1,10 @@
{
"require": {
"sculpin/sculpin": "^3.2"
},
"config": {
"allow-plugins": {
"sculpin/sculpin-theme-composer-plugin": true
}
}
}

3520
reading-college/demo/sculpin/composer.lock generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,4 @@
---
title: Home
---

View file

@ -0,0 +1,10 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
</body>
</html>