プロジェクト

全般

プロフィール

操作

Markdown » 履歴 » リビジョン 3

« 前 | リビジョン 3/5 (差分) | 次 »
kanata, 2025/04/13 16:18


Markdown

Markdownの記述例

**太字**
*斜体*
~~取り消し線~~
`inline code`

# 見出し1
## 見出し2
### 見出し3

* リスト1
* リスト2
* リスト3

1. リスト1
2. リスト2
3. リスト3

\`\`\`java
public class HelloWorld {
  public static void main (String[] args) {
    System.out.println("hello, world");
  }
}
\`\`\`

| テーブルヘッダ1 | テーブルヘッダ2 |
|-----------------|-----------------|
| セル1           | セル2           |


[リンク](http://redmine.jp/)

![画像表示](test.png)

attachment:test.txt


Redmineのシンタックスハイライトの対応形式

形式 class属性に指定する値
C c, h
C++ cpp, cplusplus
Clojure clj
CSS css
Delphi delphi, pascal
diff diff
ERB erb, rhtml, eruby
Groovy groovy
HAML haml
HTML html, xhtml
Java java
Javascript java_script, ecma, ecmascript, ecma_script, javascript, js
JSON json
PHP php
plain text plaintext, plain
Python python
RHTML rhtml
Ruby ruby, irb
SQL sql
XML xml
YAML yaml, yml

Bashも追加したので、このサイトは以下も有効

形式 class属性に指定する値
シェルスクリプト(Bash) bash

上記記述のRedmineでの表示

目次

太字
斜体
取り消し線
inline code

見出し1

見出し2

見出し3

  • リスト1
  • リスト2
  • リスト3
  1. リスト1
  2. リスト2
  3. リスト3
public class HelloWorld {
  public static void main (String[] args) {
    System.out.println("hello, world");
  }
}
テーブルヘッダ1 テーブルヘッダ2
セル1 セル2

リンク

画像表示

test.txt

Redmine独自の特殊なWikiフォーマット

目次

目次(左寄せ)
{{>toc}}

目次(右寄せ)
{{toc}}

実際の表示:

マクロ

Redmineには以下のビルトインマクロがあります:

hello_world

サンプルマクロ

{{hello_world}}

実際の使用例:

Hello world! Object: WikiContentVersion, Called with no argument and no block of text.

include

wikiページの内容を挿入します。

{{include(Foo)}}

child_pages

子ページの一覧を表示します。引数の指定が無ければ現在のwikiページの子ページを表示します。

{{child_pages}}
{{child_pages(depth=2)}}

collapse

折り畳まれた状態のテキストを挿入します。以下は使用例です:

{{collapse(詳細を表示...)
この部分はデフォルトでは折り畳まれた状態で表示されます。
リンクをクリックすると展開されます。
}}

詳細を表示...

thumbnail

添付ファイルのサムネイル画像を表示

{{thumbnail(test.png)}}

test.png

macro_list

利用可能なマクロの一覧および説明を表示します。

{{macro_list}}

実際にやってみると↓

hello_world
Sample macro.
macro_list
Displays a list of all available macros, including description if available.
child_pages
Displays a list of child pages. With no argument, it displays the child pages of the current wiki page. Examples:

{{child_pages}} -- can be used from a wiki page only
{{child_pages(depth=2)}} -- display 2 levels nesting only
{{child_pages(Foo)}} -- lists all children of page Foo
{{child_pages(Foo, parent=1)}} -- same as above with a link to page Foo
include
Includes a wiki page. Examples:

{{include(Foo)}}
{{include(projectname:Foo)}} -- to include a page of a specific project wiki
collapse
Inserts of collapsed block of text. Examples:

{{collapse
This is a block of text that is collapsed by default.
It can be expanded by clicking a link.
}}

{{collapse(View details...)
With custom link text.
}}
thumbnail
Displays a clickable thumbnail of an attached image.
Default size is 200 pixels. Examples:

{{thumbnail(image.png)}}
{{thumbnail(image.png, size=300, title=Thumbnail)}} -- with custom title and size
issue
Displays an issue link including additional information. Examples:

{{issue(123)}}                              -- Issue #123: Enhance macro capabilities
{{issue(123, project=true)}}                -- Andromeda - Issue #123: Enhance macro capabilities
{{issue(123, tracker=false)}}               -- #123: Enhance macro capabilities
{{issue(123, subject=false, project=true)}} -- Andromeda - Issue #123
rawhtml
asciinema
     Graphical application developers often use screencasts to demonstrate functions of their programs.

     Syntax: {{asciinema(cast_id)}}

     Parameters:
      cast_id (string) – asciinema.org asciicast id

     Scope:
      This macro works in all text fields with formatting support.

     Examples:
      show asciinema.org cast_id 113463
      {{asciinema(113463)}}
attachment_link
    Link to any attachment.

    Syntax:

      {{attachment_link(ID, [id=INT, text=Custom link name, download=BOOL])}}

    Parameters:

      :param int id: id of attachment (required)
      :param string text: alternativ link text (default is filename of attachment)
      :param bool download: true or false (if true, attachment is linked to direct download; default false)

    Examples:

      {{attachment_link(1)}} or {{attachment_link(id=1)}}
      ...Link to attachment of issue with attachment id 1

      {{attachment_link(1, name=Important file of other issue)}}
      ...Link to attachment of issue with attachment id 1 and use link name "Important file of other issue"

      {{attachment_link(1, download=TRUE)}}
      ...Link to attachment of issue with attachment id 1. Link to download file"
cryptocompare
    Show CryptoCompare information.

    Syntax:

      {{cryptocompare(options)}}

    Parameters:

      :param string fsym: default BTC
      :param string tsym: default EUR
      :param string fsyms: default BTC,ETH,LTC (if supported by widget type)
      :param string tsyms: default EUR,USD (if supported by widget type)
      :param string period: (if supported by widget type)

                            * 1D = 1 day (default)
                            * 1W = 1 week
                            * 2W = 2 weeks
                            * 1M = 1 month
                            * 3M = 3 months
                            * 6M = 6 months
                            * 1Y = 1 year

      :param string type: widget type has to be one of

                            * advanced
                            * chart (default)
                            * converter
                            * header
                            * header_v2
                            * header_v3
                            * historical
                            * list
                            * news
                            * summary
                            * tabbed
                            * titles

      Examples:
       Show `header_v3` widget type for crypto currencies `BTC` and `ETH`:
       {{cryptocompare(fsyms=BTC;ETH, type=header_v3)}}
date
    Display current date.

    Syntax:

      {{date([TYPE])}}
      TYPE
      - current_date           current date (default)
      - current_date_with_time current date with time
      - current_year           current year
      - current_month          current month
      - current_day            current day
      - current_hour           current hour
      - current_minute         current minute
      - current_weekday        current weekday
      - current_weeknumber     current week number (1 - 52) The week starts with Monday
      - YYYY-MM-DD             e.g. 2018-12-24, which will formated with Redmine date format

    Examples:

        {{date}}
        ...show current date
        {{date(current_year)}}
        ...show current year
        {{date(current_month)}}
        ...show current month
        {{date(current_weeknumber)}}
        ...show current week number
fa
    Show Font Awesome icon.

    Syntax:

      {{fa(ICON [, class=CLASS, title=TITLE, text=TEXT size=SIZE, color=COLOR)}}
      ICON of fontawesome icon, eg. fa-adjust
      CLASS = additional css classes
      TITLE = mouseover title
      TEXT = Text to show
      LINK = Link icon and text (if specified) to this URL
      COLOR = css color code

    Examples:

      {{fa(adjust)}}
      ...show fontawesome icon "fas fa-adjust"
      {{fa(adjust, class=fa-inverse)}}
        ...show fontawesome icon "fas fa-stack" and inverse
      {{fa(adjust, size=4x)}}
        ...show fontawesome icon "fas fa-adjust" with size 4x
      {{fa(fas_adjust, title=Show icon)}}
      ...show fontawesome icon "fas fa-adjust" with title "Show icon"
      {{fa(fab_angellist)}}
      ...Show fontawesome icon "fab fa-angellist"
      {{fa(adjust, link=https=//www.redmine.org))}}
      ...Show fontawesome icon "fas fa-adjust" and link it to https://www.redmine.org
      {{fa(adjust, link=https=//www.redmine.de, name=Go to Redmine.org))}}
      ...Show fontawesome icon "fas fa-adjust" with name "Go to Redmine.org" and link it to https://www.redmine.org
gist
    Embet GitHub gist

    Syntax:

    {{gist(gist)}}

    Parameters:

      :param string gist: gist to display. With or without Github username.

    Examples:
      {{gist(6737338)}} - show Github gist ``6737338`` (without user name)
      {{gist(plentz/6737338)}} - Show Github gist ``plentz/6737338`` (with user name)
gmap
    Display a google map.

    Syntax:

    {{gmap([q=QUERY, mode=MODE, width=216, height=368])}}

    Parameters:

      :param string q: query, e.g. a city or location
      :param string mode: place, directions, search, view oder streetview (default: search)
      :param int width: widget width
      :param int height: widget height

    Examples:

      {{gmap(Munich)}} Google maps with Munich
      {{gmap(mode=directions, origin=Munich+Rosenheimerstr, destination=Arco)}} Direction from Munich to Arco
google_docs
    Google docs macro to include Google documents.

    Syntax:

      {{google_docs(<link> [, width=100%, height=485, edit_link=LINK)}}

    Parameters:

      :param string link: Embedded Google docs link
      :param int width: width (if not specified, 100% is used)
      :param int height: height (if not specified, 485 is used)
      :param int edit_link: Link to edit page

    Examples:

      {{google_docs(https://docs.google.com/spreadsheets/d/e/2PACX-1vQL__Vgu0Y0f-P__GJ9kpUmQ0S-HG56ni_b-x4WpWxzGIGXh3X6A587SeqvJDpH42rDmWVZoUN07VGE/pubhtml)}
      {{google_docs(https://docs.google.com/spreadsheets/d/e/2PACX-1vQL__Vgu0Y0f-P__GJ9kpUmQ0S-HG56ni_b-x4WpWxzGIGXh3X6A587SeqvJDpH42rDmWVZoUN07VGE/pubhtml, width=514, height=422)}
gps
    Display a GPS coordinates and link it to Google or Openstreetmap.

    Syntax:

    {{gps([lat=LAT, lon=LON, zoom=ZOOM, service=SERVICE, layer=LAYER, name=NAME])}}

    or

    {{gps(LAT, LON, zoom=ZOOM, service=SERVICE, layer=LAYER, name=NAME])}}

    Parameters:

      :param string lat: latitude of location
      :param string log: longitude of location
      :param int zoom: zoom level (if service supports it)
      :param string service: show only this service. osm, gmap, route, hike or bayern
      :param string layer: layer to use (if service supports it)
      :param string name: if specified, name is used as link name

    Examples:

      {{gps(49.56083,11.56018)}}
      {{gps(49.56083,11.56018,zoom=12)}}
      {{gps(49.56083,11.56018,layer=gmap)}}
      {{gps(lat=49.56083,lon=11.56018)}}
group_users
    List users of a user group (according the respective permissions)

    Syntax:

      {{group_users(GROUP_NAME}}

    Examples:

      {{group_users(Team A)}} - list users of group "Team A"
iframe
    Include an Iframe into Redmine. If your Redmine is running with HTTPS, only iframes with
    HTTPS are accepted by this macro.

    Syntax:

      {{iframe(<url> [, width=100%, height=485)}}

    Parameters:

      :param string url: URL to website
      :param int width: width (default is 100%)
      :param int height: height (default is 485)
      :param bool with_link: true or false (if link to url should be displayed below iframe)

    Examples:

      show iframe of URL https://www.google.com/
      {{iframe(https://www.google.com/)}}

      show iframe of URL https://www.google.com/ and show link to it
      {{iframe(https://www.google.com/, with_link: true)}}
last_updated_at
    Displays date of last update of a wiki page.

    Syntax:

    {{last_updated_at([<project_name or project_identifier>, wiki_page])}}

    Scope:

    This macro only works in wiki page contexts.
last_updated_by
    Displays a user who updated the page.

    Syntax:

    {{last_updated_by}}

    Scope:

    This macro only works in wiki page contexts.
members
    Display members.

    Syntax:

      {{members([PROJECT_NAME, title=My members list, role=ROLE, with_sum=BOOL)]}}

      PROJECT_NAME can be project identifier, project name or project id

    Parameters:

      :param string project_name: can be project identifier, project name or project id
      :param string title: title to use for member list
      :param string role: only list members with this role. If you want to use multiple roles as filters, you have to use a | as separator.
      :param bool with_sum: show amount of members.

    Examples:

      {{members}}
      ...List all members for all projects (with the current user permission)

      {{members(with_sum=true)}}
      ...List all members for all projects and show title with amount of members

      {{members(the-identifier)}}
      ...A box showing all members for the project with the identifier of 'the-identifier'

      {{members(the-identifier, role=Manager)}}
      ...A box showing all members for the project with the identifier of 'the-identifier', which
      have the role "Manager"

      {{members(the-identifier, title=My user list)}}
      ...A box showing all members for the project with the identifier of 'the-identifier' and with
      box title "My user list"
meteoblue
    Display current weather from meteoblue service.

    Syntax:

    {{meteoblue(<location> [, days=INT, width=216, height=368, color=BOOL])}}

    Params:

      :param string location: Weather location,
                    e.g. münchen_deutschland_2867714. This is the part after
                    https://www.meteoblue.com/en/weather/forecast/week/
      :param int width: widget width
      :param int height: widget height
      :param bool color: color or monochrome
      :param bool pictoicon: pictoicon
      :param bool maxtemperature: maxtemperature
      :param bool mintemperature: mintemperature
      :param bool windspeed: windspeed
      :param bool windgust: windgust
      :param bool winddirection: winddirection
      :param bool uv: uv
      :param bool humidity: humidity
      :param bool precipitation: precipitation
      :param bool precipitationprobability: precipitationprobability
      :param bool spot: spot

    Examples:

      {{meteoblue(münchen_deutschland_2867714)}}       weather for Munich

      {{meteoblue(münchen_deutschland_2867714, days=6, color=false)}} weather for Munich of the next 6 days without color
new_issue
    Create a link for "New issue" for the current user.

    Syntax:

      {{new_issue([PROJECT_NAME, name=Custom name]}}

      PROJECT_NAME can be project identifier, project name or project id.

      If no PROJECT_NAME is specified, first project is used, which the current user
      has permission to create an issue.

    Parameters:

      :param string project_name: can be project identifier, project name or project id
                                  If no project_name is specified, first project is used, which the current user
                                  has permission to create an issue.
      :param string name: name to use for link. If not specified, "New issue" is used.
                          You can use all language as suffix, eg. name_de, name_it, button_es

    Examples:

      Link to create new issue in first available project:
      {{new_issue}}
      Link to create new issue in project with the identifier of 'the-identifier':
      {{new_issue(the-identifier)}}
      Link to create new issue in project with the identifier of 'the-identifier'
      and the name 'New issue for broken displays'
      {{new_issue(the-identifier, title=New issue for broken displays)}}
projects
    List projects.

    Syntax:

      {{projects([title=My project list, with_create_issue=BOOL])}}

    Examples:

      {{projects}}
      ...List all project, which I am member of

      {{projects(title=My project list)}}
      ...List all project with title "My project list", which I am member of

      {{projects(with_create_issue=true)}}
      ...List all project with link to create new issue, which I am member of
recently_updated
    Displays a list of wiki pages that were updated recently.

    Syntax:

      {{recently_updated([days])}}

    Scope:

      This macro only works in wiki page contexts.

    Examples:

      {{recently_updated}} - List last updated pages (of the last 5 days)
      {{recently_updated(15)}} - List last updated pages of the last 15 days
reddit
    Creates link to reddit.
      {{reddit(<subject or user name>)}}

    Examples:

     {{reddit(redmine)}} or {{reddit(r/redmine)}} - Show link to reddit subject `r/redmine`
     {{reddit(u/redmine)}} - Show link to reddit user profile `u/redmine`
redmine_issue
   Link to a redmine.org issue.

   Syntax:

   {{redmine_issue(id or url [, title=TITLE])}}

   Parameters:

    :param string id: issue id from redmine.org
    :param string url: this can be an absolute path to an redmine.org issue or an issue id
    :param string title: title of link to display

   Examples:

      Link to redmine.org issue with issue id:
      {{redmine_issue(1333)}}
      Link to redmine.org issue with issue id and anchor:
      {{redmine_issue(1333#note-6)}}
      Link to redmine.org issue with absolute url:
      {{redmine_issue(http://www.redmine.org/issues/12066)}}
redmine_wiki
  Link to redmine.org wiki page.

  Syntax:

    {{redmine_wiki(url [, name=NAME, title=TITLE])}}

  Parameters:

    :param string url: this can be an absolute path to an redmine.org issue or an issue id
    :param string name: name to display for link, if not specified, wiki page name is used
    :param string title: title of link to display

  Examples:

    Link to redmine.org wiki page with page name:
    {{redmine_wiki(RedmineInstall)}}
    Link to redmine.org wiki page with page name and anchor:
    {{redmine_wiki(FAQ#How-do-I-create-sub-pages-parentchild-relationships-in-the-wiki)}}
    Link to redmine.org wiki page with absolute url:
    {{redmine_wiki(https://www.redmine.org/projects/redmine/wiki/RedmineInstall)}}
slideshare
    Slideshare macro to include Slideshare slide.

    Syntax:

      {{slideshare(<key> [, width=595, height=485, slide=SLIDE])}}

    Parameters:

      :param string key: Slideshare embedded key code, e.g. 57941706. This is the part is the last number in url: http://de.slideshare.net/AnimeshSingh/caps-whats-best-for-deploying-and-managing-openstack-chef-vs-ansible-vs-puppet-vs-salt-57941706
      :param int width: width
      :param int height: height
      :param int slide: Slide page

    Examples:

      {{slideshare(57941706)}} show slideshare slide with default size 595x485
      {{slideshare(57941706, width=514, height=422)}} show slide with user defined size
      {{slideshare(57941706, slide=5)}} start with slide (page) 5
twitter
    Creates link to twitter account page or topic.

    Syntax:

    {{twitter(name)}}

    Parameters:

      :param string profile: Twitter profile name with @. E.g. alphanodes

    Examples:

    {{twitter(alphanodes)}} - Show link to twitter profile `@alphanodes`
    {{twitter(#redmine)}} - Show link to hashtag `#redmine`
