Browse Source

Replace Jekyll with Eleventy (#2071)

Paweł Kuna 1 month ago
parent
commit
be69fd6c08

+ 26 - 0
.build/import-illustrations.js

@@ -16,3 +16,29 @@ fs.writeFileSync(
 	path.join(__dirname, `../src/pages/_data/illustrations.json`),
 	JSON.stringify(illustrations)
 )
+
+
+// let i = {}
+// const dirs = ['light', 'dark', 'autodark']
+// const ilustrations = ['not-found', 'computer-fix', 'boy-with-key', 'boy-girl']
+
+// for(const dir of dirs) {
+// 	i[dir] = {}
+
+// 	for(const ilustration of ilustrations) {
+// 		let svg = fs.readFileSync(path.join(__dirname, `../src/pages/_free-illustrations/${dir}/${ilustration}.svg`), 'utf8')
+
+// 		svg = svg
+// 			.replace(/\n+/g, ' ')
+// 			.replace(/>\s+</g, '><')
+// 			.replace(/\s+/g, ' ')
+// 			.replace(/^[\n\s-]+/, '')
+
+// 		i[dir][ilustration] = svg
+// 	}
+// }
+
+// fs.writeFileSync(
+// 	path.join(__dirname, `../src/pages/_data/free-illustrations.json`),
+// 	JSON.stringify(i)
+// )

+ 26 - 0
.build/unused-files.js

@@ -0,0 +1,26 @@
+const glob = require('glob');
+const fs = require('fs')
+const path = require('path')
+
+const srcDir = path.join(__dirname, '../src')
+
+let foundFiles = []
+glob.sync(`${srcDir}/pages/**/*.{html,md}`).forEach((file) => {
+	let fileContent = fs.readFileSync(file)
+
+	fileContent.toString().replace(/\{% include(_cached)? "([a-z0-9\/_-]+\.html)"/g, (f, c, filename) => {
+		filename = `${srcDir}/pages/_includes/${filename}`
+
+		if (!foundFiles.includes(filename)) {
+			foundFiles.push(filename)
+		}
+	})
+})
+
+let includeFiles = glob.sync(`${srcDir}/pages/_includes/**/*.html`)
+
+includeFiles.forEach((file) => {
+	if (!foundFiles.includes(file)) {
+		console.log('file', file)
+	}
+})

+ 5 - 0
.changeset/cuddly-tables-help.md

@@ -0,0 +1,5 @@
+---
+"@tabler/core": patch
+---
+
+Replace Jekyll with Eleventy

+ 0 - 0
.eleventyignore


+ 0 - 12
Gemfile

@@ -1,12 +0,0 @@
-source "https://rubygems.org"
-
-gem "jekyll", "4.3.4"
-
-group :jekyll_plugins do
-	gem "jekyll-random"
-	gem "jekyll-tidy"
-	gem "jekyll-timeago"
-	gem 'jekyll-redirect-from'
-end
-
-gem 'wdm', '>= 0.1.1' if Gem.win_platform?

+ 0 - 99
Gemfile.lock

@@ -1,99 +0,0 @@
-GEM
-  remote: https://rubygems.org/
-  specs:
-    addressable (2.8.7)
-      public_suffix (>= 2.0.2, < 7.0)
-    bigdecimal (3.1.9)
-    colorator (1.1.0)
-    concurrent-ruby (1.3.4)
-    em-websocket (0.5.3)
-      eventmachine (>= 0.12.9)
-      http_parser.rb (~> 0)
-    eventmachine (1.2.7)
-    ffi (1.17.1)
-    ffi (1.17.1-arm64-darwin)
-    forwardable-extended (2.6.0)
-    google-protobuf (4.29.2)
-      bigdecimal
-      rake (>= 13)
-    google-protobuf (4.29.2-arm64-darwin)
-      bigdecimal
-      rake (>= 13)
-    htmlbeautifier (1.4.3)
-    htmlcompressor (0.4.0)
-    http_parser.rb (0.8.0)
-    i18n (1.14.6)
-      concurrent-ruby (~> 1.0)
-    jekyll (4.3.4)
-      addressable (~> 2.4)
-      colorator (~> 1.0)
-      em-websocket (~> 0.5)
-      i18n (~> 1.0)
-      jekyll-sass-converter (>= 2.0, < 4.0)
-      jekyll-watch (~> 2.0)
-      kramdown (~> 2.3, >= 2.3.1)
-      kramdown-parser-gfm (~> 1.0)
-      liquid (~> 4.0)
-      mercenary (>= 0.3.6, < 0.5)
-      pathutil (~> 0.9)
-      rouge (>= 3.0, < 5.0)
-      safe_yaml (~> 1.0)
-      terminal-table (>= 1.8, < 4.0)
-      webrick (~> 1.7)
-    jekyll-random (0.1)
-      jekyll (>= 3.3, < 5.0)
-    jekyll-redirect-from (0.16.0)
-      jekyll (>= 3.3, < 5.0)
-    jekyll-sass-converter (3.0.0)
-      sass-embedded (~> 1.54)
-    jekyll-tidy (0.2.2)
-      htmlbeautifier
-      htmlcompressor
-      jekyll
-    jekyll-timeago (0.15.0)
-      mini_i18n (>= 0.8.0)
-    jekyll-watch (2.2.1)
-      listen (~> 3.0)
-    kramdown (2.5.1)
-      rexml (>= 3.3.9)
-    kramdown-parser-gfm (1.1.0)
-      kramdown (~> 2.0)
-    liquid (4.0.4)
-    listen (3.9.0)
-      rb-fsevent (~> 0.10, >= 0.10.3)
-      rb-inotify (~> 0.9, >= 0.9.10)
-    mercenary (0.4.0)
-    mini_i18n (0.9.0)
-    pathutil (0.16.2)
-      forwardable-extended (~> 2.6)
-    public_suffix (6.0.1)
-    rake (13.2.1)
-    rb-fsevent (0.11.2)
-    rb-inotify (0.11.1)
-      ffi (~> 1.0)
-    rexml (3.4.0)
-    rouge (4.5.1)
-    safe_yaml (1.0.5)
-    sass-embedded (1.83.0)
-      google-protobuf (~> 4.28)
-      rake (>= 13)
-    sass-embedded (1.83.0-arm64-darwin)
-      google-protobuf (~> 4.28)
-    terminal-table (3.0.2)
-      unicode-display_width (>= 1.1.1, < 3)
-    unicode-display_width (2.6.0)
-    webrick (1.9.1)
-
-PLATFORMS
-  arm64-darwin-24
-  ruby
-
-DEPENDENCIES
-  jekyll (= 4.3.4)
-  jekyll-random
-  jekyll-redirect-from
-  jekyll-tidy
-  jekyll-timeago
-
-BUNDLED WITH
-   2.6.2

+ 0 - 280
_config.yml

@@ -1,280 +0,0 @@
-source: src/pages
-destination: tmp
-
-keep_files:
-  - css
-  - js
-  - img
-  - dist
-  - static
-  - playground.html
-
-use-iconfont: false
-rtl: false
-
-title: Tabler
-description: Premium and Open Source dashboard template with responsive and high quality UI.
-theme-color: "#066fd1"
-
-email: support@tabler.io
-homepage: https://tabler.io
-github-url: https://github.com/tabler/tabler
-github-sponsors-url: https://github.com/sponsors/codecalm
-changelog-url: https://github.com/tabler/tabler/releases
-sponsor-url: https://github.com/sponsors/codecalm
-preview-url: https://tabler.io/demo
-docs-url: https://tabler.io/docs
-
-mapbox-key: pk.eyJ1IjoidGFibGVyIiwiYSI6ImNscHh3dnhndjB2M3QycW85bGd0NXRmZ3YifQ.9LfHPsNoEXQH-xzz-81Ffw
-google-maps-key: AIzaSyAr5mRB4U1KRkVznIrDWEvZjroYcD202DI
-google-maps-dev-key: AIzaSyCL-BY8-sq12m0S9H-S_yMqDmcun3A9znw
-npm-package: "@tabler/core"
-
-random-date-from: "2018-01-01"
-random-date-to: "2022-01-01"
-
-debug: false
-
-layout-dark: false
-
-plugins:
-  - jekyll-random
-  - jekyll-tidy
-  - jekyll-timeago
-  - jekyll-redirect-from
-
-tabler-css-plugins:
-  - tabler-flags
-  - tabler-socials
-  - tabler-payments
-  - tabler-vendors
-  - tabler-marketing
-
-exclude:
-  - .jekyll-cache
-  - redirects.json
-
-markdown: kramdown
-kramdown:
-  input: GFM
-  syntax_highlighter: rouge
-
-jekyll_tidy:
-  compress_html: false
-  ignore_env: development
-
-collections:
-  - free-illustrations
-
-defaults:
-  - scope:
-      type: "pages"
-      path: "*.md"
-    values:
-      layout: markdown
-  - scope:
-      type: "pages"
-    values:
-      layout: default
-
-colors:
-  blue:
-    class: blue
-    hex: '#066fd1'
-    title: Blue
-  azure:
-    class: azure
-    hex: '#45aaf2'
-    title: Azure
-  indigo:
-    class: indigo
-    hex: '#6574cd'
-    title: Indigo
-  purple:
-    class: purple
-    hex: '#a55eea'
-    title: Purple
-  pink:
-    class: pink
-    hex: '#f66d9b'
-    title: Pink
-  red:
-    class: red
-    hex: '#fa4654'
-    title: Red
-  orange:
-    class: orange
-    hex: '#fd9644'
-    title: Orange
-  yellow:
-    class: yellow
-    hex: '#f1c40f'
-    title: Yellow
-  lime:
-    class: lime
-    hex: '#7bd235'
-    title: Lime
-  green:
-    class: green
-    hex: '#5eba00'
-    title: Green
-  teal:
-    class: teal
-    hex: '#2bcbba'
-    title: Teal
-  cyan:
-    class: cyan
-    hex: '#17a2b8'
-    title: Cyan
-
-skin-colors: 
-  rose:
-    hex: '#FFCB9D'
-    title: Rose
-    class: rose
-  yellow:
-    hex: '#F0BA60'
-    title: Yellow
-    class: yellow
-  skin-1:
-    hex: '#e2c6a7'
-    title: Skin 1
-    class: skin-1
-  skin-2:
-    hex: '#c7a786'
-    title: Skin 2
-    class: skin-2
-  skin-3:
-    hex: '#a68063'
-    title: Skin 3
-    class: skin-3
-  skin-4:
-    hex: '#926241'
-    title: Skin 4
-    class: skin-4
-  skin-5:
-    hex: '#654c45'
-    title: Skin 5
-    class: skin-5
-  gray:
-    hex: '#d5d7dd'
-    title: Gray
-    class: gray
-
-colors-extra:
-  white:
-    hex: '#ffffff'
-    title: White
-  dark:
-    hex: '#303645'
-    title: Dark
-  gray:
-    hex: '#868e96'
-    title: Gray
-
-variants:
-  - name: success
-    icon: check
-  - name: info
-    icon: info-circle
-  - name: warning
-    icon: alert-triangle
-  - name: danger
-    icon: alert-circle
-
-theme-colors:
-  primary:
-    class: primary
-    title: Primary
-  secondary:
-    class: secondary
-    title: Secondary
-  success:
-    class: success
-    title: Success
-  warning:
-    class: warning
-    title: Warning
-  danger:
-    class: danger
-    title: Danger
-  info:
-    class: info
-    title: Info
-  dark:
-    class: dark
-    title: Dark
-  light:
-    class: light
-    title: Light
-
-button-states:
-  - class:
-    title: Normal
-  - class: active
-    title: Active state
-  - class: disabled
-    title: Disabled
-
-socials:
-  x:
-    icon: brand-x
-    title: X
-  facebook:
-    icon: brand-facebook
-    title: Facebook
-  twitter:
-    icon: brand-twitter
-    title: Twitter
-  google:
-    icon: brand-google
-    title: Google
-  youtube:
-    icon: brand-youtube
-    title: Youtube
-  vimeo:
-    icon: brand-vimeo
-    title: Vimeo
-  dribbble:
-    icon: brand-dribbble
-    title: Dribbble
-  github:
-    icon: brand-github
-    title: Github
-  instagram:
-    icon: brand-instagram
-    title: Instagram
-  pinterest:
-    icon: brand-pinterest
-    title: Pinterest
-  vk:
-    icon: brand-vk
-    title: VK
-  rss:
-    icon: rss
-    title: RSS
-  flickr:
-    icon: brand-flickr
-    title: Flickr
-  bitbucket:
-    icon: brand-bitbucket
-    title: Bitbucket
-  tabler:
-    icon: brand-tabler
-    title: Tabler
-
-months-short: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
-months-long: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
-
-icons:
-  link: https://tabler.io/icons
-
-emails:
-  price: "$29"
-  buy_link: https://r.tabler.io/buy-emails
-
-illustrations:
-  price: "$59"
-  count: 50
-  buy_link: https://r.tabler.io/buy-illustrations
-

+ 0 - 4
_config_prod.yml

@@ -1,4 +0,0 @@
-exclude:
-  - redirects.json
-  - playground.html
-  - playground-*.html

+ 84 - 86
docs/ui/components/vector-maps.mdx

@@ -81,90 +81,88 @@ You can add markers to the map to highlight specific locations. Below is a sampl
 </div>
 
 <script>
-      // @formatter:on
-      document.addEventListener("DOMContentLoaded", function() {
-      	const map = new jsVectorMap({
-      		selector: '#map-world-markers',
-      		map: 'world_merc',
-      		backgroundColor: 'transparent',
-      		regionStyle: {
-      			initial: {
-      				fill: tabler.getColor('body-bg'),
-      				stroke: tabler.getColor('border-color'),
-      				strokeWidth: 2,
-      			}
-      		},
-      		zoomOnScroll: false,
-      		zoomButtons: false,
-      		markers: [
-      			{
-      				coords: [61.524, 105.3188],
-      				name: "Russia",
-      			},
-      			{
-      				coords: [56.1304, -106.3468],
-      				name: "Canada",
-      			},
-      			{
-      				coords: [71.7069, -42.6043],
-      				name: "Greenland",
-      			},
-      			{
-      				coords: [26.8206, 30.8025],
-      				name: "Egypt",
-      			},
-      			{
-      				coords: [-14.235, -51.9253],
-      				name: "Brazil",
-      			},
-      			{
-      				coords: [35.8617, 104.1954],
-      				name: "China",
-      			},
-      			{
-      				coords: [37.0902, -95.7129],
-      				name: "United States",
-      			},
-      			{
-      				coords: [60.472024, 8.468946],
-      				name: "Norway",
-      			},
-      			{
-      				coords: [48.379433, 31.16558],
-      				name: "Ukraine",
-      			},
-      		],
-      		markerStyle: {
-      			initial: {
-      				r: 4,
-      				stroke: '#fff',
-      				opacity: 1,
-      				strokeWidth: 3,
-      				stokeOpacity: .5,
-      				fill: tabler.getColor('blue')
-      			},
-      			hover: {
-      				fill: tabler.getColor('blue'),
-      				stroke: tabler.getColor('blue')
-      			}
-      		},
-      		markerLabelStyle: {
-      			initial: {
-      				fontSize: 10
-      			},
-      		},
-      		labels: {
-      			markers: {
-      				render: function(marker) {
-      					return marker.name
-      				},
-      			},
-      		},
-      	});
-      	window.addEventListener("resize", () => {
-      		map.updateSize();
-      	});
-      });
-      // @formatter:off
-    </script>
+document.addEventListener("DOMContentLoaded", function() {
+	const map = new jsVectorMap({
+		selector: '#map-world-markers',
+		map: 'world_merc',
+		backgroundColor: 'transparent',
+		regionStyle: {
+			initial: {
+				fill: tabler.getColor('body-bg'),
+				stroke: tabler.getColor('border-color'),
+				strokeWidth: 2,
+			}
+		},
+		zoomOnScroll: false,
+		zoomButtons: false,
+		markers: [
+			{
+				coords: [61.524, 105.3188],
+				name: "Russia",
+			},
+			{
+				coords: [56.1304, -106.3468],
+				name: "Canada",
+			},
+			{
+				coords: [71.7069, -42.6043],
+				name: "Greenland",
+			},
+			{
+				coords: [26.8206, 30.8025],
+				name: "Egypt",
+			},
+			{
+				coords: [-14.235, -51.9253],
+				name: "Brazil",
+			},
+			{
+				coords: [35.8617, 104.1954],
+				name: "China",
+			},
+			{
+				coords: [37.0902, -95.7129],
+				name: "United States",
+			},
+			{
+				coords: [60.472024, 8.468946],
+				name: "Norway",
+			},
+			{
+				coords: [48.379433, 31.16558],
+				name: "Ukraine",
+			},
+		],
+		markerStyle: {
+			initial: {
+				r: 4,
+				stroke: '#fff',
+				opacity: 1,
+				strokeWidth: 3,
+				stokeOpacity: .5,
+				fill: tabler.getColor('blue')
+			},
+			hover: {
+				fill: tabler.getColor('blue'),
+				stroke: tabler.getColor('blue')
+			}
+		},
+		markerLabelStyle: {
+			initial: {
+				fontSize: 10
+			},
+		},
+		labels: {
+			markers: {
+				render: function(marker) {
+					return marker.name
+				},
+			},
+		},
+	});
+	window.addEventListener("resize", () => {
+		map.updateSize();
+	});
+});
+</script>
 ```

+ 545 - 0
eleventy.config.mjs

@@ -0,0 +1,545 @@
+import beautify from 'simply-beautiful';
+import { readFileSync } from 'fs';
+import { EleventyRenderPlugin } from "@11ty/eleventy";
+
+/** @type {import('@11ty/eleventy').LocalConfig} */
+export default function (eleventyConfig) {
+	const env = process.env.NODE_ENV || "development";
+	const isDevelopment = env === "development";
+
+	eleventyConfig.setInputDirectory("src/pages");
+	eleventyConfig.setOutputDirectory(process.env.DIST_DIR || "demo");
+
+	eleventyConfig.setLayoutsDirectory("_layouts");
+	eleventyConfig.setIncludesDirectory("_includes");
+
+	eleventyConfig.setWatchThrottleWaitTime(100);
+
+	eleventyConfig.addPlugin(EleventyRenderPlugin, {
+		accessGlobalData: true,
+	});
+
+	eleventyConfig.setLiquidOptions({
+		timezoneOffset: 0,
+		jekyllInclude: true,
+		dynamicPartials: true,
+		jekyllWhere: true,
+	});
+
+	if (isDevelopment) {
+		eleventyConfig.addWatchTarget("dist");
+	}
+
+	eleventyConfig.addPassthroughCopy("favicon.ico");
+
+	/**
+	 * Data
+	 */
+	eleventyConfig.addGlobalData("environment", env);
+
+	eleventyConfig.addGlobalData("package", JSON.parse(readFileSync("package.json", "utf-8")));
+	eleventyConfig.addGlobalData("readme", readFileSync("README.md", "utf-8"));
+	eleventyConfig.addGlobalData("license", readFileSync("LICENSE", "utf-8"));
+	eleventyConfig.addGlobalData("changelog", readFileSync("CHANGELOG.md", "utf-8"));
+
+	eleventyConfig.addGlobalData("site", {
+		title: "Tabler",
+		description: "Premium and Open Source dashboard template with responsive and high quality UI.",
+		themeColor: "#066fd1",
+
+		email: "support@tabler.io",
+		homepage: "https://tabler.io",
+		githubUrl: "https://github.com/tabler/tabler",
+		githubSponsorsUrl: "https://github.com/sponsors/codecalm",
+		changelogUrl: "https://github.com/tabler/tabler/releases",
+		sponsorUrl: "https://github.com/sponsors/codecalm",
+		previewUrl: "https://tabler.io/demo",
+		docsUrl: "https://tabler.io/docs",
+
+		mapboxKey: "pk.eyJ1IjoidGFibGVyIiwiYSI6ImNscHh3dnhndjB2M3QycW85bGd0NXRmZ3YifQ.9LfHPsNoEXQH-xzz-81Ffw",
+		googleMapsKey: "AIzaSyAr5mRB4U1KRkVznIrDWEvZjroYcD202DI",
+		googleMapsDevKey: "AIzaSyCL-BY8-sq12m0S9H-S_yMqDmcun3A9znw",
+		npmPackage: "@tabler/core",
+
+		tablerCssPlugins: [
+			"tabler-flags",
+			"tabler-socials",
+			"tabler-payments",
+			"tabler-vendors",
+			"tabler-marketing"
+		],
+
+		icons: {
+			link: "https://tabler.io/icons"
+		},
+		emails: {
+			price: "$29",
+			buy_link: "https://r.tabler.io/buy-emails"
+		},
+		illustrations: {
+			price: "$59",
+			count: 50,
+			buy_link: "https://r.tabler.io/buy-illustrations"
+		},
+
+		colors: {
+			"blue": {
+				"class": "blue",
+				"hex": "#066fd1",
+				"title": "Blue"
+			},
+			"azure": {
+				"class": "azure",
+				"hex": "#45aaf2",
+				"title": "Azure"
+			},
+			"indigo": {
+				"class": "indigo",
+				"hex": "#6574cd",
+				"title": "Indigo"
+			},
+			"purple": {
+				"class": "purple",
+				"hex": "#a55eea",
+				"title": "Purple"
+			},
+			"pink": {
+				"class": "pink",
+				"hex": "#f66d9b",
+				"title": "Pink"
+			},
+			"red": {
+				"class": "red",
+				"hex": "#fa4654",
+				"title": "Red"
+			},
+			"orange": {
+				"class": "orange",
+				"hex": "#fd9644",
+				"title": "Orange"
+			},
+			"yellow": {
+				"class": "yellow",
+				"hex": "#f1c40f",
+				"title": "Yellow"
+			},
+			"lime": {
+				"class": "lime",
+				"hex": "#7bd235",
+				"title": "Lime"
+			},
+			"green": {
+				"class": "green",
+				"hex": "#5eba00",
+				"title": "Green"
+			},
+			"teal": {
+				"class": "teal",
+				"hex": "#2bcbba",
+				"title": "Teal"
+			},
+			"cyan": {
+				"class": "cyan",
+				"hex": "#17a2b8",
+				"title": "Cyan"
+			}
+		},
+		skinColors: {
+			"rose": {
+				"hex": "#FFCB9D",
+				"title": "Rose",
+				"class": "rose"
+			},
+			"yellow": {
+				"hex": "#F0BA60",
+				"title": "Yellow",
+				"class": "yellow"
+			},
+			"skin-1": {
+				"hex": "#e2c6a7",
+				"title": "Skin 1",
+				"class": "skin-1"
+			},
+			"skin-2": {
+				"hex": "#c7a786",
+				"title": "Skin 2",
+				"class": "skin-2"
+			},
+			"skin-3": {
+				"hex": "#a68063",
+				"title": "Skin 3",
+				"class": "skin-3"
+			},
+			"skin-4": {
+				"hex": "#926241",
+				"title": "Skin 4",
+				"class": "skin-4"
+			},
+			"skin-5": {
+				"hex": "#654c45",
+				"title": "Skin 5",
+				"class": "skin-5"
+			},
+			"gray": {
+				"hex": "#d5d7dd",
+				"title": "Gray",
+				"class": "gray"
+			}
+		},
+		colorsExtra: {
+			"white": {
+				"hex": "#ffffff",
+				"title": "White"
+			},
+			"dark": {
+				"hex": "#303645",
+				"title": "Dark"
+			},
+			"gray": {
+				"hex": "#868e96",
+				"title": "Gray"
+			}
+		},
+		variants: [
+			{
+				"name": "success",
+				"icon": "check"
+			},
+			{
+				"name": "info",
+				"icon": "info-circle"
+			},
+			{
+				"name": "warning",
+				"icon": "alert-triangle"
+			},
+			{
+				"name": "danger",
+				"icon": "alert-circle"
+			}
+		],
+		"themeColors": {
+			"primary": {
+				"class": "primary",
+				"title": "Primary"
+			},
+			"secondary": {
+				"class": "secondary",
+				"title": "Secondary"
+			},
+			"success": {
+				"class": "success",
+				"title": "Success"
+			},
+			"warning": {
+				"class": "warning",
+				"title": "Warning"
+			},
+			"danger": {
+				"class": "danger",
+				"title": "Danger"
+			},
+			"info": {
+				"class": "info",
+				"title": "Info"
+			},
+			"dark": {
+				"class": "dark",
+				"title": "Dark"
+			},
+			"light": {
+				"class": "light",
+				"title": "Light"
+			}
+		},
+		"buttonStates": [
+			{
+				"class": null,
+				"title": "Normal"
+			},
+			{
+				"class": "active",
+				"title": "Active state"
+			},
+			{
+				"class": "disabled",
+				"title": "Disabled"
+			}
+		],
+		"socials": {
+			"x": {
+				"icon": "brand-x",
+				"title": "X"
+			},
+			"facebook": {
+				"icon": "brand-facebook",
+				"title": "Facebook"
+			},
+			"twitter": {
+				"icon": "brand-twitter",
+				"title": "Twitter"
+			},
+			"google": {
+				"icon": "brand-google",
+				"title": "Google"
+			},
+			"youtube": {
+				"icon": "brand-youtube",
+				"title": "Youtube"
+			},
+			"vimeo": {
+				"icon": "brand-vimeo",
+				"title": "Vimeo"
+			},
+			"dribbble": {
+				"icon": "brand-dribbble",
+				"title": "Dribbble"
+			},
+			"github": {
+				"icon": "brand-github",
+				"title": "Github"
+			},
+			"instagram": {
+				"icon": "brand-instagram",
+				"title": "Instagram"
+			},
+			"pinterest": {
+				"icon": "brand-pinterest",
+				"title": "Pinterest"
+			},
+			"vk": {
+				"icon": "brand-vk",
+				"title": "VK"
+			},
+			"rss": {
+				"icon": "rss",
+				"title": "RSS"
+			},
+			"flickr": {
+				"icon": "brand-flickr",
+				"title": "Flickr"
+			},
+			"bitbucket": {
+				"icon": "brand-bitbucket",
+				"title": "Bitbucket"
+			},
+			"tabler": {
+				"icon": "brand-tabler",
+				"title": "Tabler"
+			}
+		},
+		"months-short": [
+			"Jan",
+			"Feb",
+			"Mar",
+			"Apr",
+			"May",
+			"Jun",
+			"Jul",
+			"Aug",
+			"Sep",
+			"Oct",
+			"Nov",
+			"Dec"
+		],
+		"months-long": [
+			"January",
+			"February",
+			"March",
+			"April",
+			"May",
+			"June",
+			"July",
+			"August",
+			"September",
+			"October",
+			"November",
+			"December"
+		]
+	});
+
+	/**
+	 * Filters
+	 */
+	eleventyConfig.addFilter("miliseconds_to_minutes", function (value) { 
+		// Raturn 3:45 time format
+		const minutes = Math.floor(value / 60000);
+		const seconds = ((value % 60000) / 1000).toFixed(0);
+		return `${minutes}:${seconds < 10 ? '0' : ''}${seconds}`;
+	 });
+
+	eleventyConfig.addFilter("relative", (page) => {
+		const segments = (page.url || '').replace(/^\//).split('/');
+		if (segments.length === 1) {
+			return '.';
+		} else {
+			return '../'.repeat(segments.length - 1).slice(0, -1);
+		}
+	});
+
+	eleventyConfig.addFilter("concat_objects", function (object, object2) {
+		if (
+			object &&
+			object2 &&
+			typeof object === 'object' &&
+			typeof object2 === 'object' &&
+			!Array.isArray(object) &&
+			!Array.isArray(object2)
+		) {
+			return { ...object, ...object2 };
+		}
+		return object;
+	});
+
+	eleventyConfig.addFilter("replace_regex", function (input, regStr, replStr) {
+		const regex = new RegExp(regStr, 'gm');
+		return input.replace(regex, replStr);
+	});
+
+	eleventyConfig.addFilter("timestamp_to_date", function (timestamp) {
+		const date = new Date(timestamp * 1000); // Convert timestamp to milliseconds
+		return date.toISOString().split('T')[0]; // Extract the date in 'YYYY-MM-DD' format
+	});
+
+	eleventyConfig.addFilter("split_to_n", function (arr, n) {
+		const chunkSize = Math.round(arr.length / n);
+		const result = [];
+		for (let i = 0; i < arr.length; i += chunkSize) {
+			result.push(arr.slice(i, i + chunkSize));
+		}
+		return result;
+	})
+
+	eleventyConfig.addFilter("format_number", function (value) {
+		return value.toString()
+			.split('')
+			.reverse()
+			.reduce((acc, char, index) => {
+				if (index > 0 && index % 3 === 0) {
+					acc.push(',');
+				}
+				acc.push(char);
+				return acc;
+			}, [])
+			.reverse()
+			.join('');
+	});
+
+	function randomNumber(x, min = 0, max = 100, round = 0) {
+		let value = ((x * x * Math.PI * Math.E * (max + 1) * (Math.sin(x) / Math.cos(x * x))) % (max + 1 - min)) + min;
+
+		value = value > max ? max : value;
+		value = value < min ? min : value;
+
+		if (round !== 0) {
+			value = parseFloat(value.toFixed(round));
+		} else {
+			value = Math.floor(value);
+		}
+
+		return value;
+	}
+
+	eleventyConfig.addFilter("random_date_ago", function (x, daysAgo = 100) {
+		const today = new Date();
+		const randomDaysAgo = randomNumber(x, 0, daysAgo);
+		today.setDate(today.getDate() - randomDaysAgo);
+		return today;
+	});
+
+	eleventyConfig.addFilter("random_date", function (x, startDate = null, endDate = null) {
+		const start = startDate ? new Date(startDate).getTime() : Date.now() - 100 * 24 * 60 * 60 * 1000;
+		const end = endDate ? new Date(endDate).getTime() : Date.now();
+
+		const randomTimestamp = randomNumber(x, start, end);
+		return new Date(randomTimestamp);
+	});
+
+	eleventyConfig.addFilter("random_item", function (x, items) {
+		const index = randomNumber(x, 0, items.length - 1);
+		return items[index];
+	});
+
+	eleventyConfig.addFilter("random_number", randomNumber);
+
+	eleventyConfig.addFilter("first_letters", function capitalizeFirstLetter(string) {
+		return string.split(' ').map(word => word.charAt(0)).join('');
+	})
+
+	eleventyConfig.addFilter("size", function (elem) {
+		if (elem instanceof Object) {
+			return Object.keys(elem).length;
+		}
+
+		return elem.length;
+	})
+
+	eleventyConfig.addFilter("first", function (elem) {
+		if (elem instanceof Object) {
+			return elem[Object.keys(elem)[0]];
+		}
+
+		return elem[0];
+	})
+
+	// time ago from today
+	eleventyConfig.addFilter("timeago", function (date) {
+		const seconds = Math.floor((new Date() - date) / 1000);
+
+		let interval = Math.floor(seconds / 31536000);
+
+		if (interval > 1) {
+			return interval + " years ago";
+		}
+		interval = Math.floor(seconds / 2592000);
+		if (interval > 1) {
+			return interval + " months ago";
+		}
+		interval = Math.floor(seconds / 86400);
+		if (interval > 1) {
+			return interval + " days ago";
+		}
+		interval = Math.floor(seconds / 3600);
+		if (interval > 1) {
+			return interval + " hours ago";
+		}
+		interval = Math.floor(seconds / 60);
+		if (interval > 1) {
+			return interval + " minutes ago";
+		}
+		if (seconds > 0) {
+			return Math.floor(seconds) + " seconds ago";
+		}
+
+		return "now";
+	})
+
+	/**
+	 * Shortcodes
+	 */
+	const tags = ["capture_global", "endcapture_global", "highlight", "endhighlight"];
+	tags.forEach(tag => {
+		eleventyConfig.addLiquidTag(tag, function (liquidEngine) {
+			return {
+				parse: function (tagToken, remainingTokens) {
+					this.str = tagToken.args;
+				},
+				render: function (scope, hash) {
+					return "";
+				},
+			};
+		});
+	});
+
+	/**
+	 * Transforms
+	 */
+	function prettifyHTML(content, outputPath) {
+		return outputPath.endsWith('.html')
+			? content
+				.replace(/\/\/ @formatter:(on|off)\n+/gm, '')
+			: content
+	}
+
+	eleventyConfig.addTransform('htmlformat', prettifyHTML)
+};

Some files were not shown because too many files changed in this diff