Blogging with Blocs 5

Hi everyone,

I have completed work on my new free course for Blocs for iPad, and now I will shift my focus to the Blocs 5 Course. While I will keep adding new masterclass tutorials to Part 3, my next major releases will focus on BLOGGING with Blocs.

I have previously covered Volt CMS (which is great), so now I would like to explore two other scenarios (listed below in the poll).

Which one should I prioritize first?

  • Blogging with Blocs 5 (without a CMS platform)
  • Blogging with Blocs 5 and WordPress

0 voters

4 Likes

Great news…WITHOUT a CMS Platform please

2 Likes

Thanks! I will cover both, just want to decide which one will be first!

Blogging without a CMS platform, I am guessing this is a manual Blog - as in doing it in Blocs and clicking update?

1 Like

You don’t need Volt CMS to create a blog; it’s expensive and not aesthetically pleasing. A free alternative is https://www.sanity.io/.

A quick explanation on how to use Sanity with in Blocs.

  1. Visit the Sanity website (https://www.sanity.io/) and sign up for a free account. Once you’ve created your account, log in to Sanity.

  2. In Sanity, create a new project by selecting “Create New Project.” Give your project a name and configure the options according to your preferences.

  3. Once you’ve created the project in Sanity, go to the “Content” section in the admin panel and define the content types you’ll need for your blog, such as “Articles,” “Categories,” etc. You can customize these content types according to your specific requirements.

  4. Now, within Blocs, select the area where you want to display your blog posts. You can use the “HTML Widget” component to add custom HTML code.

  5. In the Sanity admin panel, select “API” from the menu and copy the GraphQL API URL of your project.

  6. Return to Blocs and paste the following code into the “HTML Widget” component:

<script>
  fetch('SANITY_API_URL', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      query: `
        {
          allArticulos {
            title
            content
          }
        }
      `,
    }),
  })
    .then((response) => response.json())
    .then((data) => {
      const blogPosts = data.data.allArticulos;
      blogPosts.forEach((post) => {
        const blogPostContainer = document.createElement('div');
        const blogPostTitle = document.createElement('h2');
        const blogPostContent = document.createElement('p');
        blogPostTitle.textContent = post.title;
        blogPostContent.textContent = post.content;
        blogPostContainer.appendChild(blogPostTitle);
        blogPostContainer.appendChild(blogPostContent);
        document.getElementById('blogPostsContainer').appendChild(blogPostContainer);
      });
    });
</script>
<div id="blogPostsContainer"></div>

Make sure to replace “SANITY_API_URL” with the GraphQL API URL you copied earlier.

  1. Save your changes in Blocs and preview your site. You should see your blog posts loaded from Sanity and displayed in the designated area.

With these steps, you can use Sanity as a free alternative to Volt CMS for creating and managing your blog, with a more visually appealing design :smiley::smiley::smiley:

3 Likes

Looks like what they promised when WP was first released… * Pay-as-you-go for more resources or add-ons :upside_down_face:

1 Like

That’s an interesting solution. Just, accessing a API URL without leaving website visitors the choice if they want to allow that is so against the GDPR. Or am I missing something here?

It will be implemented on your site, sanity would be like a dashboard where you can create new articles and display them on your site. If you take a look at the documentation you will see that you can access the server from your localhost. :slightly_smiling_face:

Sure, it’s not GDPR compliant. You have to get the user consent first.

Different like Volt CMS which is running on your own server completely.

Yeah by now we all know you don’t like it :roll_eyes:

Good most of my customers are different opinion, or style it to their needs.

6 Likes

I love Volt and the support from @Jannis is just brilliant.

My issue with these free offerings is how long will it be free….or even around? VOLT is here and able to use over and over again due to the brilliant work from Jannis.

7 Likes

Thanks for sharing. I haven’t used it (Sanity) myself, so can’t compare it directly, but I do think that VOLT is the best 3rd party bric for Blocs, which brings a lot of value to the average Blocs app user. Can’t wait to see what @Jannis does with the second version!

6 Likes

I really appreciate all the effort you have put into Volt, I know how hard it is to create an application of this type, but my comments are merely constructive, in the years that I have been critical with your app, I have not seen many changes. I also believe that we must take into account all feedback, positive and negative, and our product will thank us in the long run. :smiley:

:smiley: :smiley: :smiley:

But there was just no need for the dismissive phrase.
You had made your point about Sanity so there was no need for the comparison.

Please take this as a constructive comment!

3 Likes

Fixed, sorry :persevere:

1 Like
6 Likes