Skip to content

Commit 865e4d0

Browse files
committed
Merge branch 'trunk' into add-module-loader
2 parents 897c33e + 44e1952 commit 865e4d0

File tree

1 file changed

+1
-74
lines changed

1 file changed

+1
-74
lines changed

README.md

+1-74
Original file line numberDiff line numberDiff line change
@@ -15,77 +15,4 @@ It will give you all of the tools you needs to get up and running quickly.
1515

1616
## How do I use it?
1717

18-
### Creating a new repository from this template
19-
20-
Click the `Use this template` button to create a new repository in your own GitHub account from this template.
21-
22-
### Setting up the repository secrets
23-
24-
Go to the Secrets and Variables->Actions sections under the Settings menu of the new repository.
25-
Under the Repository secrets sections, create new the secrets outlined in the table below.
26-
27-
### Secrets
28-
29-
| Secret | Description |
30-
| --------------------- | ------------------------------------------- |
31-
| PROD_SFTP_USER | The username for the Production SFTP server |
32-
| PROD_SFTP_PASSWORD | The password for the Production SFTP server |
33-
| STAGING_SFTP_USER | The username for the Staging SFTP server |
34-
| STAGING_SFTP_PASSWORD | The password for the Staging SFTP server |
35-
36-
### Adding some branch protection rules
37-
38-
1. Navigate to Settings > Branches.
39-
2. Click on **Add classic branch protection rule**
40-
3. Enter `trunk` into the Branch name pattern field.
41-
4. Check **Require a pull request before merging**.
42-
5. Check **Require approvals**. You can leave the number of required approval set at 1.
43-
6. Click on **Create**.
44-
7. Check Require status checks to pass before merging
45-
8. In the search box, searching for “Linting” and add each status check that appears. There should be 3 in total.
46-
47-
## Adding collaborators
48-
49-
In Settings->Collaborators and teams section of the new repository, add the Newspack team as a collaborators with write access.
50-
You may need to add them individually and you can get their usernames from the Newspack team.
51-
52-
### Checking out the repo locally
53-
54-
Checkout the repo locally and run `npm run setup` to install everything.
55-
56-
```bash
57-
git clone <your-repo-url>
58-
59-
cd <your-repo-name>
60-
61-
npm run setup
62-
```
63-
64-
### Create the staging branch
65-
66-
In it doesn't already exist, create and `staging` branch and push it to the remote repository.
67-
68-
```bash
69-
git checkout -b staging
70-
71-
git push origin staging
72-
```
73-
74-
### Search and replace to add your name to the plugin
75-
76-
Do a search and replace in all files for `PublisherName`, `publisher-name` and `Publisher Name` and replace them with the name of your site in the same format. Example: `MySite`, `my-site` and `My Site`.
77-
78-
### Optional: create modules
79-
80-
We strongly suggest that you use the provided Modules framework to organize your code. Overtime, your custom plugin can grow and house several different features and tweaks, and it's a good idea to keep things organized so anyone can easily navigate through the code.
81-
82-
Here are some benefits of developing each feature or small tweak as an independent module:
83-
84-
* Code organization: easy to see what you have and to find what you're looking for
85-
* Documentation: By using modules, you are documenting what you have and avoid getting to a state that nobody even remembers everything that the plugin does
86-
* Enable/disable modules: The ability to enable and disable modules per site.
87-
88-
To create a module, add a new folder under the `modules` folder and add a `module.php` file to it. Optionally, but recommended, add a `info.json` file with a name and a description for the module.
89-
90-
See the provided `sample` module and use it as a starting point.
91-
18+
Please refer to [How to set up the Newspack Starter Template for custom plugins](https://help.newspack.com/how-to-set-up-the-newspack-starter-template-for-custom-plugins/) on help.newspack.com for up-to-date installation and setup instructions.

0 commit comments

Comments
 (0)