... |
... |
@@ -12,107 +12,6 @@ |
12 |
12 |
|
13 |
13 |
== Getting Started with XWiki == |
14 |
14 |
|
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 |
|
- |
17 |
|
---- |
18 |
|
- |
19 |
|
-## 🧪 1. **Macro Showcase: Source-to-Output Toggle** |
20 |
|
- |
21 |
|
-Show how a macro works without cluttering the page with raw syntax. |
22 |
|
- |
23 |
|
- |
24 |
|
-== Gallery Macro == |
25 |
|
- |
26 |
|
-{{example}} |
27 |
|
- |
28 |
|
-{{gallery}} |
29 |
|
-[[image:photo1.jpg]] |
30 |
|
-[[image:photo2.jpg]] |
31 |
|
-{{/gallery}} |
32 |
|
- |
33 |
|
-{{/example}} |
34 |
|
- |
35 |
|
- |
36 |
|
-== Boilerplate Box == |
37 |
|
-{{example}} |
38 |
|
-{{box cssClass="highlight"}} |
39 |
|
-Insert your highlighted content here. |
40 |
|
-{{/box}} |
41 |
|
-{{/example}} |
42 |
|
- |
43 |
|
-== Velocity Greeting == |
44 |
|
-{{example}} |
45 |
|
-{{velocity}} |
46 |
|
-#set($name = "Visitor") |
47 |
|
-Hello, $name! |
48 |
|
-{{/velocity}} |
49 |
|
-{{/example}} |
50 |
|
- |
51 |
|
- |
52 |
|
-== Info vs Warning == |
53 |
|
-{{example}} |
54 |
|
-{{info}}This is an info box.{{/info}} |
55 |
|
- |
56 |
|
-{{warning}}This is a warning box.{{/warning}} |
57 |
|
-{{/example}} |
58 |
|
- |
59 |
|
-== Footnote Demo == |
60 |
|
-{{example}} |
61 |
|
-This claim needs a source{{footnote}}Here it is.{{/footnote}}. |
62 |
|
-{{putFootnotes/}} |
63 |
|
-{{/example}} |
64 |
|
- |
65 |
|
-== Groovy Lookup == |
66 |
|
-{{example}} |
67 |
|
-{{groovy}} |
68 |
|
-def now = new Date() |
69 |
|
-println("Current time: " + now) |
70 |
|
-{{/groovy}} |
71 |
|
-{{/example}} |
72 |
|
- |
73 |
|
- |
74 |
|
-== Access Current User == |
75 |
|
-{{example}} |
76 |
|
-{{velocity}} |
77 |
|
-Current user: **$xcontext.user** |
78 |
|
-{{/velocity}} |
79 |
|
-{{/example}} |
80 |
|
- |
81 |
|
- |
82 |
|
-== Expandable Summary == |
83 |
|
-{{example}} |
84 |
|
-{{expandable summary="🧠 Study Summary"}} |
85 |
|
-Key findings go here. |
86 |
|
-{{/expandable}} |
87 |
|
-{{/example}} |
88 |
|
- |
89 |
|
-== List Formatting == |
90 |
|
-{{example}} |
91 |
|
-*Bad formatting* |
92 |
|
-* use - inconsistently |
93 |
|
-** Good formatting: |
94 |
|
- * Consistent bullet style |
95 |
|
- * Indented items properly |
96 |
|
-{{/example}} |
97 |
|
- |
98 |
|
-== Python Code == |
99 |
|
-{{example}} |
100 |
|
-{{code language="python"}} |
101 |
|
-def greet(): |
102 |
|
- print("Hello World") |
103 |
|
-{{/code}} |
104 |
|
-{{/example}} |
105 |
|
- |
106 |
|
-== Audio Embedding == |
107 |
|
-{{example}} |
108 |
|
-{{html}} |
109 |
|
-<audio controls> |
110 |
|
- <source src="/bin/download/Sandbox/TestPage2/Anti-Black%20racial%20slur%20was%20found%20written%20on%20high%20school%20desk%20in%20Rockville.mp3" type="audio/mpeg"> |
111 |
|
- Your browser does not support the audio element. |
112 |
|
-</audio> |
113 |
|
-{{/html}} |
114 |
|
-{{/example}} |
115 |
|
- |
116 |
116 |
This page covers all the essential steps and tips you need to create great content in XWiki without any confusion. |
117 |
117 |
|
118 |
118 |
== == |
... |
... |
@@ -214,7 +214,7 @@ |
214 |
214 |
|
215 |
215 |
|
216 |
216 |
|
217 |
|
-* |
|
116 |
+* |
218 |
218 |
** ((( |
219 |
219 |
=== **Bold**: Surround text with double asterisks. === |
220 |
220 |
))) |
... |
... |
@@ -224,7 +224,7 @@ |
224 |
224 |
{{/code}} |
225 |
225 |
|
226 |
226 |
|
227 |
|
-* |
|
126 |
+* |
228 |
228 |
** ((( |
229 |
229 |
=== **Italics**: Use double underscores. === |
230 |
230 |
))) |
... |
... |
@@ -234,7 +234,7 @@ |
234 |
234 |
{{/code}} |
235 |
235 |
|
236 |
236 |
|
237 |
|
-* |
|
136 |
+* |
238 |
238 |
** ((( |
239 |
239 |
=== **Underline**: Enclose text with double tildes. === |
240 |
240 |
))) |
... |
... |
@@ -244,7 +244,7 @@ |
244 |
244 |
{{/code}} |
245 |
245 |
|
246 |
246 |
|
247 |
|
-* |
|
146 |
+* |
248 |
248 |
** ((( |
249 |
249 |
=== **Unordered List**: Begin lines with asterisk (*) or hyphen (-). === |
250 |
250 |
))) |
... |
... |
@@ -255,7 +255,7 @@ |
255 |
255 |
{{/code}} |
256 |
256 |
|
257 |
257 |
|
258 |
|
-* |
|
157 |
+* |
259 |
259 |
** ((( |
260 |
260 |
=== **Ordered List**: Start lines with a number followed by a period. === |
261 |
261 |
))) |
... |
... |
@@ -359,16 +359,12 @@ |
359 |
359 |
{{video url="https://www.youtube.com/watch?v=dQw4w9WgXcQ"/}} |
360 |
360 |
{{/example}} |
361 |
361 |
|
362 |
|
- |
363 |
|
-== Example Macro == |
364 |
|
- |
365 |
|
-The example macro displays the output of a macro or script or anything that you like |
366 |
366 |
== Expandable Macro == |
|
262 |
+The following example demonstrates how to present complex information cleanly using `{{expandable}}` and `{{example}}`. |
367 |
367 |
|
368 |
|
-The following example demonstrates how to present complex information cleanly using ` |
369 |
|
- |
370 |
370 |
{{example}} |
371 |
|
- |
|
265 |
+ |
|
266 |
+ |
372 |
372 |
{{expandable summary="Study: The Wilson Effect: The Increase in Heritability of IQ With Age"}} |
373 |
373 |
**Source:** *Twin Research and Human Genetics (Cambridge University Press)* |
374 |
374 |
**Date of Publication:** *2013* |
... |
... |
@@ -435,7 +435,8 @@ |
435 |
435 |
[[Download Full Study>>attach:10.1017_thg.2013.54.pdf]] |
436 |
436 |
{{/expandable}} |
437 |
437 |
{{/expandable}} |
438 |
|
-{{/example}} |
439 |
439 |
|
440 |
440 |
|
|
335 |
+== See Also: == |
441 |
441 |
|
|
337 |
+[[Syntax Help official documentation for a full list of formatting options>>doc:XWiki.XWikiSyntax]] |