Skip to content
View gustawdaniel's full-sized avatar
✒️
typing...
✒️
typing...
Block or Report

Block or report gustawdaniel

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Add an optional note:
Please don't include any personal information such as legal names or email addresses. Maximum 100 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
gustawdaniel/README.md
Astro Theme Cactus logo

Astro Theme Cactus

Astro Theme Cactus is a simple opinionated starter built with the Astro framework. Use it to create an easy-to-use blog or website.

Key Features

  • Astro Fast 🚀
  • TailwindCSS Utility classes
  • Accessible, semantic HTML markup
  • Responsive & SEO-friendly
  • Dark / Light mode, using Tailwind and CSS variables
  • Astro Assets Integration for optimised images
  • MD & MDX posts
  • Satori for creating open graph png images
  • Pagination
  • Automatic RSS feed
  • Shiki code syntax styling
  • Auto-generated sitemap
  • Pagefind static search library integration
  • Astro Icon svg icon component

Demo 💻

Check out the Demo, hosted on Netlify

Quick start

Create a new repo from this template.

Deploy with Netlify Deploy with Vercel

Preview

Astro Theme Cactus in a light theme mode

Astro Theme Cactus in a dark theme mode

Commands

Replace pnpm with your choice of npm / yarn

Command Action
pnpm install Installs dependencies
pnpm dev Starts local dev server at localhost:3000
pnpm build Build your production site to ./dist/
pnpm postbuild Pagefind script to build the static search of your blog posts
pnpm preview Preview your build locally, before deploying
pnpm sync Generate types based on your config in src/content/config.ts

Configure

  • Edit the config file src/site.config.ts for basic site meta data
  • Update file astro.config.ts site property with your own domain
  • Replace & update files within the /public folder:
    • favicon.ico & other social icons
    • robots.txt - update the Sitemap url to your own domain
    • manifest.webmanifest
  • Modify file src/styles/global.css with your own light and dark styles
  • Edit social links in src/components/SocialList.astro to add/replace your media profile. Icons can be found @ icones.js.org
  • Create / edit posts for your blog within src/content/post/ with .md/mdx file(s). See below for more details.
  • OG Image:
    • If you would like to change the style of the generated image the Satori library creates, open up src/pages/og-image/[slug].png.ts to the markup function where you can edit the html/tailwind-classes as necessary. You can also use this satori playground to aid your design.
    • If you would like to generate svg og images rather than the default .png ones, you will need to remove the @resvg/resvg-js library, and return the svg within the body of the get function from the file src/pages/og-image/[slug].png.ts.
    • You can also create your own og images and skip satori generating if for you by adding an ogImage property in the frontmatter with a link to the asset, an example can be found in src/content/post/social-image.md. More info on frontmatter can be found here
  • Optional:
    • Fonts: This theme sets the body element to the font family font-mono, located in the global css file src/styles/global.css. You can change fonts by removing the variant font-mono, after which TailwindCSS will default to the font-sans font family stack.

Adding posts

This theme utilises Content Collections to organise Markdown and/or MDX files, as well as type-checking frontmatter with a schema -> src/content/config.ts.

Adding a post is as simple as adding your .md(x) files to the src/content/post folder, the filename of which will be used as the slug/url. The posts included with this template are there as an example of how to structure your frontmatter. Additionally, the Astro docs has a detailed section on markdown pages.

Frontmatter

Property (* required) Description
title * Self explanatory. Used as the text link to the post, the h1 on the posts' page, and the pages title property. Has a max length of 60 chars, set in src/content/config.ts
description * Similar to above, used as the seo description property. Has a min length of 50 and a max length of 160 chars, set in the post schema.
publishDate * Again pretty simple. To change the date format/locale, currently en-GB, update the date option in src/site.config.ts. Note you can also pass additional options to the component <FormattedDate> if required.
updatedDate This is an optional date representing when a post has been updated, in the same format as the publishDate. Note that by providing this field, the sorting function, found in src/utils/post.ts, sortMDByDate will order by this field rather than its published date.
tags Tags are optional with any created post. Any new tag(s) will be shown in yourdomain.com/posts & yourdomain.com/tags, and generate the page(s) yourdomain.com/tags/[yourTag]
coverImage This is an optional object that will add a cover image to the top of a post. Include both a src: "path-to-image" and alt: "image alt". You can view an example in src/content/post/cover-image.md.
ogImage This is an optional property. An OG Image will be generated automatically for every post where this property isn't provided. If you would like to create your own for a specific post, include this property and a link to your image, the theme will then skip automatically generating one.

