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
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
38
38
39
39
steps:
40
-
- name: Checkout repository
41
-
uses: actions/checkout@v3
40
+
- name: Checkout repository
41
+
uses: actions/checkout@v4
42
42
43
-
# Initializes the CodeQL tools for scanning.
44
-
- name: Initialize CodeQL
45
-
uses: github/codeql-action/init@v2
46
-
with:
47
-
languages: ${{ matrix.language }}
48
-
# If you wish to specify custom queries, you can do so here or in a config file.
49
-
# By default, queries listed here will override any specified in a config file.
50
-
# Prefix the list here with "+" to use these queries and those in the config file.
43
+
# Initializes the CodeQL tools for scanning.
44
+
- name: Initialize CodeQL
45
+
uses: github/codeql-action/init@v3
46
+
with:
47
+
languages: ${{ matrix.language }}
48
+
# If you wish to specify custom queries, you can do so here or in a config file.
49
+
# By default, queries listed here will override any specified in a config file.
50
+
# Prefix the list here with "+" to use these queries and those in the config file.
51
51
52
-
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
53
-
# queries: security-extended,security-and-quality
52
+
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
53
+
# queries: security-extended,security-and-quality
54
54
55
+
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
56
+
# If this step fails, then you should remove it and run the build manually (see below)
57
+
- name: Autobuild
58
+
uses: github/codeql-action/autobuild@v3
55
59
56
-
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
57
-
# If this step fails, then you should remove it and run the build manually (see below)
58
-
- name: Autobuild
59
-
uses: github/codeql-action/autobuild@v2
60
+
# ℹ️ Command-line programs to run using the OS shell.
61
+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
60
62
61
-
# ℹ️ Command-line programs to run using the OS shell.
62
-
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
63
+
# If the Autobuild fails above, remove it and uncomment the following three lines.
64
+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
63
65
64
-
# If the Autobuild fails above, remove it and uncomment the following three lines.
65
-
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
Copy file name to clipboardExpand all lines: README.md
+34-17Lines changed: 34 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -6,10 +6,12 @@ Example Site: https://sillsdev.github.io/docu-notion-sample-site/
6
6
7
7
# Instructions
8
8
9
-
## 1. Set up your documentation site.
9
+
## 1. Set up your documentation site
10
10
11
11
First, prepare your markdown-based static file system like [Docusaurus](https://docusaurus.io/). For a shortcut with github actions, search, and deployment to github pages, you can just copy [this template](https://github.com/sillsdev/docu-notion-sample-site).
12
12
13
+
If you do not use the above sample, you will need to manually tell your `docusaurus.config.js` about `docu-notion-styles.css`. See [Styling and Layout](https://docusaurus.io/docs/styling-layout). This stylesheet enables various Notion things to look right, for example multi-column layouts. By default, docu-notion will copy this file to the `css/` directory. There is an option to change that location if you want.
14
+
13
15
## 2. In Notion, duplicate the docu-notion template
14
16
15
17
Go to [this template page](https://hattonjohn.notion.site/Documentation-Template-Docusaurus-0e998b32da3c47edad0f62a25b49818c). Duplicate it into your own workspace.
@@ -25,15 +27,15 @@ Go to the page that will be the root of your site. This page should have, as dir
Currently, docu-notion expects that each page has only one of the following: sub-pages, links to other pages, or normal content. Do not mix them. You can add content pages directly here, but then you won't be able to make use of the workflow features. If those matter to you, instead make new pages under the "Database" and then link to them in your outline pages.
31
33
32
34
## 6. Pull your pages
33
35
34
-
First, determine the id of your root page by clicking "Share" and looking at the url it gives you. E.g.
means that the ID is `0456aa5842946PRETEND4f37c97a0e5`.
37
39
38
40
Try it out:
39
41
@@ -88,7 +90,9 @@ One of the big attractions of Notion for large documentation projects is that yo
88
90
89
91
## Slugs
90
92
91
-
By default, pages will be given a slug based on the Notion id. For a human-readable URL, add a notion property named `Slug` to your database pages and enter a value in there that will work well in a URL. That is, no spaces, ?, #, /, etc.
93
+
By default, pages will be given a slug based on the Notion ID. For a human-readable URL, add a notion property named `Slug` to your database pages and enter a value in there that will work well in a URL. That is, no spaces, ?, #, /, etc.
94
+
95
+
See `Options` to require slugs in Notion.
92
96
93
97
## Known Limitations
94
98
@@ -110,25 +114,27 @@ NOTE: if you just localize an image, it will not get picked up. You also must lo
110
114
111
115
# Automated builds with Github Actions
112
116
113
-
Here is a working Github Action script to copy and customize: https://github.com/BloomBooks/bloom-docs/blob/master/.github/workflows/release.yml
117
+
Here is a [working Github Action script to copy and customize](https://github.com/BloomBooks/bloom-docs/blob/master/.github/workflows/release.yml).
| -n, --notion-token <string> | required | notion api token, which looks like `secret_3bc1b50XFYb15123RHF243x43450XFY33250XFYa343`|
124
-
| -r, --root-page <string> | required | The 31 character ID of the page which is the root of your docs page in notion. The code will look like `9120ec9960244ead80fa2ef4bc1bba25`. This page must have a child page named 'Outline' |
125
-
| -m, --markdown-output-path <string> || Root of the hierarchy for md files. WARNING: node-pull-mdx will delete files from this directory. Note also that if it finds localized images, it will create an i18n/ directory as a sibling. (default: "./docs") |
126
-
| -t, --status-tag <string> || Database pages without a Notion page property 'status' matching this will be ignored. Use '\*' to ignore status altogether. (default: `Publish`) |
127
-
| --locales <codes> || Comma-separated list of iso 639-2 codes, the same list as in docusaurus.config.js, minus the primary (i.e. 'en'). This is needed for image localization. (default: []) |
| -i, --img-output-path <string> || Path to directory where images will be stored. If this is not included, images will be placed in the same directory as the document that uses them, which then allows for localization of screenshots. |
130
-
| -p, --img-prefix-in-markdown <string> || When referencing an image from markdown, prefix with this path instead of the full img-output-path. Should be used only in conjunction with --img-output-path. |
131
-
| -h, --help || display help for command |
127
+
|`-n, --notion-token <string>`| required | notion api token, which looks like `secret_3bc1b50XFYb15123RHF243x43450XFY33250XFYa343`|
128
+
|`-r, --root-page <string>`| required | The 31 character ID of the page which is the root of your docs page in notion. The code will look like `9120ec9960244ead80fa2ef4bc1bba25`. This page must have a child page named 'Outline' |
129
+
|`-m, --markdown-output-path <string>`|| Root of the hierarchy for md files. WARNING: node-pull-mdx will delete files from this directory. Note also that if it finds localized images, it will create an i18n/ directory as a sibling. (default: `./docs`) |
130
+
|`-t, --status-tag <string>`|| Database pages without a Notion page property 'status' matching this will be ignored. Use '\*' to ignore status altogether. (default: `Publish`) |
131
+
|`--locales <codes>`|| Comma-separated list of iso 639-2 codes, the same list as in docusaurus.config.js, minus the primary (i.e. 'en'). This is needed for image localization. (default: `[]`) |
|`-i, --img-output-path <string>`|| Path to directory where images will be stored. If this is not included, images will be placed in the same directory as the document that uses them, which then allows for localization of screenshots. |
134
+
|`-p, --img-prefix-in-markdown <string>`|| When referencing an image from markdown, prefix with this path instead of the full img-output-path. Should be used only in conjunction with --img-output-path. |
135
+
|`--require-slugs`|| If set, docu-notion will fail if any pages it would otherwise publish are missing a slug in Notion. |
136
+
|`--image-file-name-format <format>`|| choices:<ul><li>`default`: {page slug (if any)}.{image block ID}</li><li>`content-hash`: Use a hash of the image content.</li><li>`legacy`: Use the legacy (before v0.16) method of determining file names. Set this to maintain backward compatibility.</li></ul>All formats will use the original file extension. |
137
+
|`-h, --help`|| display help for command |
132
138
133
139
# Plugins
134
140
@@ -146,3 +152,14 @@ To map Notion callouts to Docusaurus admonitions, ensure the icon is for the typ
146
152
- 🔥➜ danger
147
153
148
154
The default admonition type, if no matching icon is found, is "note".
155
+
156
+
# Known Workarounds
157
+
158
+
### Start a numbered list at a number other than 1
159
+
160
+
In Notion, make sure the block is "Text," not "Numbered List".
161
+
162
+
- But make sure the number does NOT have a space in front of it. This can/will cause issues with sub-list items.
163
+
- One way to get Notion to let you do this:
164
+
- Create a numbered list item where the text duplicates the number you want. Convert that numbered list item to "Text."
165
+
- i.e. Type "1. 1. Item one." Notion makes the first "1." into a number in a list. When you convert back to "Text," you're left with plain text "1. Item one."
0 commit comments