Skip to content

Commit

Permalink
doc: enhance readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Ninerian committed Dec 1, 2023
1 parent dfe0f92 commit 5bf5157
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 15 deletions.
25 changes: 12 additions & 13 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ The following data can be retrieved from the token:

|Helper Name|Token Key| Fetch Function| Description|
| --- | --- | --- | --- |
|CLAIM_BRANCH_ID|branch_id|getBranchId()|Get the branch ID for which the token was issued.|
|CLAIM_BRANCH_SLUG|branch_slug|getBranchSlug()|Get the branch slug for which the token was issued.|
|CLAIM_AUDIENCE|aud|getAudience()|Get targeted audience of the token.|
|CLAIM_EXPIRE_AT|exp|getExpireAtTime()|Get the time when the token expires.|
|CLAIM_NOT_BEFORE|nbf|getNotBeforeTime()|Get the time when the token starts to be valid.|
Expand Down Expand Up @@ -186,16 +184,17 @@ Copyright 2017-2023 Staffbase GmbH.

Licensed under the Apache License, Version 2.0: https://www.apache.org/licenses/LICENSE-2.0


<table>
<tr>
<td>
<img src="docs/assets/images/staffbase.png" alt="Staffbase GmbH" width="96" />
</td>
<td>
<b>Staffbase GmbH</b>
<br />Staffbase is an internal communications platform built to revolutionize the way you work and unite your company. Staffbase is hiring: <a href="https://jobs.staffbase.com" target="_blank" rel="noreferrer">jobs.staffbase.com</a>
<br /><a href="https://github.com/Staffbase" target="_blank" rel="noreferrer">GitHub</a> | <a href="https://staffbase.com/" target="_blank" rel="noreferrer">Website</a> | <a href="https://jobs.staffbase.com" target="_blank" rel="noreferrer">Jobs</a>
</td>
</tr>
</table>
<tr>
<td>
<img src="docs/assets/images/staffbase.png" alt="Staffbase GmbH" width="96" />
</td>
<td>
<b>Staffbase GmbH</b>
<br />Staffbase is an internal communications platform built to revolutionize the way you work and unite your company. Staffbase is hiring: <a href="https://jobs.staffbase.com" target="_blank" rel="noreferrer">jobs.staffbase.com</a>
<br /><a href="https://github.com/Staffbase" target="_blank" rel="noreferrer">GitHub</a> | <a href="https://staffbase.com/" target="_blank" rel="noreferrer">Website</a> | <a href="https://jobs.staffbase.com" target="_blank" rel="noreferrer">Jobs</a>
</td>
</tr>
</table>

4 changes: 4 additions & 0 deletions docSrc/buildDoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ jsdoc2md.render({
const contributionText = retArr[4];
const testText = retArr[5];
const licenseText = retArr[6];
const footerText = retArr[7];

console.log(retArr)

Check failure on line 35 in docSrc/buildDoc.js

View workflow job for this annotation

GitHub Actions / build (14.x)

Missing semicolon

Check failure on line 35 in docSrc/buildDoc.js

View workflow job for this annotation

GitHub Actions / build (15.x)

Missing semicolon

Check failure on line 35 in docSrc/buildDoc.js

View workflow job for this annotation

GitHub Actions / build (16.x)

Missing semicolon

Check failure on line 35 in docSrc/buildDoc.js

View workflow job for this annotation

GitHub Actions / build (18.x)

Missing semicolon

Check failure on line 35 in docSrc/buildDoc.js

View workflow job for this annotation

GitHub Actions / build (19.x)

Missing semicolon
return new Promise( (resolve, reject) => {
fs.readFile(path.join(__dirname, './mainFile.tpl'), (err, mainTpl) => {
if (err) {
Expand All @@ -45,7 +47,9 @@ jsdoc2md.render({
contribution: contributionText,
tests: testText,
license: licenseText,
footer: footerText,
});
console.log(rendered)

Check failure on line 52 in docSrc/buildDoc.js

View workflow job for this annotation

GitHub Actions / build (14.x)

Missing semicolon

Check failure on line 52 in docSrc/buildDoc.js

View workflow job for this annotation

GitHub Actions / build (15.x)

Missing semicolon

Check failure on line 52 in docSrc/buildDoc.js

View workflow job for this annotation

GitHub Actions / build (16.x)

Missing semicolon

Check failure on line 52 in docSrc/buildDoc.js

View workflow job for this annotation

GitHub Actions / build (18.x)

Missing semicolon

Check failure on line 52 in docSrc/buildDoc.js

View workflow job for this annotation

GitHub Actions / build (19.x)

Missing semicolon
// Copy generated markdown file to root folder
fs.writeFile(path.join(__dirname, '../README.MD'), rendered, (err, done) => {
if (err) {
Expand Down
2 changes: 2 additions & 0 deletions docSrc/mainFile.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,5 @@
## License

{{{license}}}

{{{footer}}}
12 changes: 12 additions & 0 deletions docSrc/sections/footer.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<table>
<tr>
<td>
<img src="docs/assets/images/staffbase.png" alt="Staffbase GmbH" width="96" />
</td>
<td>
<b>Staffbase GmbH</b>
<br />Staffbase is an internal communications platform built to revolutionize the way you work and unite your company. Staffbase is hiring: <a href="https://jobs.staffbase.com" target="_blank" rel="noreferrer">jobs.staffbase.com</a>
<br /><a href="https://github.com/Staffbase" target="_blank" rel="noreferrer">GitHub</a> | <a href="https://staffbase.com/" target="_blank" rel="noreferrer">Website</a> | <a href="https://jobs.staffbase.com" target="_blank" rel="noreferrer">Jobs</a>
</td>
</tr>
</table>
14 changes: 14 additions & 0 deletions docSrc/sections/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,19 @@ module.exports = {
}
});
});
const footerPromise = new Promise( (resolve, reject) => {
fs.readFile(path.join(__dirname, 'footer.tpl'), (err, footerTpl) => {
if (err) {
reject(err);
} else {
const tpl = handlebars.compile(footerTpl.toString());
const rendered = tpl({

});
resolve(rendered);
}
});
});
return Promise.all([
overviewPromise,
installationPromise,
Expand All @@ -112,6 +125,7 @@ module.exports = {
contributionPromise,
testPromise,
licensePromise,
footerPromise,
]);
},
};
2 changes: 1 addition & 1 deletion docSrc/sections/license.tpl
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Copyright 2017-2021 Staffbase GmbH.
Copyright 2017-2023 Staffbase GmbH.

Licensed under the Apache License, Version 2.0: https://www.apache.org/licenses/LICENSE-2.0
1 change: 0 additions & 1 deletion docs/API.MD
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ Internally used to get value against the client param string.
| --- | --- | --- |
| claimName | String | The claim name as defined in the tokenDataConsts |

**Kind**: instance method of [SSOTokenData](#markdown-header-new-ssotokendatatokenvals)
### ssoTokenData.getBranchId() ⇒ null ⎮ string
Get the branch ID for which the token was issued.

Expand Down

0 comments on commit 5bf5157

Please sign in to comment.