Skip to content

Commit

Permalink
Update .env template, LICENSE, README.md, package.json, Footer.astro,…
Browse files Browse the repository at this point in the history
… Header.astro, and index.astro files
  • Loading branch information
ndamulelonemakh committed Apr 16, 2024
1 parent e7f5111 commit feb66f0
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 19 deletions.
3 changes: 3 additions & 0 deletions .env template
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
NOTION_CMS_SECRET="your-notion-api-secret"
NOTION_CMS_DATABASE_ID="your-notion-database-id-from-url"
NOTION_CMS_WORKSPACE="optional--your-notion-workspace-name"
7 changes: 7 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Copyright 2024 Ndamulelo Nemakhavhani

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ npm create astro@latest -- --template notion-cms-astro-blog

Features:

-Automatic Sync Script From A [Notion](https://notion.so) Database
-Automatically Sync blog content from A [Notion](https://notion.so) Database
- ✅ Astro [Content Collections](https://docs.astro.build/en/guides/content-collections/)
- ✅ RSS Feed support
- ✅ Markdown & MDX support
Expand Down Expand Up @@ -55,7 +55,7 @@ All commands are run from the root of the project, from a terminal:

# Content Management

- Since we are using [Content Collections], any markdown files in the `src/content` folder will be automatically converted into pages.
- Since we are using [AstroJS Content Collections API](https://docs.astro.build/en/guides/content-collections/), any markdown files in the `src/content` folder will be automatically converted into pages.
- In addition, to manually edited markdown files, we can also use the `npm run sync` command to download content from your Notion database into the `src/content` folder.
- When working in dev, add your [Notion](https://notion.so) API key and database id to the `.env` file as follows:

Expand Down Expand Up @@ -109,7 +109,7 @@ jobs:
## License
- [CC-by-4.0](https://creativecommons.org/licenses/by/4.0/)
- This template is licensed under the MIT License - see the full license in the [LICENSE](./LICENSE) file.
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@
"template",
"starter"
],
"homepage": "https://github.com/endeesa/notion-cms-astro-blog#readme",
"homepage": "https://github.com/ndamulelonemakh/notion-cms-astro-blog#readme",
"bugs": {
"url": "https://github.com/endeesa/notion-cms-astro-blog/issues",
"url": "https://github.com/ndamulelonemakh/notion-cms-astro-blog/issues",
"email": "[email protected]"
},
"license": "CC-BY-4.0",
"license": "MIT",
"type": "module",
"version": "0.0.1",
"private": true,
"repository": {
"type": "git",
"url": "https://github.com/endeesa/notion-cms-astro-blog.git"
"url": "https://github.com/ndamulelonemakh/notion-cms-astro-blog.git"
},
"scripts": {
"dev": "astro dev",
Expand Down
6 changes: 3 additions & 3 deletions src/components/Footer.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ const today = new Date();
---

<footer>
&copy; {today.getFullYear()} Ndamulelo. All rights reserved.
&copy; {today.getFullYear()} <a target="_blank" href="https://blog.ndamulelo.co.za/about">N Nemakhavhani</a>. All rights reserved.
<div class="social-links">
<a href="https://twitter.com/astrodotbuild" target="_blank">
<a href="https://twitter.com/ndamulelonemakh" target="_blank">
<span class="sr-only">Follow Ndamulelo on Twitter</span>
<svg viewBox="0 0 16 16" aria-hidden="true" width="32" height="32" astro-icon="social/twitter"
><path
Expand All @@ -14,7 +14,7 @@ const today = new Date();
></path></svg
>
</a>
<a href="https://github.com/endeesa" target="_blank">
<a href="https://github.com/ndamulelonemakh" target="_blank">
<span class="sr-only">Go to Ndamulelo's GitHub repo</span>
<svg viewBox="0 0 16 16" aria-hidden="true" width="32" height="32" astro-icon="social/github"
><path
Expand Down
2 changes: 1 addition & 1 deletion src/components/Header.astro
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { SITE_TITLE } from "../consts";
<h2><a href="/">{SITE_TITLE}</a></h2>
<div class="internal-links">
<HeaderLink href="/">Home</HeaderLink>
<HeaderLink href="/blog">Blog</HeaderLink>
<HeaderLink href="/blog">Articles</HeaderLink>
<HeaderLink href="/about">About</HeaderLink>
</div>
<div class="social-links">
Expand Down
9 changes: 1 addition & 8 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,7 @@ import { SITE_TITLE, SITE_DESCRIPTION } from "../consts";
<section id="greet-box" class="greet-box">
<h1>📜 Hello, there!</h1>
<p>
This is a starter template that shows how you can use Astro and Notion to build a blog site. The content of
the blog is retried from a Notion database using the official Notion REST API or SDK. Thanks to Astro's
Content Collection API all you need to do is to download you content from Notion in Markdown format and put it
in the `src/content/blog` folder.You can also optionally opt to automatically update the site using Github
Actions and a custom script to download the content from Notion.
This template demonstrates how to use <a href="https://astro.build/">Astro</a> and <a href="https://www.notion.so/">Notion</a> as a <a href="">CMS</a>. The blog content is fetched from a Notion database using the official <a href="https://www.npmjs.com/package/@notionhq/client">Notion SDK for JavaScript</a>. THANKS to <a href="https://docs.astro.build/en/guides/content-collections/">Astro's Content Collection API</a>, you simply need to download your Notion content in Markdown format and place it in the <code>src/content/blog</code> folder. Optionally, you can intergrate with <a href="https://github.com/features/actions">Github Actions</a> to run the synchronization script(<code>npm run sync</code>) on a schedule.
</p>
</section>

Expand All @@ -33,9 +29,6 @@ import { SITE_TITLE, SITE_DESCRIPTION } from "../consts";
<li>
<a href="https://github.com/endeesa/notion-cms-astro-blog"> Github Repo</a>
</li>
<li>
<a href=""> Live Demo</a>
</li>

<li>
<a href="https://developers.notion.com/reference/intro">Notion REST API Reference</a>
Expand Down

0 comments on commit feb66f0

Please sign in to comment.