Pagefind search

This integration brings a static search feature for searching blog posts. In its current form, pagefind only works once the site has been built. This theme adds a postbuild script that should be run after Astro has built the site. You can preview locally by running both build && postbuild.

Search results only includes blog posts. If you would like to include other/all your pages, remove/re-locate the attribute data-pagefind-body to the article tag found in src/layouts/BlogPost.astro.

It also allows you to filter posts by tags added in the frontmatter of blog posts. If you would rather remove this, remove the data attribute data-pagefind-filter="tag" from the link in src/components/blog/Hero.astro.

Note the current build will display a warning in the console, you can follow this issue here

If you would rather not include this integration, simply remove the component src/components/Search.astro, and uninstall both @pagefind/default-ui & pagefind from package.json. You will also need to remove the postbuild script from here as well.

Analytics

You may want to track the number of visitors you receive to your blog/website in order to understand trends and popular posts/pages you've created. There are a number of providers out there one could use, including web hosts such as vercel, netlify, and cloudflare.

This theme/template doesn't include a specific solution due to there being a number of use cases and/or options which some people may or may not use.

You may be asked to included a snippet inside the HEAD tag of your website when setting it up, which can be found in src/layouts/Base.astro. Alternatively, you could add the snippet in src/components/BaseHead.astro.

Another popular provider is google analytics which you could integrate via the above method, or, for example adding astro-google-analytics

pnpm install astro-google-analytics

Edit src/layouts/Base.astro, and add:

---
import { GoogleAnalytics } from "astro-google-analytics";
// ...other imports
---

<head>
	<!-- Replace id with your own Google Analytics ID -->
	<GoogleAnalytics id="G-XXXXXXXXXX" />
</head>

Deploy

Astro docs has a great section and breakdown of how to deploy your own Astro site on various platforms and their idiosyncrasies.

By default, the site will be built (see Commands section above) to a /dist directory.

Acknowledgment

This theme is inspired by Hexo Theme Cactus

License

MIT


Development

Once grant caddy access to 433 without sudo

sudo setcap CAP_NET_BIND_SERVICE=+eip $(which caddy)

Then start all languages by

npm run dev-all

GUSTAWDANIEL PUBLISHED

Analiza Prawa Zipfa w Node.js Retry Policy - Jak obsługiwać losowe, nieprzewidywalne błędy Publikacja aktualizacji paczki w repozytorium AUR Najmniejsza wspólna wielokrotność - teoria liczb Jak skonfigurować SSL w lokalnym developmencie Jeszcze jedna instrukcja instalacji Arch Linux (i3) Rozkład Benforda dla Ciągu Fibonacciego w Java, Rust i Node JS Sterowanie procesami w Node JS Broadcast Channel API Analiza częstości nazw altcoinów w korpusie języka angielskiego Wpływ indeksacji na wydajność wyszukiwania w bazie MySQL Scraping najbardziej popularnych kont na twitterze Bot Telegramowy w Typescript Aplikacja z FOSUserBundle i API Google Maps Instalacja odnawialnego certyfikatu TLS (certbot + apache na Ubuntu) Scrapowanie danych w języku Perl Kompilacja interpretera php 7 w BunsenLabs Analiza logów Apache z GoAccess Tesseract-OCR i testowanie selektów. Wizualizacja dynamicznej sieci korelacyjnej. Logowanie danych w MySql, Ajax i Behat Scraping Facebooka w 2021 roku W jaki sposób wojna o kompatybilność ukształtowała frontend? Wyciskamy dane z PDF jak sok z cytryny Ile rodzin zmieści się w samolocie - zadanie z algorytmiki Scraping WordPress - 4300 wyroków sądów w sprawach frankowych bez linii kodu Ruby on Rails - szybkie wprowadzenie Infrastrukura defniowana przez kod (terraform + digital ocean) Wyznaczenie różnicy plików JSON Scraping Rejestru Aptek Jak pobrać dane kontaktowe 20k adwokatów w godzinę Scraping z money.pl w 30 liniach kodu. Strukturyzacja danych na przykładzie kursu CHF NBP