user
Display link to user profile

Syntax:

{{user(USER_NAME [, format=USER_FORMAT, text=BOOL], avatar=BOOL])}}

USER_NAME can be user id or user name (login name)
USER_FORMATS
- system (use system settings) (default)
- firstname_lastname
- firstname_lastinitial
- firstinitial_lastname
- firstname
- lastname_firstname
- lastnamefirstname
- lastname_comma_firstname
- lastname
- username

Examples:

{{user(1)}}
...Link to user with user id 1

{{user(1, avatar=true)}}
...Link to user with user id 1 with avatar

{{user(current_user, text=true)}}
...Show only user (without link) of the current user

{{user(admin)}}
...Link to user with username 'admin'

{{user(admin, format=firstname)}}
...Link to user with username 'admin' and show firstname as link text
vimeo
    Vimeo macro to include Vimeo video or show link to Vimeo video.

    Syntax:

      {{vimeo(<video key> [, width=640, height=360, autoplay=BOOL, mode=MODE, name=NAME, title=TITLE])}}

    Parameters:

      :param string video key: Vimeo video key, e.g. KMU0tzLwhbE.
      :param int width: width
      :param int height: height
      :param bool autoplay: autoplay video
      :param string mode: iframe or link
      :param string group: link video to group (only used with param mode = link)
      :param string name: name of link (only used with param mode = link)
      :param string title: title/mouseover of link (only used with param mode = link)

    Examples:

      {{vimeo(142849533)}} show video with default size 640x360
      {{vimeo(142849533, width=853, height=480)}} show video with user defined size
      {{vimeo(142849533, autoplay=true)}} autoplay video
      {{vimeo(142849533, mode=link)}} show link to Vimeo video
      {{vimeo(142849533, mode=link, name=Cool video)}} show link to Vimeo video and name it 'Cool video'
      {{vimeo(142849533, title=Cool video)}} use mouse over title 'Cool video' on video link
