Skip to content

Commit

Permalink
new version
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarotero committed Jun 1, 2024
1 parent f25da66 commit 256b8ba
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 10 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/) and this
project adheres to [Semantic Versioning](http://semver.org/).

## [0.15.3] - 2024-06-01
### Added
- Allow to customize the post URL in the CMS.

### Fixed
- Comments layout on mobile.
- Colors of titles

## [0.15.2] - 2024-03-29
### Changed
- Updated `@lumeland/ds` and import it from unpkg CDN.
Expand Down Expand Up @@ -207,6 +215,7 @@ First version
[#17]: https://github.com/lumeland/theme-simple-blog/issues/17
[#19]: https://github.com/lumeland/theme-simple-blog/issues/19

[0.15.3]: https://github.com/lumeland/theme-simple-blog/compare/v0.15.2...v0.15.3
[0.15.2]: https://github.com/lumeland/theme-simple-blog/compare/v0.15.1...v0.15.2
[0.15.1]: https://github.com/lumeland/theme-simple-blog/compare/v0.15.0...v0.15.1
[0.15.0]: https://github.com/lumeland/theme-simple-blog/compare/v0.14.0...v0.15.0
Expand Down
28 changes: 23 additions & 5 deletions _cms.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,28 @@
import lumeCMS from "lume/cms/mod.ts";
import { Field } from "lume/cms/types.ts";

const cms = lumeCMS();

const url: Field = {
name: "url",
type: "text",
description: "The public URL of the page. Leave empty to use the file path.",
transform(value) {
if (!value) {
return;
}

if (!value.endsWith("/")) {
value += "/";
}
if (!value.startsWith("/")) {
value = "/" + value;
}

return value;
},
};

cms.document(
"settings: Global settings for the site",
"src:_data.yml",
Expand Down Expand Up @@ -66,6 +87,7 @@ cms.collection(
"src:posts/*.md",
[
"title: text",
url,
"date: date",
{
name: "draft",
Expand Down Expand Up @@ -120,11 +142,7 @@ cms.collection(
type: "text",
label: "Title",
},
{
name: "url",
type: "text",
description: "The public URL of the page (must start with /)",
},
url,
{
name: "menu",
type: "object",
Expand Down
4 changes: 2 additions & 2 deletions deno.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"imports": {
"lume/": "https://deno.land/x/lume@v2.1.2/",
"lume/cms/": "https://cdn.jsdelivr.net/gh/lumeland/cms@0.3.9/"
"lume/": "https://deno.land/x/lume@v2.2.0/",
"lume/cms/": "https://cdn.jsdelivr.net/gh/lumeland/cms@0.4.3/"
},
"tasks": {
"lume": "echo \"import 'lume/cli.ts'\" | deno run -A -",
Expand Down
1 change: 1 addition & 0 deletions src/posts/firstpost.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ tags:
- TypeScript
comments:
src: 'https://mastodon.gal/@misteroom/110810445656343599'
draft: false
---

Leverage agile frameworks to provide a robust synopsis for high level overviews.
Expand Down
6 changes: 3 additions & 3 deletions src/posts/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ export default site;
## Customization

> [!tip]
>
> You can use [lumeCMS](https://lume.land/cms) to customize the blog and
> add content easily
>
> You can use [lumeCMS](https://lume.land/cms) to customize the blog and add
> content easily

0 comments on commit 256b8ba

Please sign in to comment.