Wikipedia is the best thing ever. Anyone in the world can write anything they want about any subject. So you know you are getting the best possible information. — Michael Scott
Welcome to the public home of Druki Website.
Druki — wiki-alike website about Drupal made on Drupal. This repository contains the source code of that website.
It was inspired by many other documentation sites, and their content editing process, but most important inspiration comes from ArchWiki. This project is trying to achieve the same things, but about Drupal and on Drupal, because, why not?
The main content of this website stored on GitHub too in content repository. The current repository is responsible for fetching, processing and rendering this content using Drupal.
Add this line $config['config_split.config_split.dev']['status'] = TRUE;
to settings.php.
This is required for correct configuration split process.
If the content synchronization not working properly, set the path of your local Git binary to settings.php (e.g. $settings['druki_git_binary'] = '/usr/local/bin/git;'
).
Warning! Currently, Drupal core has a bug #3176625. Before it resolved, you must patch core before running installation process, otherwise it will fail during config imports. Nothing can be done from our site. The current versions of codebase include that patch.
- Clone this repository by
git clone https://github.com/Druki-ru/website.git
. - Run
composer install
. - Copy file
/web/sites/default/default.settings.php
, rename it to settings.php and place in the same path. - Add
$settings['config_sync_directory'] = '../config/sync';
to your settings.php. - Run
yarn install && yarn run compile
to build CSS and JavaScript files. - Open your local website address.
- The installation will start automatically and prepare website for you!
- Make a cup of coffee ☕️ and wait until the installation is finished.
- Enjoy your copy.
If you want to modify sites theme or some of the JSs, you must run compilation process to do so.
yarn install
(npm install
) (if not yet done)yarn run compile
(npm run compile
) - to one time build.yarn run watch
(npm run watch
) - to watch for file changes and compile them.
These scripts will:
- Compile PostCSS to CSS files.
- Compile JavaScript files with
.es6.js
ending into.js
files, compress and optimize them.
The dist files are placed at the same folder where is a source. It can be a bit overwhelming in project tree, so it's suggested for JetBrains IDEs users to do:
SHIFT
+SHIFT
- Type
File nesting
, select found element. - In opened window add new rules:
.es6.js
|.js
.pcss
|.css
As a result, it will make your structure clean and usable.
composer run-script phpunit
composer run-script phpstan
composer run-script phpcs
The command druki-content:sync-file
allows you to run import/update process for the specific file. Expects filepath to the file which should be processed relative to content source path.
Options:
locale
: The langcode which used for content. By default, uses sites default.
Examples:
drush druki-content:sync-file docs/ru/drupal/index.md
drush druki-content:sync-file docs/ru/drupal/index.md --locale=en