... |
... |
@@ -14,26 +14,25 @@ |
14 |
14 |
|
15 |
15 |
The example macro in XWiki is an underrated powerhouse—great for *teaching*, *showcasing macros*, *hiding complex markup*, and *letting users play with source-output pairs*. Here are some **highly effective and interesting uses**: |
16 |
16 |
|
17 |
|
---- |
|
17 |
+---- |
18 |
18 |
|
19 |
|
-## 🧪 1. **Macro Showcase: Source-to-Output Toggle** |
|
19 |
+## 🧪 1. **Macro Showcase: Source-to-Output Toggle**## |
20 |
20 |
|
21 |
|
-Show how a macro works without cluttering the page with raw syntax. |
|
21 |
+In this section we will go over many of the common macros used. The source code is how you use the macro editing in Wiki mode. If you are doing standard WYSIWYG edit mode (the default mode you get when you click edit instead of the dropdown), you can call most of these macros by simply typing /thecommand |
22 |
22 |
|
23 |
23 |
|
24 |
|
-== Gallery Macro == |
|
24 |
+== Gallery Macro `/gallery` == |
25 |
25 |
|
26 |
26 |
{{example}} |
27 |
|
- |
28 |
28 |
{{gallery}} |
29 |
29 |
[[image:photo1.jpg]] |
30 |
30 |
[[image:photo2.jpg]] |
31 |
31 |
{{/gallery}} |
32 |
|
- |
33 |
33 |
{{/example}} |
34 |
34 |
|
35 |
35 |
|
36 |
36 |
== Boilerplate Box == |
|
35 |
+ |
37 |
37 |
{{example}} |
38 |
38 |
{{box cssClass="highlight"}} |
39 |
39 |
Insert your highlighted content here. |
... |
... |
@@ -41,6 +41,7 @@ |
41 |
41 |
{{/example}} |
42 |
42 |
|
43 |
43 |
== Velocity Greeting == |
|
43 |
+ |
44 |
44 |
{{example}} |
45 |
45 |
{{velocity}} |
46 |
46 |
#set($name = "Visitor") |
... |
... |
@@ -50,17 +50,28 @@ |
50 |
50 |
|
51 |
51 |
|
52 |
52 |
== Info vs Warning == |
|
53 |
+ |
53 |
53 |
{{example}} |
54 |
|
-{{info}}This is an info box.{{/info}} |
|
55 |
+{{info}} |
|
56 |
+This is an info box. |
|
57 |
+{{/info}} |
55 |
55 |
|
56 |
|
-{{warning}}This is a warning box.{{/warning}} |
|
59 |
+{{warning}} |
|
60 |
+This is a warning box. |
|
61 |
+{{/warning}} |
57 |
57 |
{{/example}} |
58 |
58 |
|
59 |
59 |
== Footnote Demo == |
60 |
60 |
|
61 |
|
-footnote |
|
66 |
+{{example}} |
|
67 |
+footnote{{footnote}} https://www.thewhitearchive.org/bin/view/Guides%20and%20Help/Start%20here%20if%20you're%20new/#edit{{/footnote}} |
62 |
62 |
|
|
69 |
+{{putFootnotes/}} |
|
70 |
+{{/example}} |
|
71 |
+ |
|
72 |
+ |
63 |
63 |
== Groovy Lookup == |
|
74 |
+ |
64 |
64 |
{{example}} |
65 |
65 |
{{groovy}} |
66 |
66 |
def now = new Date() |
... |
... |
@@ -70,6 +70,7 @@ |
70 |
70 |
|
71 |
71 |
|
72 |
72 |
== Expandable Summary == |
|
84 |
+ |
73 |
73 |
{{example}} |
74 |
74 |
{{expandable summary="🧠 Study Summary"}} |
75 |
75 |
Key findings go here. |
... |
... |
@@ -77,15 +77,18 @@ |
77 |
77 |
{{/example}} |
78 |
78 |
|
79 |
79 |
== List Formatting == |
|
92 |
+ |
80 |
80 |
{{example}} |
81 |
81 |
*Bad formatting* |
|
95 |
+ |
82 |
82 |
* use - inconsistently |
83 |
83 |
** Good formatting: |
84 |
|
- * Consistent bullet style |
85 |
|
- * Indented items properly |
|
98 |
+* Consistent bullet style |
|
99 |
+* Indented items properly |
86 |
86 |
{{/example}} |
87 |
87 |
|
88 |
88 |
== Python Code == |
|
103 |
+ |
89 |
89 |
{{example}} |
90 |
90 |
{{code language="python"}} |
91 |
91 |
def greet(): |
... |
... |
@@ -94,8 +94,8 @@ |
94 |
94 |
{{/example}} |
95 |
95 |
|
96 |
96 |
== Audio Embedding == |
97 |
|
-{{example}} |
98 |
98 |
|
|
113 |
+{{example}} |
99 |
99 |
{{html}} |
100 |
100 |
<audio controls> |
101 |
101 |
<source src="/bin/download/Sandbox/TestPage2/Anti-Black%20racial%20slur%20was%20found%20written%20on%20high%20school%20desk%20in%20Rockville.mp3" type="audio/mpeg"> |
... |
... |
@@ -106,7 +106,7 @@ |
106 |
106 |
|
107 |
107 |
This page covers all the essential steps and tips you need to create great content in XWiki without any confusion. |
108 |
108 |
|
109 |
|
-== == |
|
124 |
+== == |
110 |
110 |
|
111 |
111 |
== 📎 **Attachments and Images** == |
112 |
112 |
|
... |
... |
@@ -125,6 +125,8 @@ |
125 |
125 |
1. Upload or select the image. |
126 |
126 |
1. Choose the **Thumbnail option** to create a clickable enlargable preview automatically. |
127 |
127 |
|
|
143 |
+[[image:1747262485678-297.png||data-xwiki-image-style="thumbnail-clickable" width="200"]] |
|
144 |
+ |
128 |
128 |
---- |
129 |
129 |
|
130 |
130 |
== ⚡ **Using the / Macro Shortcut** == |
... |
... |
@@ -354,12 +354,12 @@ |
354 |
354 |
== Example Macro == |
355 |
355 |
|
356 |
356 |
The example macro displays the output of a macro or script or anything that you like |
|
374 |
+ |
357 |
357 |
== Expandable Macro == |
358 |
358 |
|
359 |
359 |
The following example demonstrates how to present complex information cleanly using ` |
360 |
360 |
|
361 |
361 |
{{example}} |
362 |
|
- |
363 |
363 |
{{expandable summary="Study: The Wilson Effect: The Increase in Heritability of IQ With Age"}} |
364 |
364 |
**Source:** *Twin Research and Human Genetics (Cambridge University Press)* |
365 |
365 |
**Date of Publication:** *2013* |
... |
... |
@@ -429,4 +429,4 @@ |
429 |
429 |
{{/example}} |
430 |
430 |
|
431 |
431 |
|
432 |
|
- |
|
449 |
+ |