Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
quicklink
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
9
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
quicklink
Commits
4bcf269a
Commit
4bcf269a
authored
6 years ago
by
Jim Birch
Committed by
Mike Herchel
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3021756
by thejimbirch: Documentation for composer install
parent
9641e22a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
readme.md
+77
-52
77 additions, 52 deletions
readme.md
with
77 additions
and
52 deletions
readme.md
+
77
−
52
View file @
4bcf269a
...
...
@@ -2,76 +2,101 @@
## What is Quicklink?
The Quicklink module loads the
[
Quicklink library
](
https://github.com/GoogleChromeLabs/quicklink
)
and provides a Drupal
administrative interface to configure it.
The Drupal Quicklink module loads the
[
Quicklink library
](
https://github.com/GoogleChromeLabs/quicklink
)
and provides
a Drupal administrative interface to configure it.
## Installation
Install the module like normal. Because of licensing restrictions, the Quicklink JS library cannot be hosted on Drupal.org.
By default the module will load the Quicklink library from a CDN at
`https://unpkg.com/quicklink@1.0.0/dist/quicklink.umd.js`
.
If you place a copy of this file into your local filesystem at
`/quicklink/js/quicklink.umd.js`
, the module will serve this
instead.
## How do I access the Quicklink admin interface?
### Manual Installation
1.
Download the Drupal module and extract it to your modules folder.
2.
Because of licensing restrictions, the Quicklink JavaScript library cannot
be hosted on Drupal.org.
The Quicklink module admin interface is located at
`admin/config/quicklink/quicklinkconfig`
.
By default this module will load the Quicklink JavaScript library from a CDN at
`https://unpkg.com/quicklink@1.0.0/dist/quicklink.umd.js`
.
## What browsers does this support?
If you place a copy of this file into your local filesystem at
`/libraries/quicklink/dist/quicklink.umd.js`
, this module will serve the local copy
instead of the CDN copy.
Without polyfills: Chrome, Firefox, Edge, Opera, Android Browser, Samsung Internet.
With
[
Intersection Observer polyfill
](
https://github.com/w3c/IntersectionObserver/tree/master/polyfill
)
: Safari, IE9+
### Composer (recommended)
If you manage your site with composer, and would like to install this module
with it, please verify the following steps. If you used the
[
Drupal composer
template
](
https://github.com/drupal-composer/drupal-project
)
to setup your
project, you most likely have this set up already.
## How to ignore certain links.
1.
Add or verify that
`asset-packagist`
is in the repositories section of your
composer.json file:
You can tell Quicklink to ignore certain links by adding them into the ignore list at
`admin/config/quicklink/quicklinkconfig`
.
In addition, you can add a
`noprefetch`
attribute onto the
`<a>`
tag to tell the library not to prefetch this link.
## Installation via Composer
```
"repositories": [
{
"type": "composer",
"url": "https://packages.drupal.org/8"
},
{
"type": "composer",
"url": "https://asset-packagist.org"
},
}
```
Add
the following into your webroot's
`composer.json`
file to automatically download the
`quicklink.umd.js`
file so it
can be served from your system's local filesystem.
2.
Add
or verify that
`type:npm-asset`
is in the
`extra`
>
`installer-path`
>
`web/libraries/{$name}`
section of your composer.json file:
```
"require": {
"GoogleChromeLabs/quicklink": "^1.0"
},
"repositories":[
{
"type":"composer",
"url":"https://packages.drupal.org/8"
},
{
"type": "package",
"package": {
"name": "GoogleChromeLabs/quicklink",
"version": "1.0.0",
"type": "drupal-library",
"dist": {
"url": "https://unpkg.com/quicklink@1.0.0/dist/quicklink.umd.js",
"type": "file"
"extra": {
"installer-paths": {
"web/libraries/{$name}": [
"type:drupal-library",
"type:bower-asset",
"type:npm-asset"
],
}
}
}
]
```
You'll need to ensure that the
`drupal-library`
type is available under
the
`extra
s
`
section of the composer.json. The
code snippit below assumes that you have your webroot in a
`web`
subdirectory.
3.
Add or verify that you have
`npm-asset`
in
the
`extra`
>
`installer-types`
section of your composer.json file:
```
"extra": {
"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"]
},
"patches": {}
}
"installer-types": ["npm-asset", "bower-asset"],
```
After your
`composer.json`
is in order, you can install the library with
`composer require GoogleChromeLabs/quicklink`
,
and you can install the Quicklink module with
`composer require drupal/quicklink`
\ No newline at end of file
4.
Save your composer.json file.
5.
Back at the command line, install the library with
`composer require oomphinc/composer-installers-extender npm-asset/quicklink`
6.
Install the module with
`composer require drupal/quicklink`
7.
Enable the module at
`admin/modules`
or by running
`drush en -y quicklink`
## How do I access the Quicklink admin interface?
The Quicklink module admin interface is located at
`admin/config/quicklink/quicklinkconfig`
.
## What browsers does this support?
Without polyfills:
Chrome, Firefox, Edge, Opera, Android Browser, Samsung Internet.
With [Intersection Observer polyfill]
(https://github.com/w3c/IntersectionObserver/tree/master/polyfill):
Safari, IE9+
## How to ignore certain links.
You can tell Quicklink to ignore certain links by adding them into the ignore
list at
`admin/config/quicklink/quicklinkconfig`
.
In addition, you can add a
`noprefetch`
attribute onto the
`<a>`
tag to tell
the library not to prefetch this link.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment