The team is now working on the WordPress Interactivity API. This unblocks the same UX Frontity framework enabled but directly in WordPress Core, fully compatible with the new Site Editor.
Hi everyone. I need to create a frontity theme from scratch, I ran npx frontity create-package and gave both name and namespace the same name āblogThemeā but whenever I try to add the theme to the frontity.settings.js file I get an error that says āInternal Server Errorā on web page. Iām still new to frontity so I donāt know how exactly how Iām supposed to deploy the new theme, I tried adding it in the packages array like this
and both of them didnāt work, I searched if there was anyone that explained how deploy a new theme in frontity and didnāt find anything. Please help.
David3
Hi @mohammed.saeb98, and welcome!
I assume you got that error in the browser when running npx frontity dev, right? Whatās the error message that appears in the terminal?
You can check also the files generated by the npx frontity create-package command. Whatās the content of the following files?
./packages/blogTheme/src/index.js
./packages/blogTheme/package.json
And last, could you run npx frontity info in your project folder? Just to check what packages are installed in your project.
mohammed.saeb984
Ok I figured out the solution, it was a really dumb reason to be honest, I just had to run npm install again and change the name of the theme from the default one to blogTheme in frontity.settings.js
Hey Mohammed! Iām glad you solved the issue and welcome to our community
By the way, we are curious about what brought you to Frontity. What are you planning to build? Let us know if you need help with anything!
2 Likes
mmczaplinski7
I think it would be really helpful to display to the user a sort of ānext stepsā in the CLI after having run frontity create or frontity create-package!
Currently this is the output for running frontity create-package lalala:
> ~/Testing npx frontity create frontity-hello-test
npx: installed 147 in 30.758s
ā Ensuring /Users/czapla/Testing/frontity-hello-test directory.
ā Creating package.json.
ā Creating frontity.settings.js.
ā Cloning @frontity/mars-theme.
ā Installing dependencies.
ā Downloading favicon.ico.
Frontity project created.
? Do you want to receive framework updates by email? No
Ok, that's fine! š
You can subscribe at any point with npx frontity subscribe <email>.
Run cd frontity-hello-test && npx frontity dev and have fun! š
You can find docs at https://docs.frontity.org/.
If you have any doubts, join our community at /.
We can add something like:
Your theme is in `frontity-hello-test/packages/mars-theme`.
To learn why frontity projects are divided into packages: https://docs.frontity.org/learning-frontity/packages.
Now:
1. Edit the `settings.frontity.js` to:
- Point your theme to your REST API endpoint
- Add a name and description to your site
Learn more: https://docs.frontity.org/learning-frontity/settings
2. Look in the `frontity-hello-test/packages/mars-theme/src/index.js to:
- Add custom settings to your theme
- Add state https://docs.frontity.org/learning-frontity/state
- Add custom actions https://docs.frontity.org/learning-frontity/state