Skip to content

Commit 8b16c2d

Browse files
author
Daniel Langr
committed
Change of pages structure
1 parent 91723e4 commit 8b16c2d

File tree

4 files changed

+29
-14
lines changed

4 files changed

+29
-14
lines changed

.github/workflows/publish.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ jobs:
3636
# Build index.adoc
3737
asciidoctor index.adoc
3838
39-
# Build all .adoc files in posts directory (if any)
40-
if [ -d posts ] && compgen -G "posts/*.adoc" > /dev/null; then
41-
asciidoctor posts/*.adoc
39+
# Build all .adoc files in articles directory recursively (if any)
40+
if [ -d articles ]; then
41+
find articles -name '*.adoc' -exec asciidoctor {} \;
4242
fi
4343
4444
- name: Remove files not needed for publishing
4545
run: |
46-
rm -f *.psd **/*.psd
4746
rm -f *.adoc **/*.adoc
47+
rm -f favicon/favicon.psd
4848
rm -rf include
4949
rm -f _config.yml
5050
rm -f CNAME

Makefile

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,24 @@ ASCIIDOCTOR = asciidoctor
44

55
# Source files
66
ROOT_SOURCES = index.adoc
7-
POST_SOURCES = $(wildcard posts/*.adoc)
7+
ARTICLE_SOURCES = $(shell find articles -name '*.adoc')
88

99
# Include files (dependencies)
1010
INCLUDES = include/attributes.adoc include/copyright.adoc
1111

1212
# Output files
1313
ROOT_HTML = $(ROOT_SOURCES:.adoc=.html)
14-
POST_HTML = $(POST_SOURCES:.adoc=.html)
14+
ARTICLE_HTML = $(ARTICLE_SOURCES:.adoc=.html)
1515

16-
ALL_HTML = $(ROOT_HTML) $(POST_HTML)
16+
ALL_HTML = $(ROOT_HTML) $(ARTICLE_HTML)
1717

1818
.PHONY: all clean
1919

2020
all: $(ALL_HTML)
2121

22-
# Rule for root directory
22+
# Generic rule for all .adoc files (works for any directory depth)
2323
%.html: %.adoc $(INCLUDES)
2424
$(ASCIIDOCTOR) $<
2525

26-
# Rule for posts directory
27-
posts/%.html: posts/%.adoc $(INCLUDES)
28-
$(ASCIIDOCTOR) $<
29-
3026
clean:
3127
rm -f $(ALL_HTML)

articles/move/index.adoc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
= Move Semantics Explained
2+
Daniel Langr
3+
//Daniel Langr <daniel.langr@outlook.com>
4+
//:revdate: {docdate}
5+
:revdate: January 2025
6+
//:revremark: last modification
7+
:rootdir: ../..
8+
include::{rootdir}/include/attributes.adoc[]
9+
//:description:
10+
11+
This is a mini series of articles devoted to the move semantics in {cpp}.
12+
13+
Parts of the series:
14+
15+
- link:./introductory_example.html[01: Introductory Example]
16+
17+
include::{rootdir}/include/copyright.adoc[]

posts/260114_move_semantics_explained.adoc renamed to articles/move/introductory_example.adoc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
= Move Semantics Explained — Introduction
1+
= 01: Introductory Example
22
Daniel Langr
33
//Daniel Langr <daniel.langr@outlook.com>
44
//:revdate: {docdate}
55
:revdate: January 2025
66
//:revremark: last modification
7-
:rootdir: ..
7+
:rootdir: ../..
88
include::{rootdir}/include/attributes.adoc[]
99
//:description:
1010

11+
This is a part of the mini-series link:./index.html[Move Semantics Explained].
12+
1113
Consider a variable `s` of type `std::string`, whose value is some string of characters. Suppose we now want to create another variable `s2` of type `std::string` that should contain the same value as `s`.
1214

1315
[source]

0 commit comments

Comments
 (0)