How to add slides.com Reveal Slides to your Gatsby site
Gatsby makes it easy to serve static HTML files with your gatsby site

Originally published at https://fek.io.
Summary
The web content provides a tutorial on integrating Reveal.js slides exported from slides.com into a Gatsby site, allowing for static hosting of slide presentations.
Abstract
The article guides readers through the process of adding slides created with slides.com, which are based on the Reveal.js framework, to a Gatsby-powered website. It explains that Gatsby can serve static HTML files, and outlines the steps to configure a Gatsby site to host these slides. The process includes installing the gatsby-source-filesystem plugin, configuring it to recognize a static/slides directory, and using GraphQL to query the slides. It also details creating a slides.js page in Gatsby to list and link to the static slide files, emphasizing the use of anchor tags over Gatsby's Link component for external content. The author concludes by praising Gatsby's versatility in serving both dynamic and static content.
Opinions

Originally published at https://fek.io.
I was getting ready to create a set of slides for my next presentation. I usually use slides.com to create and host my slides. If you have not looked at slide.com before, it is a great example of the power of web applications. Slides.com has a presentation editor that is based on Reveal.js, a JavaScript library for making animated slide shows. I am a firm believer that you do not need Powerpoint to make slide shows. This can be done as a web app.
As I was getting ready to start my next set of slides I found out I had exceeded my limit of free slides. So I have decided to move my slides over to my Gatsby site.
The first thing I had to do was export all of my slides. Slides.com gives you the ability to import and export slides into and out of their application. It will allow you to export your slides as a self-contained HTML application in a single HTML file.
Gatsby allows you to host static content in your site so that if you need to serve static CSS or images, this can be easily configured. You will need to install the ‘gatsby-source-filesystem’ plugin in order to serve these files.
> npm i gatsby-source-filesystem --saveThe above command will install the plugin into your Gatsby site. After it has been installed, you will need to configure the plugin in your ‘gatsby-config.json’ file. Add the following configuration into the plugin export.
plugins: [
{
resolve: `gatsby-source-filesystem`,
options: {
name: `static`,
path: `${__dirname}/static`
},
}
];This will look into a ‘static’ folder for any static files you need to serve. I added another folder underneath my static folder called ‘slides’, and placed my HTML files in that folder.
To retrieve a list of slides from our static folder, we will need to write a graphql query to get that list of files. You can test this by using the Graph iql editor hosted in the development server. You can access this by going to http://localhost:8000/___graphql.
The next need you will need to do is create a Gatsby page to list the slides in your ‘slides’ folder. I created one underneath the root of my ‘/src/pages’ called ‘slides.js’. Here is what my react code looked like in my ‘slides.js’ file.
If you look at the section on line 22 that has a map on the edges of the result data.myslides.edges.map, I am returning an anchor tag instead of a Link tag for displaying the link. This is because the Link tag is only used for gatsby pages. Since this is static HTML content we want to use a normal anchor tag.
Gatsby is great at doing many different things. On top of rendering react content and Gatsby content, you can also use it to serve up static content as well as long as you configure your site correctly.
There are also a number of plugins you can use for creating slides from markdown that I plan on looking at as well.
You can view my slides page at here.
Originally published at https://fek.io.
Amir LatypovImprove your Cypress tests for GraphQL APIs with typed data returns. Safeguard against errors using TypeScript.
Meng LiThe Truth Behind Google’s Mass Layoffs: How Tech Giants Adapt in the Era of AI