feat: implement micro and photos partials for Bridgy integration; refactor HTML structure
This commit is contained in:
@@ -3,32 +3,9 @@
|
||||
{{ end }}
|
||||
|
||||
<div style="display: none;" class="p-summary {{ range .Site.Params.bridgy }}e-bridgy-{{.}}-content {{ end }}">
|
||||
{{ if ne .Type "micro"}}{{ .Description }}{{ end }}
|
||||
{{ if eq .Type "micro"}}{{ partial "bridgy/micro.html" . }}{{ end }}
|
||||
{{ if eq .Type "photos"}}{{ partial "bridgy/photos.html" . }}{{ end }}
|
||||
|
||||
{{ if ne .Type "micro"}}
|
||||
{{ .Description }}
|
||||
{{ end }}
|
||||
|
||||
{{ if eq .Type "micro"}}
|
||||
{{ .Content }}
|
||||
{{ end }}
|
||||
|
||||
{{ if eq .Type "photos"}}
|
||||
{{ .Content }}
|
||||
{{ end }}
|
||||
{{ with .Resources.ByType "image" }}
|
||||
{{ range . }}
|
||||
{{ $image := . }}
|
||||
{{ if $image }}
|
||||
<img loading="lazy" class="u-photo" src="{{ $image.Permalink }}" alt="{{ $.Description }}">
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ range .Params.tags }}
|
||||
<div class="p-category">#{{ . }}</div>
|
||||
{{ end }}
|
||||
|
||||
{{ range .Params.categories }}
|
||||
<div class="p-category">#{{ . }}</div>
|
||||
{{ end }}
|
||||
{{ range .Params.tags }} <span class="p-category">#{{ . }}</span>{{ end }} {{ range .Params.categories }} <span class="p-category">#{{ . }}</span>{{ end }}
|
||||
</div>
|
||||
|
||||
1
layouts/partials/bridgy/micro.html
Normal file
1
layouts/partials/bridgy/micro.html
Normal file
@@ -0,0 +1 @@
|
||||
{{ .Content }}
|
||||
9
layouts/partials/bridgy/photos.html
Normal file
9
layouts/partials/bridgy/photos.html
Normal file
@@ -0,0 +1,9 @@
|
||||
{{ .Content }}
|
||||
{{ with .Resources.ByType "image" }}
|
||||
{{ range . }}
|
||||
{{ $image := . }}
|
||||
{{ if $image }}
|
||||
<img loading="lazy" class="u-photo" src="{{ $image.Permalink }}" alt="{{ $.Description }}">
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
6
makefile
6
makefile
@@ -36,13 +36,13 @@ send_webmention: ## Send webmention from feed
|
||||
@uv run python send_webmention.py
|
||||
|
||||
develop: ## Run the site localy
|
||||
@hugo server --minify --disableFastRender --renderToMemory
|
||||
@hugo server --disableFastRender --renderToMemory
|
||||
|
||||
developfuture: ## Run the site localy with all the future article
|
||||
@hugo server --minify --disableFastRender --buildFuture --renderToMemory
|
||||
@hugo server --disableFastRender --buildFuture --renderToMemory
|
||||
|
||||
developall: ## Run the site localy with all the article, future or drafts
|
||||
@hugo server --minify --disableFastRender --buildFuture --buildDrafts --renderToMemory
|
||||
@hugo server --disableFastRender --buildFuture --buildDrafts --renderToMemory
|
||||
|
||||
.PHONY: hydra
|
||||
hydra: ## Check links
|
||||
|
||||
Reference in New Issue
Block a user