Try adding docs
Some checks failed
/ build (push) Successful in 1m33s
Ruby / Ruby 3.3.5 (push) Failing after 14s

This commit is contained in:
Aleks Rutins 2025-06-10 18:11:38 -04:00
parent 15c0a1ccc0
commit 04e1d9eb91
Signed by: asr
SSH key fingerprint: SHA256:DBype7RrB3qCdOLdkvecD2Y3THOYgYOVw6jAHVgsGRQ
10 changed files with 144 additions and 74 deletions

13
docs/build.rb Normal file
View file

@ -0,0 +1,13 @@
require_relative '../lib/phlexite'
require 'phlex'
module Phlexite
module Docs end
end
require_relative 'pages/layout'
require_relative 'pages/index'
Phlexite::Site.new { |s|
s.page 'index.html', Phlexite::Docs::Pages::Index.new
}

10
docs/pages/index.rb Normal file
View file

@ -0,0 +1,10 @@
module Phlexite::Docs::Pages
class Index < ::Phlex::HTML
def view_template
render Layout.new {
h1 { 'Phlexite' }
p { 'Phlexite is a simple static site generator for Ruby.' }
}
end
end
end

29
docs/pages/layout.rb Normal file
View file

@ -0,0 +1,29 @@
module Phlexite::Docs::Pages
class Layout < ::Phlex::HTML
def view_template
doctype
html {
head {
meta charset: 'utf-8'
meta name: 'viewport', content: 'width=device-width, initial-scale=1.0'
title { "Phlexite" }
link rel: 'stylesheet', href: 'https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.min.css'
}
body(style: "padding: 0; margin: 0; display: flex; flex-direction: row; height: 100vh; width: 100vw;") {
aside(style: 'padding: 30px; min-width: 15%; border-right: 1px solid #6F7887;') {
nav {
ul {
li { a(href: '/') { 'Home' } }
}
}
}
div(class: 'container', style: 'padding: 20px') {
yield
}
}
}
end
end
end