Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue/827 10.8.0 drupal docs #828

Merged
merged 4 commits into from
Jun 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions apps/drupal/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Drupal Theming with Particle

**Note:** This readme assumes Particle is installed at the root of your Drupal
project and not within Drupal's theme structure as in previous versions of
Particle. Check [the Particle docs](https://phase2.gitbook.io/frontend/) for
assistance if your configuration does not match.

## Setup

This folder contains two additional directories: `module` and `theme`. Due to
the process by which Drupal loads services, several Particle-specific functions
are expected to exist within a module separate from the theme. This module can
then specify various requirements and dependencies, which Drupal 8 themes still
cannot declare.

To prepare your Drupal installation to use Particle:

1. Move the contents of the `module` folder to your Drupal `modules/contrib` directory.
1. Move the contents of the `theme` folder to your Drupal `theme/contrib` directory.
1. From the main root of the Particle application, open `particle.root.config.js`
1. Find the line that starts with `DRUPAL_DIST`
1. Update the `DRUPAL_DIST` line so that the path resolves to the theme created in step 2.
For example, if the Drupal installation is in a folder named `web`, your line might look like this:
`DRUPAL_DIST: path.resolve('../../web/themes/custom/particle/dist/'),`
1. Ensure the module is enabled: `drush en particle_theme`.
1. Ensure the theme is enabled: `drush theme:enable particle`.
1. Ensure the theme is set: `drush config-set system.theme default THEME_MACHINE_NAME`.
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ component-libraries:
paths: []
atoms:
paths:
- ../../../dist/app-drupal/assets/atomic/_patterns/01-atoms
- /dist/app-drupal/assets/atomic/_patterns/01-atoms
molecules:
paths:
- ../../../dist/app-drupal/assets/atomic/_patterns/02-molecules
- /dist/app-drupal/assets/atomic/_patterns/02-molecules
organisms:
paths:
- ../../../dist/app-drupal/assets/atomic/_patterns/03-organisms
- /dist/app-drupal/assets/atomic/_patterns/03-organisms
templates:
paths: []
pages:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
core:
css:
theme:
../../../dist/app-drupal/assets/app.styles.css:
dist/app-drupal/assets/app.styles.css:
minified: true
js:
../../../dist/app-drupal/assets/app.js:
dist/app-drupal/assets/app.js:
preprocess: false
# See all in Drupal's `core/core.libraries.yml`
dependencies:
Expand All @@ -18,6 +18,6 @@ core:
# See `libraries-override` in particle.info.yml
jquery:
js:
../../../dist/app-drupal/assets/drupal-jquery.js:
dist/app-drupal/assets/drupal-jquery.js:
preprocess: false
weight: -20