... |
... |
@@ -14,144 +14,79 @@ |
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 |
|
----- |
18 |
18 |
|
19 |
|
-## 🧪 1. **Macro Showcase: Source-to-Output Toggle**## |
20 |
20 |
|
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 |
|
19 |
+== 🔍 **Useful Tips & Best Practices** == |
22 |
22 |
|
|
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. |
23 |
23 |
|
24 |
|
-== Gallery Macro `/gallery` == |
|
26 |
+---- |
25 |
25 |
|
26 |
|
-{{example}} |
27 |
|
-{{gallery}} |
28 |
|
-[[1747262485678-297.png]] |
29 |
|
-[[image:photo2.jpg]] |
30 |
|
-{{/gallery}} |
31 |
|
-{{/example}} |
|
28 |
+= ⚡**Guests can contribute** = |
32 |
32 |
|
33 |
|
-Alternatively |
34 |
|
-\\ |
|
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. |
35 |
35 |
|
36 |
|
-{{example}} |
37 |
|
-{{carousel/}} |
|
34 |
+== **Content Guidelines** == |
38 |
38 |
|
39 |
|
- |
40 |
|
-{{/example}} |
|
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. |
41 |
41 |
|
42 |
|
-== Boilerplate Box == |
|
39 |
+== **Directories and Page URLs** == |
43 |
43 |
|
44 |
|
-{{example}} |
45 |
|
-{{box cssClass="highlight"}} |
46 |
|
-Insert your highlighted content here. |
47 |
|
-{{/box}} |
48 |
|
-{{/example}} |
|
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. |
49 |
49 |
|
50 |
|
-== Velocity Greeting == |
51 |
51 |
|
52 |
|
-{{example}} |
53 |
|
-{{velocity}} |
54 |
|
-#set($name = "Visitor") |
55 |
|
-Hello, $name! |
56 |
|
-{{/velocity}} |
57 |
|
-{{/example}} |
58 |
58 |
|
|
45 |
+== **XWiki Editing Modes** == |
59 |
59 |
|
60 |
|
-== Info vs Warning == |
|
47 |
+XWiki offers multiple editing modes to accommodate various user preferences and technical requirements: |
61 |
61 |
|
62 |
|
-{{example}} |
63 |
|
-{{info}} |
64 |
|
-This is an info box. |
65 |
|
-{{/info}} |
|
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. |
66 |
66 |
|
67 |
|
-{{warning}} |
68 |
|
-This is a warning box. |
69 |
|
-{{/warning}} |
70 |
|
-{{/example}} |
|
52 |
+== **Essential Formatting Options** == |
71 |
71 |
|
72 |
|
-== Footnote Demo == |
|
54 |
+To ensure content is both engaging and accessible, utilize the following formatting techniques: |
73 |
73 |
|
74 |
|
-{{example}} |
75 |
|
-footnote{{footnote}} https://www.thewhitearchive.org/bin/view/Guides%20and%20Help/Start%20here%20if%20you're%20new/#edit{{/footnote}} |
|
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. |
76 |
76 |
|
77 |
|
-{{putFootnotes/}} |
78 |
|
-{{/example}} |
|
58 |
+{{code}} |
|
59 |
+ + Heading Level 1 |
|
60 |
+ ++ Heading Level 2 |
|
61 |
+ +++ Heading Level 3 |
|
62 |
+{{/code}} |
79 |
79 |
|
80 |
80 |
|
81 |
|
-== Groovy Lookup == |
|
65 |
+== **Links** == |
82 |
82 |
|
83 |
|
-{{example}} |
84 |
|
-{{groovy}} |
85 |
|
-def now = new Date() |
86 |
|
-println("Current time: " + now) |
87 |
|
-{{/groovy}} |
88 |
|
-{{/example}} |
89 |
89 |
|
90 |
90 |
|
91 |
|
-== Expandable Summary == |
|
69 |
+==== **Internal Link**: Use square brackets with the page name. ==== |
92 |
92 |
|
93 |
|
-{{example}} |
94 |
|
-{{expandable summary="🧠 Study Summary"}} |
95 |
|
-Key findings go here. |
96 |
|
-{{/expandable}} |
97 |
|
-{{/example}} |
|
71 |
+{{code}} |
|
72 |
+[[PageName]] |
|
73 |
+{{/code}} |
98 |
98 |
|
99 |
|
-== List Formatting == |
100 |
100 |
|
101 |
|
-{{example}} |
102 |
|
-*Bad formatting* |
103 |
103 |
|
104 |
|
-* use - inconsistently |
105 |
|
-** Good formatting: |
106 |
|
-* Consistent bullet style |
107 |
|
-* Indented items properly |
108 |
|
-{{/example}} |
|
77 |
+==== **External Link**: Provide the URL directly. ==== |
109 |
109 |
|
110 |
|
-== Python Code == |
111 |
|
- |
112 |
|
-{{example}} |
113 |
|
-{{code language="python"}} |
114 |
|
-def greet(): |
115 |
|
- print("Hello World") |
|
79 |
+{{code}} |
|
80 |
+[https://www.example.com] |
116 |
116 |
{{/code}} |
117 |
|
-{{/example}} |
118 |
118 |
|
119 |
|
-== Audio Embedding == |
|
83 |
+((( |
|
84 |
+=== === |
|
85 |
+))) |
120 |
120 |
|
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}} |
129 |
129 |
|
130 |
|
-This page covers all the essential steps and tips you need to create great content in XWiki without any confusion. |
|
88 |
+== == |
131 |
131 |
|
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 |
|
- |
155 |
155 |
== ⚡ **Using the / Macro Shortcut** == |
156 |
156 |
|
157 |
157 |
The / macro shortcut is a powerful and quick way to insert macros while editing pages in XWiki's WYSIWYG editor: |
... |
... |
@@ -165,150 +165,131 @@ |
165 |
165 |
** /footnote – Add footnotes to your text |
166 |
166 |
** /code – Code blocks for programming snippets |
167 |
167 |
|
168 |
|
-This shortcut dramatically speeds up editing, no need to memorize complicated wiki syntax. |
|
103 |
+This shortcut dramatically speeds up editing, no need to memorize complicated wiki syntax |
169 |
169 |
|
170 |
170 |
---- |
171 |
171 |
|
172 |
|
-== ✏️** Basic Formatting and Links (Quick Guide)** == |
|
107 |
+## 🧪 1. **Macro Showcase: Source-to-Output Toggle**## |
173 |
173 |
|
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. |
|
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 |
179 |
179 |
|
180 |
|
----- |
181 |
181 |
|
182 |
|
-== 🔍 **Useful Tips & Best Practices** == |
|
112 |
+=== **TOC (Table of Contents) Macro**: Generates a table of contents based on page headings. === |
183 |
183 |
|
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. |
188 |
188 |
|
189 |
|
----- |
|
115 |
+{{code}} |
|
116 |
+{{toc/}} |
|
117 |
+{{/code}} |
190 |
190 |
|
191 |
|
-= ⚡**Guests can contribute** = |
192 |
192 |
|
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. |
|
120 |
+== **Gallery Macro** `/gallery` == |
196 |
196 |
|
197 |
|
-== **Content Guidelines** == |
|
122 |
+{{example}} |
|
123 |
+{{gallery}} |
|
124 |
+[[1747262485678-297.png]] |
|
125 |
+[[image:photo2.jpg]] |
|
126 |
+{{/gallery}} |
|
127 |
+{{/example}} |
198 |
198 |
|
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. |
201 |
201 |
|
202 |
|
-== **Directories and Page URLs** == |
|
130 |
+== **Alternatively** `/carousel` == |
203 |
203 |
|
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. |
|
132 |
+{{example}} |
|
133 |
+{{carousel/}} |
205 |
205 |
|
|
135 |
+ |
|
136 |
+{{/example}} |
206 |
206 |
|
|
138 |
+== **Boilerplate Box** == |
207 |
207 |
|
208 |
|
-== **XWiki Editing Modes** == |
|
140 |
+{{example}} |
|
141 |
+{{box cssClass="highlight"}} |
|
142 |
+Insert your highlighted content here. |
|
143 |
+{{/box}} |
|
144 |
+{{/example}} |
209 |
209 |
|
210 |
|
-XWiki offers multiple editing modes to accommodate various user preferences and technical requirements: |
|
146 |
+== == |
211 |
211 |
|
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. |
|
148 |
+== **Info vs Warning **`/info box` == |
215 |
215 |
|
216 |
|
-== **Essential Formatting Options** == |
|
150 |
+{{example}} |
|
151 |
+{{info}} |
|
152 |
+This is an info box. |
|
153 |
+{{/info}} |
217 |
217 |
|
218 |
|
-To ensure content is both engaging and accessible, utilize the following formatting techniques: |
|
155 |
+{{warning}} |
|
156 |
+This is a warning box. |
|
157 |
+{{/warning}} |
|
158 |
+{{/example}} |
219 |
219 |
|
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. |
|
160 |
+== **Footnote Demo** `/footnote and /put footnotes` put the put footnotes macro at the bottom where you want the references == |
221 |
221 |
|
222 |
|
-{{code}} |
223 |
|
- + Heading Level 1 |
224 |
|
- ++ Heading Level 2 |
225 |
|
- +++ Heading Level 3 |
226 |
|
-{{/code}} |
|
162 |
+{{example}} |
|
163 |
+footnote{{footnote}} https://www.thewhitearchive.org/bin/view/Guides%20and%20Help/Start%20here%20if%20you're%20new/#edit{{/footnote}} |
227 |
227 |
|
|
165 |
+{{putFootnotes/}} |
|
166 |
+{{/example}} |
228 |
228 |
|
229 |
|
-=== **Text Formatting** === |
230 |
230 |
|
|
169 |
+== == |
231 |
231 |
|
|
171 |
+== **Expandable Summary** `/expandable` VERY USEFUL MACRO == |
232 |
232 |
|
233 |
|
-* |
234 |
|
-** ((( |
235 |
|
-=== **Bold**: Surround text with double asterisks. === |
236 |
|
-))) |
|
173 |
+{{example}} |
|
174 |
+{{expandable summary="🧠 Study Summary"}} |
|
175 |
+Key findings go here. |
|
176 |
+{{/expandable}} |
|
177 |
+{{/example}} |
237 |
237 |
|
238 |
|
-{{code}} |
239 |
|
-**bold text** |
240 |
|
-{{/code}} |
|
179 |
+== == |
241 |
241 |
|
|
181 |
+== 📎 **Attachments and Images** == |
242 |
242 |
|
243 |
|
-* |
244 |
|
-** ((( |
245 |
|
-=== **Italics**: Use double underscores. === |
246 |
|
-))) |
|
183 |
+You can easily upload files and images directly from the WYSIWYG editor: |
247 |
247 |
|
248 |
|
-{{code}} |
249 |
|
-__italic text__ |
250 |
|
-{{/code}} |
|
185 |
+**Uploading Attachments:** |
251 |
251 |
|
|
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. |
252 |
252 |
|
253 |
|
-* |
254 |
|
-** ((( |
255 |
|
-=== **Underline**: Enclose text with double tildes. === |
256 |
|
-))) |
|
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` == |
257 |
257 |
|
258 |
|
-{{code}} |
259 |
|
-~~underlined text~~ |
260 |
|
-{{/code}} |
|
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}} |
261 |
261 |
|
|
203 |
+This page covers all the essential steps and tips you need to create great content in XWiki without any confusion. |
262 |
262 |
|
263 |
|
-* |
264 |
|
-** ((( |
265 |
|
-=== **Unordered List**: Begin lines with asterisk (*) or hyphen (-). === |
266 |
|
-))) |
|
205 |
+=== **Inserting Images with Enlargable Thumbnails** === |
267 |
267 |
|
268 |
|
-{{code}} |
269 |
|
-* Item 1 |
270 |
|
-* Item 2 |
271 |
|
-{{/code}} |
|
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. |
272 |
272 |
|
|
211 |
+[[image:1747262485678-297.png||data-xwiki-image-style="thumbnail-clickable" width="200"]] |
273 |
273 |
|
274 |
|
-* |
275 |
|
-** ((( |
276 |
|
-=== **Ordered List**: Start lines with a number followed by a period. === |
277 |
|
-))) |
278 |
278 |
|
279 |
|
-{{code}} |
280 |
|
-1. First item |
281 |
|
-2. Second item |
282 |
|
-{{/code}} |
283 |
283 |
|
284 |
284 |
|
285 |
|
-== **Links** == |
|
216 |
+=== **Alternatively: `~[~[image~:image.png]]`** === |
286 |
286 |
|
|
218 |
+{{example}} |
|
219 |
+[[image:1747262485678-297.png]] |
|
220 |
+{{/example}} |
287 |
287 |
|
288 |
288 |
|
289 |
|
-==== **Internal Link**: Use square brackets with the page name. ==== |
290 |
290 |
|
291 |
|
-{{code}} |
292 |
|
-[[PageName]] |
293 |
|
-{{/code}} |
|
224 |
+== == |
294 |
294 |
|
|
226 |
+---- |
295 |
295 |
|
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 |
|
- |
312 |
312 |
== **Utilizing XWiki Macros** == |
313 |
313 |
|
314 |
314 |
Macros are powerful tools in XWiki that allow for dynamic content inclusion and advanced formatting. Here are ten notable macros to consider: |
... |
... |
@@ -331,18 +331,8 @@ |
331 |
331 |
{{/code}} |
332 |
332 |
|
333 |
333 |
|
334 |
|
-== Footnote Macro == |
|
250 |
+== **Code Macro**: Renders code snippets with syntax highlighting. == |
335 |
335 |
|
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 |
|
- |
346 |
346 |
{{code}} |
347 |
347 |
{{code language="python"}} |
348 |
348 |
def hello_world(): |
... |
... |
@@ -351,26 +351,8 @@ |
351 |
351 |
{{/code}} |
352 |
352 |
|
353 |
353 |
|
354 |
|
-=== **Gallery Macro**: Creates an image gallery from attached images. === |
|
260 |
+== **Video Macro**: `/video` The Video macro embeds videos. == |
355 |
355 |
|
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 |
|
- |
374 |
374 |
{{example}} |
375 |
375 |
{{video url="https://www.youtube.com/watch?v=dQw4w9WgXcQ"/}} |
376 |
376 |
{{/example}} |