But it is, as you can see, is compiled. Let me see, it's not compilable. Yeah, you understand what I mean. Um, yeah, but this is magical because, because I'm not instructing, I'm not defining which kind of pages I have to render, right? So if I don't list the end point to render, Svelkit start from the homepage. In the homepage, in this example, let me run again npm run dev. And let me open again the page, okay. I have the navigation bar where I have the ahref, so I have the link for the homepage and I have the link to the about, right? So part the page, find the element, the tag element A and then try to solve the link, if find the page, then they create the page, right? And obviously, if the page is served by the pluspage.js with the pre-render equal true, okay. So if you want to allow to swap it to the mp2, does the magic, you have to put the pre-render in the pluspage.js or pluslayout.js the constant pre-render equal true. There is a way to skip the magic. There is a parameter in the configuration where, for example, you can... Let me find the documentation. Okay, probably you can list the pages. Fallback no asset pages. Not this one. I don't remember the name, but yeah, I will find it and I will let you know. But yeah, at the end you can list the entries. The entries. The keyword is entries. The entries. So if you want to specify the entries, here the configuration, right? So as you can see, you can list the entries. In this case, the author of Svelkit suggest us to use the parameter that you can send when you run npm run build, but as you can see, you can also R code the list, for example, right? As you can see, npm run build, and then the list. Nice. In this case, you can define exactly what you want to build. But without this you, Svelkit do the dirty job for you. Then now the code is ready to be deployed everywhere because now they are static pages. So as you can see, we have in the build the static pages index.html and then also about. Okay, so in this case, if you want I can show you quickly, I'm going to configure, let me show you. I'm going to do configure netlify. I'm going to do configure netlify. So in netlify, I have set up my project. I link at the project with my GitHub repository of this project. And then the only thing that I can do is to performing npm run build the same thing, the same command that is executed locally. So, and then that's all, right? So the deploy setting, as you can see, we have npm run build. And I'm saying that the asset published is under build, right? In this way I can every time I push something, a new deploy is generated, right? So let me do with a particle example. So if I change something, for example, also in the README, right? So I'm going to do a new plugin. And then I'm going to commit. Okay, in this case I'm updating the README, and then I can push to the origin. So now I'm pushing my source code into the Git, but because Git is linked with Netlify, let me jump into Netlify configuration, and if I refresh, probably I can see something that is building. So I trigger the building. And then I have in the production, this, the website deployed, and this is static, it is static. It's very important, right? It's clear until now? From my side, yes, but I think I'm not the one. Yeah. Yeah, because I can tell more, what I've said stuff, but I don't want to create a more complex things. Yeah. I will say that if they don't ask for more, we can stop here because it was a long day. Yeah. And I think we all deserve to go back to other stuff. Yeah. Just to let you know that there is a way to also to link because now I changing something in the source code, right? I push it on GitHub, and then this is the trigger for triggering the new deploy. Right. But we can configure easily, story block when the content editor publish a stories, send their web book to Netlify and Netlify run again the things because the HTML is static, right? So if you change something in the content, you have to deploy again, even if you are not changing the source code. But yeah, it is feasible in this way. If there is no request about this, because I don't want to add a lot of information, right? Probably is better to understand the basics and then maybe in the future, make the second version of this workshop with the advanced stuff. Yeah, that will be nice. Yeah, because at the end, playing with the configuration of the server side, you can do some magic about the performance. But yeah, I need the other three hours. Yeah. Yeah, I can imagine that. Rendering more since, yeah, a huge topic. Yeah, yeah, yeah. But at the end now I'm using Netlify, but I repeat again myself, you are creating HTML so you can deploy, for example, on GitHub pages. Yeah, no need to go to a cloud. Or a typical CDN where you don't have any kind of server side languages, right? Exactly, yeah. So do you have some questions? Yeah, something you wanna tell, any feedback? Anythi... May I know a bit about the internationalization part? Wow! You want to go deep in it? No, but maybe, yeah, we can explain a little bit how it'll be if you want to do it. But I don't think we have, right now, an article to send to him. So, or some references, okay? Yeah, exactly, that's a problem. We don't have the reference yet. No, for Svelte we don't have the reference. Exactly, for Svelte, yeah, for Svelte. So, we can explain how it works. Yeah, yeah, yeah. But we can't send you the code, literally, because it's not done yet. Yes. It's in progress. But I can show quickly, if you- Yeah, you can show how it works. You want to see internationalization in general with Storyblock? Okay, let me do this kind of example. weekly. So, now I'm creating a basic space with Storyblock, as you can see. If you jump in, and as you can see, if you jump into the home, you can't see the multi language, right? So, because you have to jump into the settings, enabling the internationalization, you can add, for example, multiple languages, Italian, and German, okay? And then you can add the new languages, right? So, once I set up the languages, you can jump back into the content, and in the content, as you can see now, you can select the languages. You are changing the default languages, but you can switch, for example, in the Italian language. In Italian language, you can jump into the components, as you can see, but in this case, you are inheriting the value from the default language. If you want to customize, you can click Translate, and then start translating. Okay, this is the way for translating by field, right? Because you have a website, you want to translate the same structure in multiple languages, Italian, German, and so on, right? We have an Advanced stuff, now I can't explain, but where you can create different website for countries, and you can manage, for example, the homepage for Italian countries, and, for example, on the homepage for French. And because the homepage are linked, then you can, for example, add a new component in the Italian homepage, and then, if you want, you can merge the content in other homepages. This is more complex, because at the end, you can define different structure for each countries, and it is a more enterprise way for managing the languages. Yeah, sorry, I was very short, but just to let you know that, yes, it is feasible. And as you can see, you receive the parameter of the languages in the URL, and then you can, on the code side, you can retrieve the proper languages, the proper stories in the proper language. Because at the end, the story is the same, right? But you can ask, okay, give me the content in Italian, or in German, or in the proper language. Yeah, okay, yes, you understand the point, yes.
Comments