Skip to content

Commit

Permalink
Feat : Updated Guidelines
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-ashish-k committed Feb 2, 2024
1 parent fcac5e4 commit a19737c
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 23 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/admin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ jobs:
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
SSL_PRIVATE_KEY: |
${{ secrets.SSL_PRIVATE_KEY }}
${{ secrets.SSL_PRIVATE_KEY }}
SSL_PUBLIC_KEY: |
${{ secrets.SSL_PUBLIC_KEY }}
${{ secrets.SSL_PUBLIC_KEY }}
run: |
echo "$SSH_PRIVATE_KEY" > ssh_private_key && chmod 600 ssh_private_key
sed -i "s|ADMIN_PANEL_URL|${{ secrets.ADMIN_PANEL_URL }}|g" admin/nginx/conf.d/website-blog.conf
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ This repository contains the working code of [our resources](https://canopas.com

![Admin panel](https://github.com/canopas/canopas-blog/assets/115449373/7542ff05-08ca-45ae-a4c6-24785419ae35)


### Blogs website

#### Blog Index page UI
Expand Down
3 changes: 1 addition & 2 deletions admin/public/emailTemplates/subscribe.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@ <h1 style="font-size: x-large">{{postTitle}}</h1>
you're receiving this email because you subscribed to recieve
marketing emails.if you'd prefer to not recieve these
emails,please
<a
href="https://canopas.com/unsubscribe?email={{userEmail}}"
<a href="https://canopas.com/unsubscribe?email={{userEmail}}"
>unsubscribe</a
>.
</p>
Expand Down
4 changes: 1 addition & 3 deletions admin/src/api/cta/content-types/cta/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@
"type": "media",
"multiple": false,
"required": false,
"allowedTypes": [
"images"
]
"allowedTypes": ["images"]
},
"posts": {
"type": "relation",
Expand Down
22 changes: 11 additions & 11 deletions admin/src/api/post/content-types/post/lifecycles.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,16 @@ module.exports = {
{
fields: "email",
filters: { is_subscribed: true },
}
},
);

for (i = 0; i < user.length; i++) {
const emailTemplatePath = path.join(
__dirname,
"../../../../../public/emailTemplates/subscribe.html"
"../../../../../public/emailTemplates/subscribe.html",
);
const emailTemplate = handlebars.compile(
fs.readFileSync(emailTemplatePath, "utf8")
fs.readFileSync(emailTemplatePath, "utf8"),
)({
postTitle: event.result.title,
summary: event.result.summary,
Expand Down Expand Up @@ -78,7 +78,7 @@ function triggerGithubWorkflow(publishing) {
axios
.get(
"https://api.github.com/repos/canopas/canopas-website/actions/runs?branch=master",
config
config,
)
.then((res) => {
let devWorkflow = res.data["workflow_runs"].filter(function (workflow) {
Expand All @@ -92,15 +92,15 @@ function triggerGithubWorkflow(publishing) {
null,
{
headers: config.headers,
}
},
);

if (publishing) {
let prodWorkflow = res.data["workflow_runs"].filter(function (
workflow
) {
return workflow.name == "DeployFrontendProd";
});
let prodWorkflow = res.data["workflow_runs"].filter(
function (workflow) {
return workflow.name == "DeployFrontendProd";
},
);

axios.post(
"https://api.github.com/repos/canopas/canopas-website/actions/runs/" +
Expand All @@ -109,7 +109,7 @@ function triggerGithubWorkflow(publishing) {
null,
{
headers: config.headers,
}
},
);
}

Expand Down
4 changes: 1 addition & 3 deletions admin/src/api/post/content-types/post/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@
"type": "media",
"multiple": false,
"required": false,
"allowedTypes": [
"images"
]
"allowedTypes": ["images"]
},
"summary": {
"type": "text",
Expand Down
6 changes: 5 additions & 1 deletion admin/src/plugins/guidelines/admin/src/pages/guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,14 @@ Welcome to our blog! We value high-quality content that engages and informs our

## Additional Guidelines

- Start writing a blog from `content manager``post``create new entry`
- Use indentation to add space at the beginning of paragraphs or code blocks.
- Separate divs or sections using horizontal lines.
- The image will be available on the `media library` section on the left sidebar, if not then you can upload it from the blog itself
- Convert gifs to videos for animations
- For `summary` and `meta_description`, you can add them from story settings or make it your own, which is related to your blog
- `is_resource` field should be false for technical blogs
- Include related articles at the end of your post to encourage readers to explore more content.
- To provide a user experience similar to Medium blogs, follow the formatting style we use in Medium blogs.

## Users Permissions

Expand Down

0 comments on commit a19737c

Please sign in to comment.