GUSTAWDANIEL DRAFT

Jak przygotować się do apokalipsy zombie How to install MongoDB 6 on Fedora 37 Rust Konfiguracja wysyłki emaili w Strapi przez Emaillabs Wprowadzenie do Deno Analiza wpływu technologii na rozwój mediów. Invoice Cookie Ws Wpływ zmian rezerwy na giełdach na cenę BTC Apollo Server w Node JS + Mongo DB + Prisma Konsolowy CRM z Prisma i MongoDB mkcert Jak przechowywać sekrety w gicie z blackbox Rozesłanie kluczy na serwery Continuous Delivery w Gitlab Ci (Docker in Docker) Jak pobrałem dane o 4k firm w pół godziny Fetch, Promise oraz Template String Badanie wydajności insertów mysql Snake game in JavaScript (part 3 - Vue) Snake game in JavaScript (part 2 - events) Snake game in JavaScript (part 1 - objects) Pomiar ilości tekstu i kodu w moich wpisach Analiza wydajności pustych pętli w 16 językach Najlepsze metody web-scrapingu Form Data w Node JS Dotnet Ugoda KNF, Odfrankowienie oraz Unieważnienie kredytu indeksowanego w CHF

PRECISELAB PUBLISHED

Rust implementation of RFC 7396 - JSON Merge Patch Tutorial for ESM + CommonJS package creators How to Install Yay on a Pure Arch Linux Docker Image Simplifying Linux Command Line with GPT-CLI (rust, open source) tRPC - super fast development cycle for fullstack typescript apps How to install MongoDB 6 on Fedora 37 QuickSort implementation in Rust, Typescript and Go ZeroMQ pull-push pattern for Node JS New Google Identity in Nuxt 3 Selected syntax in JavaScript ES2020, ES2021 and ES2022 CodinGame: Best fit to data - Rust - Regression Analysis CodinGame: Derivative Time - Part 1, Recursion (Typescript) CodinGame: Quaternion Multiplication - Rust, NodeJS - Parsing, Algebra, Mathematics CodinGame: ASCI Art - Rust, NodeJs - Strings, Arrays, Loops Overload Signatures in Typescript Login by Metamask - Rest Backend in Fastify (Node, Typescript, Prisma) Login Component in Nuxt (Rest Strapi) Maximum Inequality [Linear Search] rust and typescript Pulumi - Infrastructure as a Code [ Digital Ocean ] Last Occurrence [Linear Search] easy Bolt (always) Lite - MITM, Proxy, Insomnia and Vue Xss attack using script style and image How to create a free email account with custom domain? Fetch, Promise and Template String on example of To Do List in JavaScript Communication between Vue components in Meteor Git styled calendar with custom dates

PRECISELAB DRAFT

How to transform BTC blockchain to neo4j on Fedora Linux Problem with standard Auth flow Test Article Managing processes in Node JS. Calculating the difference between JSON files. Creating an RPM Package for a Rust CLI Application on Fedora How I created 24 videos in single day to promote my GPT-CLI How did the compatibility war shape the frontend? How I used GPT-3 to solve my issues with OBS and Davinci Resolve problems with MKV format Performance of SQLite, Redis and Text search in Rust Scrabble The best web-scrapping methods Measuring the amount of text and code in my blog posts Fractional calclus on example of gaussian curve How to optimize your code

