... |
... |
@@ -14,79 +14,144 @@ |
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 |
17 |
|
|
19 |
+## 🧪 1. **Macro Showcase: Source-to-Output Toggle**## |
18 |
18 |
|
19 |
|
-== 🔍 **Useful Tips & Best Practices** == |
|
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 |
20 |
20 |
|
21 |
|
-* **Save drafts frequently:** Press Ctrl+S regularly. |
22 |
|
-* **Macros** greatly simplify content formatting—use / often. |
23 |
|
-* **Edit attachments:** Hover attachments directly below your page in view mode to manage or delete them. |
24 |
|
-* **Use minimal formatting** to ensure readability. |
25 |
25 |
|
26 |
|
----- |
|
24 |
+== Gallery Macro `/gallery` == |
27 |
27 |
|
28 |
|
-= ⚡**Guests can contribute** = |
|
26 |
+{{example}} |
|
27 |
+{{gallery}} |
|
28 |
+[[1747262485678-297.png]] |
|
29 |
+[[image:photo2.jpg]] |
|
30 |
+{{/gallery}} |
|
31 |
+{{/example}} |
29 |
29 |
|
30 |
|
-1. Guests can edit pages in the main content area without signing up. If this becomes problematic I'll change it but for now I'd like everyone to have access with as little trouble as possible. |
31 |
|
-1. Use Your Sandbox on the left, mess around with macros and other editing options. There's a lot of options to customize content. |
32 |
|
-1. Leave comments, give suggestions, request features. |
|
33 |
+Alternatively |
|
34 |
+\\ |
33 |
33 |
|
34 |
|
-== **Content Guidelines** == |
|
36 |
+{{example}} |
|
37 |
+{{carousel/}} |
35 |
35 |
|
36 |
|
-* Ensure your content is well-researched, you don't need to include references in the format of footnotes for your material, but you should try to include studies or links to give credibility to your claims. For instance, just claiming that [[IQ is genetic>>doc:Main Categories.Science & Research.Race & IQ.WebHome]] is genetic wouldn't be valid unless you provide a study backing up that assertion, or more likely link to a page within this site that explains why IQ is not something that is purely determined by environmental factors. If such a page doesn't exist, create it, and start providing studies that show this. |
37 |
|
-* Use clear, concise language and avoid using slurs, slang, or troll like language. This isn't supposed to be encyclopedia dramatica, I'd like things to remain relatively mature and well thought out. |
|
39 |
+ |
|
40 |
+{{/example}} |
38 |
38 |
|
39 |
|
-== **Directories and Page URLs** == |
|
42 |
+== Boilerplate Box == |
40 |
40 |
|
41 |
|
-* The categories I have made up should cover most content, but if you feel your content doesn't fit under them, feel free to make a new category. Moving pages and reorganizing content in this wiki is very easy. |
|
44 |
+{{example}} |
|
45 |
+{{box cssClass="highlight"}} |
|
46 |
+Insert your highlighted content here. |
|
47 |
+{{/box}} |
|
48 |
+{{/example}} |
42 |
42 |
|
|
50 |
+== Velocity Greeting == |
43 |
43 |
|
|
52 |
+{{example}} |
|
53 |
+{{velocity}} |
|
54 |
+#set($name = "Visitor") |
|
55 |
+Hello, $name! |
|
56 |
+{{/velocity}} |
|
57 |
+{{/example}} |
44 |
44 |
|
45 |
|
-== **XWiki Editing Modes** == |
46 |
46 |
|
47 |
|
-XWiki offers multiple editing modes to accommodate various user preferences and technical requirements: |
|
60 |
+== Info vs Warning == |
48 |
48 |
|
49 |
|
-* **WYSIWYG (What You See Is What You Get) Editor**: Ideal for users unfamiliar with wiki syntax, this editor provides a user-friendly interface resembling traditional word processors. It allows for straightforward text formatting, image insertion, and link creation without delving into markup language. citeturn0search0 |
50 |
|
-* **Wiki Editor**: This mode enables direct editing using XWiki’s markup syntax. It’s suitable for users comfortable with wiki syntax and those requiring precise control over the content structure. |
|
62 |
+{{example}} |
|
63 |
+{{info}} |
|
64 |
+This is an info box. |
|
65 |
+{{/info}} |
51 |
51 |
|
52 |
|
-== **Essential Formatting Options** == |
|
67 |
+{{warning}} |
|
68 |
+This is a warning box. |
|
69 |
+{{/warning}} |
|
70 |
+{{/example}} |
53 |
53 |
|
54 |
|
-To ensure content is both engaging and accessible, utilize the following formatting techniques: |
|
72 |
+== Footnote Demo == |
55 |
55 |
|
56 |
|
-* **Headings**: Organize content hierarchically using headings. In XWiki syntax, headings are defined by one to six plus signs (+), corresponding to heading levels 1 to 6. |
|
74 |
+{{example}} |
|
75 |
+footnote{{footnote}} https://www.thewhitearchive.org/bin/view/Guides%20and%20Help/Start%20here%20if%20you're%20new/#edit{{/footnote}} |
57 |
57 |
|
58 |
|
-{{code}} |
59 |
|
- + Heading Level 1 |
60 |
|
- ++ Heading Level 2 |
61 |
|
- +++ Heading Level 3 |
62 |
|
-{{/code}} |
|
77 |
+{{putFootnotes/}} |
|
78 |
+{{/example}} |
63 |
63 |
|
64 |
64 |
|
65 |
|
-== **Links** == |
|
81 |
+== Groovy Lookup == |
66 |
66 |
|
|
83 |
+{{example}} |
|
84 |
+{{groovy}} |
|
85 |
+def now = new Date() |
|
86 |
+println("Current time: " + now) |
|
87 |
+{{/groovy}} |
|
88 |
+{{/example}} |
67 |
67 |
|
68 |
68 |
|
69 |
|
-==== **Internal Link**: Use square brackets with the page name. ==== |
|
91 |
+== Expandable Summary == |
70 |
70 |
|
71 |
|
-{{code}} |
72 |
|
-[[PageName]] |
73 |
|
-{{/code}} |
|
93 |
+{{example}} |
|
94 |
+{{expandable summary="🧠 Study Summary"}} |
|
95 |
+Key findings go here. |
|
96 |
+{{/expandable}} |
|
97 |
+{{/example}} |
74 |
74 |
|
|
99 |
+== List Formatting == |
75 |
75 |
|
|
101 |
+{{example}} |
|
102 |
+*Bad formatting* |
76 |
76 |
|
77 |
|
-==== **External Link**: Provide the URL directly. ==== |
|
104 |
+* use - inconsistently |
|
105 |
+** Good formatting: |
|
106 |
+* Consistent bullet style |
|
107 |
+* Indented items properly |
|
108 |
+{{/example}} |
78 |
78 |
|
79 |
|
-{{code}} |
80 |
|
-[https://www.example.com] |
|
110 |
+== Python Code == |
|
111 |
+ |
|
112 |
+{{example}} |
|
113 |
+{{code language="python"}} |
|
114 |
+def greet(): |
|
115 |
+ print("Hello World") |
81 |
81 |
{{/code}} |
|
117 |
+{{/example}} |
82 |
82 |
|
83 |
|
-((( |
84 |
|
-=== === |
85 |
|
-))) |
|
119 |
+== Audio Embedding == |
86 |
86 |
|
|
121 |
+{{example}} |
|
122 |
+{{html}} |
|
123 |
+<audio controls> |
|
124 |
+ <source src="/bin/download/Sandbox/TestPage2/Anti-Black%20racial%20slur%20was%20found%20written%20on%20high%20school%20desk%20in%20Rockville.mp3" type="audio/mpeg"> |
|
125 |
+ Your browser does not support the audio element. |
|
126 |
+</audio> |
|
127 |
+{{/html}} |
|
128 |
+{{/example}} |
87 |
87 |
|
88 |
|
-== == |
|
130 |
+This page covers all the essential steps and tips you need to create great content in XWiki without any confusion. |
89 |
89 |
|
|
132 |
+== == |
|
133 |
+ |
|
134 |
+== 📎 **Attachments and Images** == |
|
135 |
+ |
|
136 |
+You can easily upload files and images directly from the WYSIWYG editor: |
|
137 |
+ |
|
138 |
+**Uploading Attachments:** |
|
139 |
+ |
|
140 |
+* Click **Edit** to enter the WYSIWYG editor. |
|
141 |
+* Click on the **Attachment** icon (📎 paperclip icon). |
|
142 |
+* Drag-and-drop or select your file to upload it instantly. |
|
143 |
+* Uploaded files will automatically be listed as attachments at the bottom of your page. |
|
144 |
+ |
|
145 |
+=== **Inserting Images with Enlargable Thumbnails** === |
|
146 |
+ |
|
147 |
+1. In the editor, click the **"Insert Image"** icon from the toolbar. |
|
148 |
+1. Upload or select the image. |
|
149 |
+1. Choose the **Thumbnail option** to create a clickable enlargable preview automatically. |
|
150 |
+ |
|
151 |
+[[image:1747262485678-297.png||data-xwiki-image-style="thumbnail-clickable" width="200"]] |
|
152 |
+ |
|
153 |
+---- |
|
154 |
+ |
90 |
90 |
== ⚡ **Using the / Macro Shortcut** == |
91 |
91 |
|
92 |
92 |
The / macro shortcut is a powerful and quick way to insert macros while editing pages in XWiki's WYSIWYG editor: |
... |
... |
@@ -100,131 +100,150 @@ |
100 |
100 |
** /footnote – Add footnotes to your text |
101 |
101 |
** /code – Code blocks for programming snippets |
102 |
102 |
|
103 |
|
-This shortcut dramatically speeds up editing, no need to memorize complicated wiki syntax |
|
168 |
+This shortcut dramatically speeds up editing, no need to memorize complicated wiki syntax. |
104 |
104 |
|
105 |
105 |
---- |
106 |
106 |
|
107 |
|
-## 🧪 1. **Macro Showcase: Source-to-Output Toggle**## |
|
172 |
+== ✏️** Basic Formatting and Links (Quick Guide)** == |
108 |
108 |
|
109 |
|
-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 |
|
174 |
+* **Bold text**: Select text, click the **Bold** button or press Ctrl + B. |
|
175 |
+* **Italic text**: Select text, click "Italic" in the toolbar or use Ctrl+I. |
|
176 |
+* **Creating Links**: |
|
177 |
+** Highlight text and click **"Link"** or use shortcut Ctrl+K. |
|
178 |
+** Paste or select the page URL to link internally. |
110 |
110 |
|
|
180 |
+---- |
111 |
111 |
|
112 |
|
-=== **TOC (Table of Contents) Macro**: Generates a table of contents based on page headings. === |
|
182 |
+== 🔍 **Useful Tips & Best Practices** == |
113 |
113 |
|
|
184 |
+* **Save drafts frequently:** Press Ctrl+S regularly. |
|
185 |
+* **Macros** greatly simplify content formatting—use / often. |
|
186 |
+* **Edit attachments:** Hover attachments directly below your page in view mode to manage or delete them. |
|
187 |
+* **Use minimal formatting** to ensure readability. |
114 |
114 |
|
115 |
|
-{{code}} |
116 |
|
-{{toc/}} |
117 |
|
-{{/code}} |
|
189 |
+---- |
118 |
118 |
|
|
191 |
+= ⚡**Guests can contribute** = |
119 |
119 |
|
120 |
|
-== **Gallery Macro** `/gallery` == |
|
193 |
+1. Guests can edit pages in the main content area without signing up. If this becomes problematic I'll change it but for now I'd like everyone to have access with as little trouble as possible. |
|
194 |
+1. Use Your Sandbox on the left, mess around with macros and other editing options. There's a lot of options to customize content. |
|
195 |
+1. Leave comments, give suggestions, request features. |
121 |
121 |
|
122 |
|
-{{example}} |
123 |
|
-{{gallery}} |
124 |
|
-[[1747262485678-297.png]] |
125 |
|
-[[image:photo2.jpg]] |
126 |
|
-{{/gallery}} |
127 |
|
-{{/example}} |
|
197 |
+== **Content Guidelines** == |
128 |
128 |
|
|
199 |
+* Ensure your content is well-researched, you don't need to include references in the format of footnotes for your material, but you should try to include studies or links to give credibility to your claims. For instance, just claiming that [[IQ is genetic>>doc:Main Categories.Science & Research.Race & IQ.WebHome]] is genetic wouldn't be valid unless you provide a study backing up that assertion, or more likely link to a page within this site that explains why IQ is not something that is purely determined by environmental factors. If such a page doesn't exist, create it, and start providing studies that show this. |
|
200 |
+* Use clear, concise language and avoid using slurs, slang, or troll like language. This isn't supposed to be encyclopedia dramatica, I'd like things to remain relatively mature and well thought out. |
129 |
129 |
|
130 |
|
-== **Alternatively** `/carousel` == |
|
202 |
+== **Directories and Page URLs** == |
131 |
131 |
|
132 |
|
-{{example}} |
133 |
|
-{{carousel/}} |
|
204 |
+* The categories I have made up should cover most content, but if you feel your content doesn't fit under them, feel free to make a new category. Moving pages and reorganizing content in this wiki is very easy. |
134 |
134 |
|
135 |
|
- |
136 |
|
-{{/example}} |
137 |
137 |
|
138 |
|
-== **Boilerplate Box** == |
139 |
139 |
|
140 |
|
-{{example}} |
141 |
|
-{{box cssClass="highlight"}} |
142 |
|
-Insert your highlighted content here. |
143 |
|
-{{/box}} |
144 |
|
-{{/example}} |
|
208 |
+== **XWiki Editing Modes** == |
145 |
145 |
|
146 |
|
-== == |
|
210 |
+XWiki offers multiple editing modes to accommodate various user preferences and technical requirements: |
147 |
147 |
|
148 |
|
-== **Info vs Warning **`/info box` == |
|
212 |
+* **WYSIWYG (What You See Is What You Get) Editor**: Ideal for users unfamiliar with wiki syntax, this editor provides a user-friendly interface resembling traditional word processors. It allows for straightforward text formatting, image insertion, and link creation without delving into markup language. citeturn0search0 |
|
213 |
+* **Wiki Editor**: This mode enables direct editing using XWiki’s markup syntax. It’s suitable for users comfortable with wiki syntax and those requiring precise control over the content structure. |
|
214 |
+* **Inline Form Editing**: Used primarily for pages containing structured data or custom applications, this mode presents editable fields directly within the page view, streamlining data entry and updates. |
149 |
149 |
|
150 |
|
-{{example}} |
151 |
|
-{{info}} |
152 |
|
-This is an info box. |
153 |
|
-{{/info}} |
|
216 |
+== **Essential Formatting Options** == |
154 |
154 |
|
155 |
|
-{{warning}} |
156 |
|
-This is a warning box. |
157 |
|
-{{/warning}} |
158 |
|
-{{/example}} |
|
218 |
+To ensure content is both engaging and accessible, utilize the following formatting techniques: |
159 |
159 |
|
160 |
|
-== **Footnote Demo** `/footnote and /put footnotes` put the put footnotes macro at the bottom where you want the references == |
|
220 |
+* **Headings**: Organize content hierarchically using headings. In XWiki syntax, headings are defined by one to six plus signs (+), corresponding to heading levels 1 to 6. |
161 |
161 |
|
162 |
|
-{{example}} |
163 |
|
-footnote{{footnote}} https://www.thewhitearchive.org/bin/view/Guides%20and%20Help/Start%20here%20if%20you're%20new/#edit{{/footnote}} |
|
222 |
+{{code}} |
|
223 |
+ + Heading Level 1 |
|
224 |
+ ++ Heading Level 2 |
|
225 |
+ +++ Heading Level 3 |
|
226 |
+{{/code}} |
164 |
164 |
|
165 |
|
-{{putFootnotes/}} |
166 |
|
-{{/example}} |
167 |
167 |
|
|
229 |
+=== **Text Formatting** === |
168 |
168 |
|
169 |
|
-== == |
170 |
170 |
|
171 |
|
-== **Expandable Summary** `/expandable` VERY USEFUL MACRO == |
172 |
172 |
|
173 |
|
-{{example}} |
174 |
|
-{{expandable summary="🧠 Study Summary"}} |
175 |
|
-Key findings go here. |
176 |
|
-{{/expandable}} |
177 |
|
-{{/example}} |
|
233 |
+* |
|
234 |
+** ((( |
|
235 |
+=== **Bold**: Surround text with double asterisks. === |
|
236 |
+))) |
178 |
178 |
|
179 |
|
-== == |
|
238 |
+{{code}} |
|
239 |
+**bold text** |
|
240 |
+{{/code}} |
180 |
180 |
|
181 |
|
-== 📎 **Attachments and Images** == |
182 |
182 |
|
183 |
|
-You can easily upload files and images directly from the WYSIWYG editor: |
|
243 |
+* |
|
244 |
+** ((( |
|
245 |
+=== **Italics**: Use double underscores. === |
|
246 |
+))) |
184 |
184 |
|
185 |
|
-**Uploading Attachments:** |
|
248 |
+{{code}} |
|
249 |
+__italic text__ |
|
250 |
+{{/code}} |
186 |
186 |
|
187 |
|
-* Click **Edit** to enter the WYSIWYG editor. |
188 |
|
-* Click on the **Attachment** icon (📎 paperclip icon). |
189 |
|
-* Drag-and-drop or select your file to upload it instantly. |
190 |
|
-* Uploaded files will automatically be listed as attachments at the bottom of your page. |
191 |
191 |
|
192 |
|
-== **Audio Embedding** for attached media its better to use the code sometimes but you can embed media with `/embed content` for external media and `/embed JWPlayer` == |
|
253 |
+* |
|
254 |
+** ((( |
|
255 |
+=== **Underline**: Enclose text with double tildes. === |
|
256 |
+))) |
193 |
193 |
|
194 |
|
-{{example}} |
195 |
|
-{{html}} |
196 |
|
-<audio controls> |
197 |
|
- <source src="/bin/download/Sandbox/TestPage2/Anti-Black%20racial%20slur%20was%20found%20written%20on%20high%20school%20desk%20in%20Rockville.mp3" type="audio/mpeg"> |
198 |
|
- Your browser does not support the audio element. |
199 |
|
-</audio> |
200 |
|
-{{/html}} |
201 |
|
-{{/example}} |
|
258 |
+{{code}} |
|
259 |
+~~underlined text~~ |
|
260 |
+{{/code}} |
202 |
202 |
|
203 |
|
-This page covers all the essential steps and tips you need to create great content in XWiki without any confusion. |
204 |
204 |
|
205 |
|
-=== **Inserting Images with Enlargable Thumbnails** === |
|
263 |
+* |
|
264 |
+** ((( |
|
265 |
+=== **Unordered List**: Begin lines with asterisk (*) or hyphen (-). === |
|
266 |
+))) |
206 |
206 |
|
207 |
|
-1. In the editor, click the **"Insert Image"** icon from the toolbar. |
208 |
|
-1. Upload or select the image. |
209 |
|
-1. Choose the **Thumbnail option** to create a clickable enlargable preview automatically. |
|
268 |
+{{code}} |
|
269 |
+* Item 1 |
|
270 |
+* Item 2 |
|
271 |
+{{/code}} |
210 |
210 |
|
211 |
|
-[[image:1747262485678-297.png||data-xwiki-image-style="thumbnail-clickable" width="200"]] |
212 |
212 |
|
|
274 |
+* |
|
275 |
+** ((( |
|
276 |
+=== **Ordered List**: Start lines with a number followed by a period. === |
|
277 |
+))) |
213 |
213 |
|
|
279 |
+{{code}} |
|
280 |
+1. First item |
|
281 |
+2. Second item |
|
282 |
+{{/code}} |
214 |
214 |
|
215 |
215 |
|
216 |
|
-=== **Alternatively: `~[~[image~:image.png]]`** === |
|
285 |
+== **Links** == |
217 |
217 |
|
218 |
|
-{{example}} |
219 |
|
-[[image:1747262485678-297.png]] |
220 |
|
-{{/example}} |
221 |
221 |
|
222 |
222 |
|
|
289 |
+==== **Internal Link**: Use square brackets with the page name. ==== |
223 |
223 |
|
224 |
|
-== == |
|
291 |
+{{code}} |
|
292 |
+[[PageName]] |
|
293 |
+{{/code}} |
225 |
225 |
|
226 |
|
----- |
227 |
227 |
|
|
296 |
+ |
|
297 |
+==== **External Link**: Provide the URL directly. ==== |
|
298 |
+ |
|
299 |
+{{code}} |
|
300 |
+[https://www.example.com] |
|
301 |
+{{/code}} |
|
302 |
+ |
|
303 |
+((( |
|
304 |
+=== **Images** === |
|
305 |
+))) |
|
306 |
+ |
|
307 |
+{{code}} |
|
308 |
+ [[image:example.jpg]] |
|
309 |
+{{/code}} |
|
310 |
+ |
|
311 |
+ |
228 |
228 |
== **Utilizing XWiki Macros** == |
229 |
229 |
|
230 |
230 |
Macros are powerful tools in XWiki that allow for dynamic content inclusion and advanced formatting. Here are ten notable macros to consider: |
... |
... |
@@ -247,8 +247,18 @@ |
247 |
247 |
{{/code}} |
248 |
248 |
|
249 |
249 |
|
250 |
|
-== **Code Macro**: Renders code snippets with syntax highlighting. == |
|
334 |
+== Footnote Macro == |
251 |
251 |
|
|
336 |
+The Footnote macro adds footnotes to the page. |
|
337 |
+ |
|
338 |
+{{example}} |
|
339 |
+This is a statement{{footnote}}Source: Example Reference{{/footnote}}. |
|
340 |
+{{putFootnotes/}} |
|
341 |
+{{/example}} |
|
342 |
+ |
|
343 |
+ |
|
344 |
+=== **Code Macro**: Renders code snippets with syntax highlighting. === |
|
345 |
+ |
252 |
252 |
{{code}} |
253 |
253 |
{{code language="python"}} |
254 |
254 |
def hello_world(): |
... |
... |
@@ -257,8 +257,26 @@ |
257 |
257 |
{{/code}} |
258 |
258 |
|
259 |
259 |
|
260 |
|
-== **Video Macro**: `/video` The Video macro embeds videos. == |
|
354 |
+=== **Gallery Macro**: Creates an image gallery from attached images. === |
261 |
261 |
|
|
356 |
+{{code}} |
|
357 |
+{{gallery}} |
|
358 |
+[[image1.jpg]] |
|
359 |
+[[image2.jpg]] |
|
360 |
+{{/gallery}} |
|
361 |
+{{/code}} |
|
362 |
+ |
|
363 |
+ |
|
364 |
+=== **TOC (Table of Contents) Macro**: Generates a table of contents based on page headings. === |
|
365 |
+ |
|
366 |
+{{code}} |
|
367 |
+{{toc/}} |
|
368 |
+{{/code}} |
|
369 |
+ |
|
370 |
+== Video Macro == |
|
371 |
+ |
|
372 |
+The Video macro embeds videos. |
|
373 |
+ |
262 |
262 |
{{example}} |
263 |
263 |
{{video url="https://www.youtube.com/watch?v=dQw4w9WgXcQ"/}} |
264 |
264 |
{{/example}} |