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.
I have some problems like for example the image not be found when I deploy it
I would like to use sass or have control with the autoprefixer but I do not know how to customize webpack even though I understand that the problem is mine because I still do not feel comfortable with emotion, I love CSS
Amazing work @jesus.designer . It looks really beautiful.
I’d love to contribute so I’ve sent you a small PR to add transitions and save the theme mode in localStorage. I’m really bad at CSS so transitions are kind of clunky
I’ve also seen that you made an Html2React processor for the pre element. That’s awesome
For what I see, the react-syntax-highlighter library is quite big: 790kbs in the production bundle:
(by the way, you can take a look at the /build/analyze/module-production.html file after doing a production build with npx frontity build)
So it’d be an excellent opportunity for code-splitting. That means that the react-syntax-highlighter won’t be downloaded unless users happen to be in a blog post with a pre tag.
If you want, we can help you with that. And I also think it could be a good example for a guide in our docs as well.
1 Like
luisherranz10
I see that you’ve configured autodeploys of Now in Github. It doesn’t make sense that you need to keep your /build folder in GitHub to make it work. Sorry about that. We need to improve the Now file/builder.
jesus.designer11
Thank you for collaborating and your advice is always very useful.
It would be extraordinary if it is loaded only if you are in the post, please help me with it
2 Likes
SantosGuillamot12
Hi @jesus.designer!
I’ve just opened a Pull Request with the changes needed for the code-splitting, so it just loads when a pre tag is present.
I’ll try to explain it better on Monday and work on the documentation for this, but if you have any questions don’t hesitate to tell us
1 Like
luisherranz13
Actually it only loads that code when the React component is included, so only when the post has a <pre> tag.
Mario will prepare the guide next week
1 Like
luisherranz14
By the way, are you using Gutenberg code blocks? Why the brush: class?
jesus.designer15
It´s the way of WordPress .com has mark the language.
I have used Syntaxhighlighter Code block, but soon I will change to own WordPress .org
luisherranz16
Ohh, I see. I didn’t know that block, only the regular Code one.
So this one outputs:
<pre class="brush: jscript;" title=""> var a = "A"; </pre>
jesus.designer17
Yes!
jesus.designer18
Oh Thx! I’m learning a lot
luisherranz19
I have created a proper builder for Now. That means the npx frontity build happens on the cloud, not on your computer and you can put the build folder in your gitignore file.
I have not published it yet to npm but I’ll try to do it as soon as possible
You should be able to remove all the files of your /build folder, add build to the .gitignore file so they don’t get committed to github, change the now.json file, and get new deploys each time you push code to github.