Firefox Extension Workshop
Перейти к файлу
renovate[bot] a25c6de875 Update dependency eslint to v6.0.1 (#195) 2019-06-25 20:35:05 +01:00
.circleci Remove troubleshooting line 2019-04-26 10:16:20 -07:00
.github
.utils Fix CSP for newsletter sign-up 2019-03-28 11:47:40 +00:00
_assets Content modules (#190) 2019-06-25 19:45:33 +01:00
_data Content modules (#190) 2019-06-25 19:45:33 +01:00
_includes Content modules (#190) 2019-06-25 19:45:33 +01:00
_layouts Content modules (#190) 2019-06-25 19:45:33 +01:00
content-guidelines Content modules (#190) 2019-06-25 19:45:33 +01:00
documentation Content modules (#190) 2019-06-25 19:45:33 +01:00
.eslintignore
.eslintrc.js
.gitignore
.prettierignore
.prettierrc Update prosewrap to preserve to minimize markdown prettier changes 2019-02-26 11:56:50 +00:00
.stylelintrc Add stylelint 2019-05-24 13:28:47 +01:00
404.html Content modules (#190) 2019-06-25 19:45:33 +01:00
CODE_OF_CONDUCT.md Content modules (#190) 2019-06-25 19:45:33 +01:00
Gemfile Content modules (#190) 2019-06-25 19:45:33 +01:00
Gemfile.lock Content modules (#190) 2019-06-25 19:45:33 +01:00
README.md Page templates (#186) 2019-06-14 18:37:33 +01:00
_config.yml Content modules (#190) 2019-06-25 19:45:33 +01:00
_config_local.yml
community.md Content modules (#190) 2019-06-25 19:45:33 +01:00
extension-basics.md Content modules (#190) 2019-06-25 19:45:33 +01:00
index.md Styled and structured landing page for reskin 2019-05-29 09:14:38 -07:00
package.json Update dependency eslint to v6.0.1 (#195) 2019-06-25 20:35:05 +01:00
renovate.json
robots.txt
search-results.md Content modules (#190) 2019-06-25 19:45:33 +01:00
tags.md Content modules (#190) 2019-06-25 19:45:33 +01:00
yarn.lock Update dependency eslint to v6.0.1 (#195) 2019-06-25 20:35:05 +01:00

README.md

CircleCI

Extension Workshop

Launchpad for why and how to build Firefox extensions.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

Once you have Jekyll and yarn insalled you'll need to install the dependencies:

bundle install
yarn install

Then to run locally in devlopment run:

yarn start

Note: Running locally will show unpublished content that uses the published: false convention in frontmatter. Content with published: false will not be available on stage or production.

Available yarn commands

Command Description
yarn clean Clears the output directly and cleans the .jekyll-cache.
yarn build Builds the site.
yarn start Starts jekyll and includes unpublished content. (Note the first run is slow!)
yarn start-prodlike Starts jekyll and doesn't include unpublished content for a production-like experience.

Content Updates

This site has three templates: a full-width page, a sidebar page for documentation, and a Content Guidelines page

How to add a Content Guidelines page

Create a new page

  1. Create new file
  2. Add header (see example below)
  3. Copy 'modules' needed from content-guidelines/master-template.md and paste in new file
  4. Save as markdown: content-guidelines/page-name.md
---
layout: guides
title: Page Name
permalink: /content-guidelines/page-name/
published: false
---

Note: published: false will withhold this content from stage and production, to publish content, remove this line.

Upload media

  1. Add the image files to _assets/img/
  2. In your page, link to images using this page structure:

This tag will output an entire img element. Note: that using @optim enables the jekyll asset pipeline to optimize the image. This is always recommended unless you see an issue with the output.

{% asset "image.jpg" @optim %}

For finer control you can use:

<img src="{% asset "image.jpg" @path @optim %}" someattr="whatever" />

Here's an example using markdown - note you need to add @path and @optim.

![Remembear subtitle screenshot]({% asset "content-guidelines/remembear-subtitle.png" @path @optim %} "Remembear subtitle text")

Add the page to the menu

Go to _data/content-guidelines-pages.yaml and add a new entry for your page:

- title: "Page Name"
  url: "/content-guidelines/page-name/"
  draft-label: true

Controlling draft labelling

If you don't want the page to be labelled as a draft, as and when it's ready remove draft-label: true from the relevant entry in _data/content-guidelines.yaml

Deployment

The site is auto-deployed on commits to master to https://extensionworkshop.allizom.org/

Tagged commits will be auto deployed to production.