Skip to content

Commit 44a57ac

Browse files
authored
Merge pull request #126 from Jumoo/smallthings-today
sync root and selectable sets and commandline user and dog 🐕
2 parents 6bc2ada + aa49a55 commit 44a57ac

File tree

4 files changed

+40
-8
lines changed

4 files changed

+40
-8
lines changed

usync/01.uSync/20.guides/62.syncRoot.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Your child site just needs the `uSync/root` folder copying into it, and its good
4444
By default, the child site will be locked from overwriting root items, and won’t let you
4545
save the changes in the UI. You can disable this by setting LockRoot to false in the config of the child site.
4646

47-
```cs
47+
```json
4848
{
4949
"uSync": {
5050
"Settings": {
@@ -56,6 +56,20 @@ save the changes in the UI. You can disable this by setting LockRoot to false in
5656

5757
When you want to update a child site copy the root folder to its uSync folder and import.
5858

59+
### Lock Root Types
60+
61+
You can also lock certain types individually. For example, you could configure your settings so that `documents` and `media` are locked, but everything else can be overwritten.
62+
63+
```json
64+
{
65+
"uSync": {
66+
"Settings": {
67+
"LockRootTypes": ["documents", "media"]
68+
}
69+
}
70+
}
71+
```
72+
5973
# Fancy Merging
6074

6175
What if you want to add a new property to a content type on a child site and you still want to get any updates from the root site? With fancy merging, you can do that.

usync/01.uSync/40.reference/04.Fundementals/04.sets.md renamed to usync/01.uSync/20.guides/75.sets.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,8 @@ To add a new set to the drop down, you will need to do two things:
1919
"uSync" : {
2020
"Sets": {
2121
"Default": {
22-
"IsSelectable": true
2322
},
2423
"ContentOnly": {
25-
"IsSelectable": true,
2624
"DisabledHandlers": [
2725
"LanguageHandler",
2826
"DataTypeHandler",
@@ -34,7 +32,6 @@ To add a new set to the drop down, you will need to do two things:
3432
]
3533
},
3634
"SettingsOnly": {
37-
"IsSelectable": true,
3835
"DisabledHandlers": [
3936
"ContentHandler",
4037
"MediaHandler",
@@ -48,9 +45,6 @@ To add a new set to the drop down, you will need to do two things:
4845
}
4946
```
5047

51-
:::tip
52-
It's important to remember to set your set to Selectable in the configuration file (`"IsSelectable" : true`) or it will not appear in the dropdown.
53-
:::
5448

5549
### 2. Add A Reference To The Set Configuration Programmatically
5650

File renamed without changes.

usync/04.command/05.APIuser.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,28 @@ Alternatively, you can pass these on the CommandLine. eg.
4040

4141
`usynccli usync-ping -s https://localhost:44359 -s [client_secret] -k [client_id]`
4242

43-
Once this is set up, you can use all the [Commands!](Commands)
43+
Once this is set up, you can use all the [Commands!](Commands)
44+
45+
## uSync.Command.Setup
46+
47+
You can also install the `uSync.Command.Setup` package to set the generate the user and client secret in Umbraco automatically. You can install this package by typing the following command in the command-line.
48+
49+
```
50+
dotnet add package uSync.Command.Setup --version 16.1.0
51+
```
52+
53+
This will allow you to add the `AddIfMissing` setting to the appsettings and fill in user details.
54+
55+
```json
56+
{
57+
"uSync": {
58+
"Command": {
59+
"AddIfMissing": true,
60+
"Secret": "[CLIENT_SECRET]",
61+
"ClientId": "[CLIENT_ID]"
62+
}
63+
}
64+
}
65+
```
66+
67+
Then uSync.CommandLine will search for a user with this client ID. If one does not exist it will create the API user and the client ID for you.

0 commit comments

Comments
 (0)