A charming Jekyll theme.
jekyll-theme

docs: adds README

+150 -13
+150 -13
README.md
··· 1 - # linus 2 - 3 - Welcome to your new Jekyll theme! In this directory, you'll find the files you need to be able to package up your theme into a gem. Put your layouts in `_layouts`, your includes in `_includes`, your sass files in `_sass` and any other assets in `assets`. 1 + # Linus 4 2 5 - To experiment with this code, add some sample content and run `bundle exec jekyll serve` – this directory is setup just like a Jekyll site! 6 - 7 - TODO: Delete this and the text above, and describe your gem 3 + A minimal Jekyll blog theme. Supports link posts, categories, tags, date archives, pagination, and dark mode out of the box. 8 4 9 5 ## Installation 10 6 ··· 20 16 theme: linus 21 17 ``` 22 18 23 - And then execute: 19 + Then execute: 24 20 25 21 $ bundle 26 22 ··· 30 26 31 27 ## Usage 32 28 33 - TODO: Write usage instructions here. Describe your available layouts, includes, sass and/or assets. 29 + ### Layouts 30 + 31 + | Layout | Purpose | 32 + |---|---| 33 + | `default` | Base layout — full HTML document, loads CSS, renders header and footer | 34 + | `blog` | Blog index listing with pagination; also used for date, tag, and category archives | 35 + | `post` | Single post view | 36 + | `page` | Simple content page | 37 + 38 + ### Writing posts 39 + 40 + Create files in `_posts/` with this front matter: 41 + 42 + ```yaml 43 + --- 44 + layout: post 45 + title: "My Post Title" 46 + date: 2026-01-01 47 + category: Notes 48 + author: arthur 49 + tags: 50 + - some tag 51 + --- 52 + ``` 53 + 54 + **Link posts** — set `title` to an empty string and provide a `source` URL. The post title renders as "↪ [fetched page title]" using `jekyll-url-metadata`: 55 + 56 + ```yaml 57 + --- 58 + layout: post 59 + title: "" 60 + source: "https://example.com/article" 61 + category: Links 62 + --- 63 + ``` 64 + 65 + ### Authors 66 + 67 + Define authors in `_data/authors.yml`: 68 + 69 + ```yaml 70 + arthur: 71 + name: Arthur Freitas 72 + uri: https://arthr.me/ 73 + ``` 74 + 75 + Reference them in post front matter with the `author` key. 76 + 77 + ### Category colors 78 + 79 + Assign a background color to each category pill: 80 + 81 + ```yaml 82 + category_colors: 83 + - name: Links 84 + color: "#f0e68c" 85 + - name: Notes 86 + color: "#fa8072" 87 + ``` 88 + 89 + ### Date formats 90 + 91 + Customize how dates are displayed using strftime strings: 92 + 93 + ```yaml 94 + date_formats: 95 + day: "%b %d, '%y" 96 + month: "%b, '%y" 97 + year: "%Y" 98 + ``` 99 + 100 + ### Navigation menus 101 + 102 + ```yaml 103 + main_menu: 104 + title: Navigate 105 + items: 106 + - url: "/about" 107 + label: About 108 + 109 + footer_menu: 110 + title: Follow 111 + items: 112 + - label: RSS 113 + url: /feed.xml 114 + rel: alternate 115 + - label: External Site 116 + url: https://example.com 117 + rel: me 118 + external: true 119 + ``` 120 + 121 + Set `external: true` on any item to open it in a new tab. 122 + 123 + ### Translations 124 + 125 + Override UI strings for archive headings and pagination: 126 + 127 + ```yaml 128 + translations: 129 + archive_date_title: "Archives from %date" 130 + archive_tag_title: "Posts tagged with %tag" 131 + archive_category_title: "Posts filed under %category" 132 + blog_pagination_title: "Blog pagination" 133 + blog_pagination_prev_page: "Previous page" 134 + blog_pagination_next_page: "Next page" 135 + ``` 136 + 137 + ### Pagination 138 + 139 + ```yaml 140 + paginate: 12 141 + paginate_path: "/pg/:num/" 142 + ``` 34 143 35 - ## Contributing 144 + ## Customization 36 145 37 - Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/linus. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](https://www.contributor-covenant.org/) code of conduct. 146 + ### Custom styles 147 + 148 + Override or extend the theme's CSS by creating `assets/css/theme.css` in your site. This file is loaded last, after all theme styles. Use it to redefine CSS custom properties or add new rules: 149 + 150 + ```css 151 + :root { 152 + --font-body: Georgia, serif; 153 + --color-accent: tomato; 154 + } 155 + ``` 156 + 157 + ### Custom fonts 158 + 159 + Create `assets/css/fonts.css` in your site to load your own web fonts: 160 + 161 + ```css 162 + @font-face { 163 + font-family: 'My Font'; 164 + font-weight: 400; 165 + src: url('/assets/fonts/myfont.woff2') format('woff2'); 166 + } 167 + ``` 168 + 169 + Then reference it in `theme.css`: 170 + 171 + ```css 172 + :root { 173 + --font-body: 'My Font', sans-serif; 174 + } 175 + ``` 38 176 39 177 ## Development 40 178 41 179 To set up your environment to develop this theme, run `bundle install`. 42 180 43 - Your theme is setup just like a normal Jekyll site! To test your theme, run `bundle exec jekyll serve` and open your browser at `http://localhost:4000`. This starts a Jekyll server using your theme. Add pages, documents, data, etc. like normal to test your theme's contents. As you make modifications to your theme and to your content, your site will regenerate and you should see the changes in the browser after a refresh, just like normal. 181 + The repository is also a working Jekyll site for local development. To preview the theme, run `bundle exec jekyll serve` and open your browser at `http://localhost:4000`. As you modify theme files, the site regenerates automatically. 44 182 45 - When your theme is released, only the files in `_layouts`, `_includes`, `_sass` and `assets` tracked with Git will be bundled. 46 - To add a custom directory to your theme-gem, please edit the regexp in `linus.gemspec` accordingly. 183 + Posts in `_posts/` and `index.html` exist only for local testing and are not included in the published gem. 47 184 48 185 ## License 49 186