youtube
    Youtube macro to include Youtube video or show link to Youtube video.

    Syntax:

      {{youtube(<video key> [, width=640, height=360, autoplay=BOOL, mode=MODE, name=NAME, title=TITLE])}}

    Parameters:

      :param string video key: Youtube video key, e.g. KMU0tzLwhbE.
      :param int width: width
      :param int height: height
      :param bool autoplay: autoplay video
      :param string mode: iframe or link
      :param string name: name of link (only used with param mode = link)
      :param string title: title/mouseover of link (only used with param mode = link)

    Examples:

      {{youtube(KMU0tzLwhbE)}} show video with default size 640x360
      {{youtube(KMU0tzLwhbE, width=853, height=480)}} show video with user defined size
      {{youtube(KMU0tzLwhbE, autoplay=true)}} autoplay video
      {{youtube(KMU0tzLwhbE, mode=link)}} show link to Youtube video
      {{youtube(KMU0tzLwhbE, mode=link, name=Cool video)}} show link to Youtube video and name it 'Cool video'
      {{youtube(KMU0tzLwhbE, title=Cool video)}} use mouse over title 'Cool video' on video link

その他の記法(Textile記法含む)

Redmineにおけるwiki記法
http://redmine.jp/tech_note/RedmineWikiFormatting/

Wiki formatting
http://redmine.jp/files/wiki_syntax_ja/wiki_syntax_detailed.html

Redmine text formatting cheat sheet
https://alphanodes.com/de/infografiken/redmine-wikisyntax-cheatsheet.pdf

Markdown記法まとめてみた
https://qiita.com/futaro0405/items/3b86020afbb2c45f13f2

その他(tool)

Microsoft Word を Markdown に変換するコマンド「docx2md」を作った
https://mattn.kaoriya.net/software/lang/go/20191010130133.htm

Tags:

kanata さんが29日前に更新 · 5件の履歴