You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| 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