Skip to content

Initial Drupal configuration

Chen Hui Jing edited this page Jan 12, 2024 · 1 revision

If you are not building the site from scratch, you will not have to do this. But these notes are a good reference if someone does need to set up a new Drupal site from scratch.

Handling media management

  1. Activate media and media library, which are out-of-the-box core modules
  2. Go to /admin/structure/media and create a new media type called SVG (must have installed and activated svg_image_field module first)
  3. When creating content types, choose Media as the new field type (it’s under the Reference category) and label it accordingly
  4. Under reference type, check which media types you want to allow for the field, make your choices depending on what the content type is, but it might be cleaner to allow a single type of media per field (but again, it depends)
  5. The uploaded file location is set at the respective fields of each media type in /admin/structure/media
  6. To use the media library for inserting media in the WYSIWYG editor, remember to configure the options at /admin/config/content/formats/manage/basic_html (assuming you are giving basic HTML as the default text format for input)
    1. To configure the image style for inserted images, go to admin/structure/media/manage/image/display

Configure automatic URL alias

  • Go to /admin/config/search/path/patterns and add one for pages such that the node title is the URL slug
  • When creating a new page, just check that the “Generate automatic alias” checkbox is checked

To ensure media files are deleted from the system