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
Copy file name to clipboardExpand all lines: README.md
+35-1Lines changed: 35 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,7 @@ filters:
41
41
- adsense
42
42
```
43
43
44
-
where `ca-pub-XXXXXXXXXXXXXXXX` in `publisher-id` is your Google Adsense [Publisher ID](https://support.google.com/adsense/answer/105516?hl=en).
44
+
where `XXXXXXXXXXXXXXXX` in `publisher-id` is your Google Adsense [Publisher ID](https://support.google.com/adsense/answer/105516?hl=en).
45
45
46
46
If you wish to disable ads on a specific page, then add to the Quarto document's YAML header area:
47
47
@@ -67,10 +67,44 @@ filters:
67
67
---
68
68
```
69
69
70
+
### Google Adsense Setup: Adding `ads.txt`
71
+
72
+
To ensure smooth integration with Google Adsense, it's essential to create a [standalone file named `ads.txt`](https://support.google.com/adsense/answer/12171612) within your project directory that identifies the domain as being authorized to serve ads. Follow these steps to include the `ads.txt` file:
73
+
74
+
1. **Create `ads.txt` File:**
75
+
In the root of your project, create a new file named `ads.txt`.
76
+
77
+
2. **Add Google Publisher ID:**
78
+
Open `ads.txt` and insert the following line, replacing `XXXXXXXXXXXXXXXX` with your actual [Google Publisher ID](https://support.google.com/adsense/answer/105516?hl=en):
This line informs Google's web crawler about your association with the provided Publisher ID. For an example, please see the [`docs/ads.txt`](https://github.com/coatless-quarto/adsense/blob/main/README.md).
85
+
86
+
3. **Save and Include in Version Control:**
87
+
Save the changes to `ads.txt` and ensure that the file is included in your version control system if you're using one.
88
+
89
+
4. **Register `ads.txt` in _quarto.yml:**
90
+
Open the `_quarto.yml` configuration and add the `resources` line under the project key.
91
+
92
+
```yaml
93
+
project:
94
+
type: website # default, book, revealjs
95
+
resources:
96
+
- ads.txt
97
+
```
98
+
99
+
This ensures the additional file resources are copied to the output directory.
100
+
101
+
This step is crucial for validating your ownership of the website and enabling a smooth interaction between your Quarto-generated content and Google Adsense. Remember to replace `XXXXXXXXXXXXXXXX` with your specific Google Publisher ID.
Copy file name to clipboardExpand all lines: docs/qgads-installation.qmd
+33Lines changed: 33 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,39 @@ To seamlessly integrate the `adsense` extension into your Quarto project, follow
18
18
19
19
This command installs the `adsense` extension in the `_extensions` subdirectory of your Quarto project. If you're utilizing version control, make sure to include this directory in your repository.
20
20
21
+
## Google Adsense Setup: Adding `ads.txt`
22
+
23
+
To ensure smooth integration with Google Adsense, it's essential to create a [standalone file named `ads.txt`](https://support.google.com/adsense/answer/12171612) within your project directory that identifies the domain as being authorized to serve ads. Follow these steps to include your [Google Publisher ID](https://support.google.com/adsense/answer/105516?hl=en):
24
+
25
+
1.**Create `ads.txt` File:**
26
+
In the root of your project, create a new file named `ads.txt`.
27
+
28
+
2.**Add Google Publisher ID:**
29
+
Open `ads.txt` and insert the following line, replacing `XXXXXXXXXXXXXXXX` with your actual Google Publisher ID:
This line informs Google's web crawler about your association with the provided Publisher ID. For an example, please see the [`docs/ads.txt`](https://github.com/coatless-quarto/adsense/blob/main/README.md).
36
+
37
+
3.**Save and Include in Version Control:**
38
+
Save the changes to `ads.txt` and ensure that the file is included in your version control system if you're using one.
39
+
40
+
4.**Register `ads.txt` in _quarto.yml:**
41
+
Open the `_quarto.yml` configuration and add the `resources` line under the project key.
42
+
43
+
```yaml
44
+
project:
45
+
type: website # default, book, revealjs
46
+
resources:
47
+
- ads.txt
48
+
```
49
+
50
+
This ensures the additional file resources are copied to the output directory.
51
+
52
+
This step is crucial for validating your ownership of the website and enabling a smooth interaction between your Quarto-generated content and Google Adsense. Remember to replace `XXXXXXXXXXXXXXXX` with your specific Google Publisher ID.
53
+
21
54
## Usage
22
55
23
56
You can configure the `adsense` extension in either of the following ways:
Copy file name to clipboardExpand all lines: docs/qgads-release-notes.qmd
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,13 @@ format:
8
8
toc: true
9
9
---
10
10
11
+
12
+
# 2.1.0-Dev: ??? (??-??-??) [DEV]
13
+
14
+
## Documentation
15
+
16
+
- Added documentation to both the README and Installation guide detailing the setup process of `ads.txt`. ([#1](https://github.com/coatless-quarto/adsense/issues/1), h/t [@JosiahParry](https://github.com/JosiahParry))
0 commit comments