Add terminal with vue

GPT_SYSTEM_PROMPT="I am a translator from Polish to English. I need to translate this text." GPT_POST=out GPT_MODEL=gpt-3.5-turbo-16k p "$(cat index.md)" > en.md

Popular repositories

  1. gpt-cli gpt-cli Public

    Run linux commands with natural language. Eg.: "show my graphic card" instead "lspci | grep VGA"

    Rust 66 4

  2. Apache-Log-Analysis-Admin-Panel Apache-Log-Analysis-Admin-Panel Public

    Panel for output of goaccess. It contain example of SPA with login and templating, access by API with content negotiation, and connectors between bash and yml and json.

    PHP 2 1

  3. metamask-fastify-rest-api metamask-fastify-rest-api Public

    TypeScript 2

  4. javascript_training javascript_training Public

    PHP 1 6

  5. ranwhen ranwhen Public

    Forked from p-e-w/ranwhen

    Visualize when your system was running

    Python 1

  6. reactive-set reactive-set Public

    Meteor package for Reactive Set - object allowing store unique values of any type

    JavaScript 1

2,378 contributions in the last year

No contributions on February 19th.No contributions on February 26th.No contributions on March 5th.2 contributions on March 12th.50 contributions on March 19th.8 contributions on March 26th.1 contribution on April 2nd.5 contributions on April 9th.No contributions on April 16th.No contributions on April 23rd.2 contributions on April 30th.No contributions on May 7th.No contributions on May 14th.No contributions on May 21st.No contributions on May 28th.No contributions on June 4th.No contributions on June 11th.No contributions on June 18th.6 contributions on June 25th.No contributions on July 2nd.No contributions on July 9th.No contributions on July 16th.No contributions on July 23rd.No contributions on July 30th.2 contributions on August 6th.2 contributions on August 13th.No contributions on August 20th.2 contributions on August 27th.10 contributions on September 3rd.1 contribution on September 10th.No contributions on September 17th.2 contributions on September 24th.No contributions on October 1st.No contributions on October 8th.1 contribution on October 15th.4 contributions on October 22nd.12 contributions on October 29th.1 contribution on November 5th.2 contributions on November 12th.No contributions on November 19th.No contributions on November 26th.1 contribution on December 3rd.No contributions on December 10th.No contributions on December 17th.7 contributions on December 24th.No contributions on December 31st.No contributions on January 7th.No contributions on January 14th.No contributions on January 21st.No contributions on January 28th.3 contributions on February 4th.No contributions on February 11th.No contributions on February 18th.3 contributions on February 20th.27 contributions on February 27th.1 contribution on March 6th.5 contributions on March 13th.13 contributions on March 20th.13 contributions on March 27th.2 contributions on April 3rd.1 contribution on April 10th.No contributions on April 17th.1 contribution on April 24th.No contributions on May 1st.No contributions on May 8th.No contributions on May 15th.18 contributions on May 22nd.13 contributions on May 29th.7 contributions on June 5th.No contributions on June 12th.1 contribution on June 19th.5 contributions on June 26th.12 contributions on July 3rd.22 contributions on July 10th.28 contributions on July 17th.6 contributions on July 24th.18 contributions on July 31st.20 contributions on August 7th.6 contributions on August 14th.10 contributions on August 21st.9 contributions on August 28th.1 contribution on September 4th.3 contributions on September 11th.No contributions on September 18th.No contributions on September 25th.5 contributions on October 2nd.1 contribution on October 9th.24 contributions on October 16th.No contributions on October 23rd.21 contributions on October 30th.2 contributions on November 6th.2 contributions on November 13th.No contributions on November 20th.5 contributions on November 27th.2 contributions on December 4th.7 contributions on December 11th.13 contributions on December 18th.21 contributions on December 25th.No contributions on January 1st.14 contributions on January 8th.No contributions on January 15th.No contributions on January 22nd.No contributions on January 29th.40 contributions on February 5th.1 contribution on February 12th.3 contributions on February 19th.No contributions on February 21st.83 contributions on February 28th.1 contribution on March 7th.22 contributions on March 14th.10 contributions on March 21st.42 contributions on March 28th.5 contributions on April 4th.No contributions on April 11th.2 contributions on April 18th.2 contributions on April 25th.No contributions on May 2nd.No contributions on May 9th.1 contribution on May 16th.9 contributions on May 23rd.9 contributions on May 30th.19 contributions on June 6th.No contributions on June 13th.2 contributions on June 20th.4 contributions on June 27th.3 contributions on July 4th.24 contributions on July 11th.9 contributions on July 18th.14 contributions on July 25th.26 contributions on August 1st.17 contributions on August 8th.6 contributions on August 15th.9 contributions on August 22nd.25 contributions on August 29th.No contributions on September 5th.No contributions on September 12th.No contributions on September 19th.No contributions on September 26th.6 contributions on October 3rd.2 contributions on October 10th.19 contributions on October 17th.5 contributions on October 24th.6 contributions on October 31st.No contributions on November 7th.No contributions on November 14th.No contributions on November 21st.9 contributions on November 28th.No contributions on December 5th.2 contributions on December 12th.19 contributions on December 19th.No contributions on December 26th.No contributions on January 2nd.22 contributions on January 9th.2 contributions on January 16th.No contributions on January 23rd.No contributions on January 30th.6 contributions on February 6th.2 contributions on February 13th.No contributions on February 22nd.1 contribution on March 1st.No contributions on March 8th.34 contributions on March 15th.26 contributions on March 22nd.4 contributions on March 29th.17 contributions on April 5th.1 contribution on April 12th.4 contributions on April 19th.No contributions on April 26th.1 contribution on May 3rd.No contributions on May 10th.No contributions on May 17th.3 contributions on May 24th.3 contributions on May 31st.4 contributions on June 7th.No contributions on June 14th.10 contributions on June 21st.14 contributions on June 28th.27 contributions on July 5th.33 contributions on July 12th.3 contributions on July 19th.19 contributions on July 26th.35 contributions on August 2nd.5 contributions on August 9th.1 contribution on August 16th.14 contributions on August 23rd.16 contributions on August 30th.4 contributions on September 6th.3 contributions on September 13th.3 contributions on September 20th.No contributions on September 27th.1 contribution on October 4th.2 contributions on October 11th.6 contributions on October 18th.3 contributions on October 25th.1 contribution on November 1st.1 contribution on November 8th.5 contributions on November 15th.No contributions on November 22nd.5 contributions on November 29th.No contributions on December 6th.1 contribution on December 13th.43 contributions on December 20th.23 contributions on December 27th.35 contributions on January 3rd.7 contributions on January 10th.No contributions on January 17th.No contributions on January 24th.No contributions on January 31st.7 contributions on February 7th.No contributions on February 14th.2 contributions on February 23rd.No contributions on March 2nd.4 contributions on March 9th.12 contributions on March 16th.24 contributions on March 23rd.2 contributions on March 30th.6 contributions on April 6th.2 contributions on April 13th.5 contributions on April 20th.2 contributions on April 27th.1 contribution on May 4th.1 contribution on May 11th.4 contributions on May 18th.6 contributions on May 25th.No contributions on June 1st.6 contributions on June 8th.No contributions on June 15th.No contributions on June 22nd.7 contributions on June 29th.16 contributions on July 6th.7 contributions on July 13th.12 contributions on July 20th.7 contributions on July 27th.49 contributions on August 3rd.11 contributions on August 10th.7 contributions on August 17th.19 contributions on August 24th.30 contributions on August 31st.2 contributions on September 7th.11 contributions on September 14th.2 contributions on September 21st.No contributions on September 28th.No contributions on October 5th.13 contributions on October 12th.11 contributions on October 19th.3 contributions on October 26th.No contributions on November 2nd.12 contributions on November 9th.1 contribution on November 16th.1 contribution on November 23rd.20 contributions on November 30th.5 contributions on December 7th.2 contributions on December 14th.No contributions on December 21st.41 contributions on December 28th.10 contributions on January 4th.7 contributions on January 11th.No contributions on January 18th.No contributions on January 25th.No contributions on February 1st.No contributions on February 8th.3 contributions on February 15th.11 contributions on February 24th.17 contributions on March 3rd.12 contributions on March 10th.3 contributions on March 17th.3 contributions on March 24th.1 contribution on March 31st.6 contributions on April 7th.18 contributions on April 14th.3 contributions on April 21st.No contributions on April 28th.No contributions on May 5th.No contributions on May 12th.No contributions on May 19th.4 contributions on May 26th.4 contributions on June 2nd.5 contributions on June 9th.No contributions on June 16th.3 contributions on June 23rd.3 contributions on June 30th.7 contributions on July 7th.16 contributions on July 14th.13 contributions on July 21st.15 contributions on July 28th.22 contributions on August 4th.10 contributions on August 11th.38 contributions on August 18th.30 contributions on August 25th.11 contributions on September 1st.2 contributions on September 8th.3 contributions on September 15th.21 contributions on September 22nd.6 contributions on September 29th.No contributions on October 6th.7 contributions on October 13th.5 contributions on October 20th.19 contributions on October 27th.No contributions on November 3rd.1 contribution on November 10th.No contributions on November 17th.5 contributions on November 24th.No contributions on December 1st.21 contributions on December 8th.11 contributions on December 15th.20 contributions on December 22nd.19 contributions on December 29th.2 contributions on January 5th.1 contribution on January 12th.No contributions on January 19th.No contributions on January 26th.25 contributions on February 2nd.18 contributions on February 9th.1 contribution on February 16th.34 contributions on February 25th.No contributions on March 4th.No contributions on March 11th.2 contributions on March 18th.9 contributions on March 25th.14 contributions on April 1st.1 contribution on April 8th.3 contributions on April 15th.13 contributions on April 22nd.No contributions on April 29th.No contributions on May 6th.No contributions on May 13th.No contributions on May 20th.No contributions on May 27th.No contributions on June 3rd.1 contribution on June 10th.No contributions on June 17th.3 contributions on June 24th.No contributions on July 1st.4 contributions on July 8th.No contributions on July 15th.No contributions on July 22nd.2 contributions on July 29th.7 contributions on August 5th.3 contributions on August 12th.No contributions on August 19th.5 contributions on August 26th.6 contributions on September 2nd.2 contributions on September 9th.2 contributions on September 16th.No contributions on September 23rd.No contributions on September 30th.No contributions on October 7th.No contributions on October 14th.10 contributions on October 21st.10 contributions on October 28th.No contributions on November 4th.No contributions on November 11th.No contributions on November 18th.No contributions on November 25th.No contributions on December 2nd.No contributions on December 9th.3 contributions on December 16th.10 contributions on December 23rd.3 contributions on December 30th.No contributions on January 6th.No contributions on January 13th.No contributions on January 20th.No contributions on January 27th.4 contributions on February 3rd.No contributions on February 10th.No contributions on February 17th.
Contribution Graph
Day of Week February March April May June July August September October November December January February
Sunday
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
Less
No contributions.
Low contributions.
Medium-low contributions.
Medium-high contributions.
High contributions.
More

Contribution activity

February 2024

Created 1 repository
Opened 1 pull request in 1 repository
anthonynosek/sprint-reader-chrome 1 open

Created an issue in Meteor-Community-Packages/react-router-ssr that received 2 comments

Compatibility with meteor 3

After command: meteor update --release 3.0-beta.0 in the existing meteor 2 project I see error: * meteor@1.1.14 <- livedata 1.0.18 <- communitypac…

2 comments
Opened 2 other issues in 2 repositories
monti-apm/meteor-profiler 1 open
sakulstra/meteor-aggregate 1 open
108 contributions in private repositories Feb 2 – Feb 19

Seeing something unexpected? Take a look at the GitHub profile guide.