-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Devrel 1236/create jumpstart app #1
Merged
Merged
Changes from all commits
Commits
Show all changes
56 commits
Select commit
Hold shift + click to select a range
c834f9c
add colors and fonts to tailwind theme
IvanKiral 8c72f9f
Add header and container components
IvanKiral 5d87c97
Add HeroImage component
IvanKiral 0e0afc3
add video component
IvanKiral 801d509
add featured article and event
IvanKiral b03fccf
remove padding from container
IvanKiral bb33beb
extract logo an navigation into components
IvanKiral 5263763
add footer
IvanKiral 1a74b3c
Refactoring and responsive design
IvanKiral 1c59d2f
add delivery sdk and add options to for formatting
IvanKiral 8b449a9
add generated model from environment
IvanKiral b7fc592
update app to use data from kontent.ai
IvanKiral ef1a1c8
fix typography
IvanKiral 0f2c067
use rich text resolver for rich text elements
IvanKiral ce95b06
make adding content interactive interactive
IvanKiral e12f45d
fixup navigation keys
IvanKiral e0614f3
regenarete model and update video component
IvanKiral 8954d85
fix component rendering when partial content
IvanKiral 5f118bd
update index html title
IvanKiral 993a0d8
fixup page content space
IvanKiral 0431f19
remove unnecesray log
IvanKiral aa6fadf
update model
IvanKiral 9e1975d
Fix video autoplay
IvanKiral 8e6a3ce
Fix video iframe when non-existing link
IvanKiral 4c86de9
add react router
IvanKiral e0e17bb
add context for environment parameters
IvanKiral 7831e93
use simple router to get to the page
IvanKiral cc8a0e8
add auth0 dependencies
IvanKiral d4ad528
implement change environmentId
IvanKiral 3f0b266
add vercel.json
IvanKiral d61b543
update filtering of items
IvanKiral cfac2ef
regenerate model to change event's asset to image
IvanKiral 669b8f0
fix pageContent alignment
IvanKiral 437b1e2
make app more robust for content type element's mistakes
IvanKiral cd5ff0d
fixup return filtering for landing_page
IvanKiral 11075db
fix tag coloring
IvanKiral afa37b3
add space in landing page body_copy
IvanKiral ceae304
add images alt
IvanKiral 61e5ec0
add title for iframe
IvanKiral 26bff09
add meta description
IvanKiral 0d5f521
redirect after popup login
IvanKiral 655b197
use suspense for one continuous loader
IvanKiral c2a8c3c
update event color
IvanKiral 7ac2df8
add robots.txt
IvanKiral f09ab86
add static sizes to images
IvanKiral 2c37319
update richtext style for other elments
IvanKiral 1d74475
update readme and env template
IvanKiral f236739
add lint and build github workflow
IvanKiral acc6e32
temporalily use default eslint
IvanKiral 5c76a92
update link to data-ops in readme
IvanKiral a2e4ee0
add robustness with messages when type is missing element
IvanKiral f39179f
change images to use webp format
IvanKiral 98d481f
update body_copy to be in page section
IvanKiral 020ee6c
update landing page item filter option
IvanKiral affb158
change jumpstart to kickstart
IvanKiral fd62436
fix environment variable name
IvanKiral File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
VITE_ENVIRONMENT_ID= | ||
VITE_DELIVERY_API_KEY= | ||
|
||
# (Optional) used only for model generation | ||
VITE_MAPI_API_KEY= | ||
|
||
# Only for Kontent.ai developers | ||
VITE_AUTH_REDIRECT_URL= | ||
VITE_AUTH_DOMAIN= | ||
VITE_AUTH_CLIENT_ID= | ||
VITE_KONTENT_URL= | ||
VITE_DELIVER_URL= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Lint & Build | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
id: nvm | ||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: ".nvmrc" | ||
- run: npm ci | ||
- run: npm run lint | ||
- run: npm run build | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,3 +22,5 @@ dist-ssr | |
*.njsproj | ||
*.sln | ||
*.sw? | ||
|
||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
lts/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,67 @@ | ||
# React + TypeScript + Vite | ||
|
||
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. | ||
|
||
Currently, two official plugins are available: | ||
|
||
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh | ||
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh | ||
|
||
## Expanding the ESLint configuration | ||
|
||
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules: | ||
|
||
- Configure the top-level `parserOptions` property like this: | ||
|
||
```js | ||
export default tseslint.config({ | ||
languageOptions: { | ||
// other options... | ||
parserOptions: { | ||
project: ['./tsconfig.node.json', './tsconfig.app.json'], | ||
tsconfigRootDir: import.meta.dirname, | ||
}, | ||
}, | ||
}) | ||
``` | ||
|
||
- Replace `tseslint.configs.recommended` to `tseslint.configs.recommendedTypeChecked` or `tseslint.configs.strictTypeChecked` | ||
- Optionally add `...tseslint.configs.stylisticTypeChecked` | ||
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and update the config: | ||
|
||
```js | ||
// eslint.config.js | ||
import react from 'eslint-plugin-react' | ||
|
||
export default tseslint.config({ | ||
// Set the react version | ||
settings: { react: { version: '18.3' } }, | ||
plugins: { | ||
// Add the react plugin | ||
react, | ||
}, | ||
rules: { | ||
// other rules... | ||
// Enable its recommended rules | ||
...react.configs.recommended.rules, | ||
...react.configs['jsx-runtime'].rules, | ||
}, | ||
}) | ||
``` | ||
# Kontent.ai Kickstart Sample React App | ||
|
||
[![Contributors][contributors-shield]][contributors-url] | ||
[![Forks][forks-shield]][forks-url] | ||
[![Stargazers][stars-shield]][stars-url] | ||
[![Issues][issues-shield]][issues-url] | ||
[![MIT License][license-shield]][license-url] | ||
[![Discord][discord-shield]][discord-url] | ||
|
||
This repository contains the solution for the Kontent.ai Kickstart Sample React App. It serves as a learning resource for those starting new projects with Kontent.ai, providing a foundational template to build upon. | ||
|
||
The app is built with Vite for fast and optimized development, and Tailwind CSS is used for styling the application. | ||
|
||
## Contributing | ||
|
||
### How to Contribute | ||
|
||
- **Report Issues**: Use the [GitHub Issues](https://github.com/kontent-ai/kickstart-react-app/issues) to report bugs or request features. | ||
- **Fork the Repository**: Create a personal fork of the repository on GitHub. | ||
- **Create a Feature Branch**: Use a descriptive name for your branch. | ||
- **Submit a Pull Request**: Submit your changes for review. | ||
|
||
Please read our [Contributing Guidelines](CONTRIBUTING.md) for more details. | ||
|
||
### Code of Conduct | ||
|
||
This project adheres to a [Code of Conduct](https://github.com/kontent-ai/.github/blob/main/CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. | ||
|
||
### Getting Started with Development | ||
|
||
- Run `npm ci` to install packages. | ||
- Create a `.env` file from `.env.template` and fill out all necessary variables. | ||
- Run `npm run dev` to run the application in developer mode. | ||
|
||
## License | ||
|
||
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE) file for details. | ||
|
||
--- | ||
|
||
## Support | ||
|
||
If you have any questions or need assistance, please reach out: | ||
|
||
- **Kontent.ai Support**: [Contact Support](https://kontent.ai/support/) | ||
|
||
--- | ||
|
||
## Additional Resources | ||
|
||
- **Kontent.ai Official Documentation**: [Learn more about Kontent.ai](https://kontent.ai/learn/) | ||
|
||
--- | ||
|
||
[contributors-shield]: https://img.shields.io/github/contributors/kontent-ai/kickstart-react-app?style=for-the-badge | ||
[contributors-url]: https://github.com/kontent-ai/kickstart-react-app/graphs/contributors | ||
[forks-shield]: https://img.shields.io/github/forks/kontent-ai/kickstart-react-app.svg?style=for-the-badge | ||
[forks-url]: https://github.com/kontent-ai/kickstart-react-app/network/members | ||
[stars-shield]: https://img.shields.io/github/stars/kontent-ai/kickstart-react-app.svg?style=for-the-badge | ||
[stars-url]: https://github.com/kontent-ai/kickstart-react-app/stargazers | ||
[issues-shield]: https://img.shields.io/github/issues/kontent-ai/kickstart-react-app.svg?style=for-the-badge | ||
[issues-url]: https://github.com/kontent-ai/kickstart-react-app/issues | ||
[license-shield]: https://img.shields.io/github/license/kontent-ai/kickstart-react-app.svg?style=for-the-badge | ||
[license-url]: https://github.com/kontent-ai/kickstart-react-app/blob/master/LICENSE.md | ||
[discord-shield]: https://img.shields.io/discord/821885171984891914?color=%237289DA&label=Kontent.ai%20Discord&logo=discord&style=for-the-badge | ||
[discord-url]: https://discord.com/invite/SKCxwPtevJ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import dotenv from 'dotenv'; | ||
import {generateDeliveryModelsAsync} from "@kontent-ai/model-generator"; | ||
|
||
|
||
dotenv.config(); | ||
|
||
const {VITE_ENVIRONMENT_ID, VITE_MAPI_API_KEY} = process.env; | ||
|
||
if(!VITE_ENVIRONMENT_ID){ | ||
throw new Error("VITE_ENVIRONMENT_ID cannot be empty!"); | ||
} | ||
|
||
if(!VITE_MAPI_API_KEY){ | ||
throw new Error("VITE_MAPI_API_KEY cannot be empty!"); | ||
} | ||
|
||
await generateDeliveryModelsAsync( | ||
{ | ||
environmentId: VITE_ENVIRONMENT_ID, | ||
apiKey: VITE_MAPI_API_KEY, | ||
addTimestamp: false, | ||
outputDir: "./src/model", | ||
moduleFileExtension: "ts", | ||
fileResolvers: { | ||
taxonomy: "camelCase", | ||
contentType: "camelCase", | ||
snippet: "camelCase" | ||
} | ||
} | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are we not using it anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its in old version, need to be updated :/ had more problem to configure it than using so i decided to remove it for now