Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
monero-site
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
monero-project
monero-site
Commits
f7a3f8ec
Unverified
Commit
f7a3f8ec
authored
10 years ago
by
Riccardo Spagni
Browse files
Options
Downloads
Patches
Plain Diff
moneropedia auto-fill index, entry for mining
parent
3851424f
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
_plugins/moneropedia.rb
+18
-0
18 additions, 0 deletions
_plugins/moneropedia.rb
knowledge-base/moneropedia/index.md
+10
-1
10 additions, 1 deletion
knowledge-base/moneropedia/index.md
knowledge-base/moneropedia/miners.md
+10
-0
10 additions, 0 deletions
knowledge-base/moneropedia/miners.md
with
38 additions
and
1 deletion
_plugins/moneropedia.rb
+
18
−
0
View file @
f7a3f8ec
...
...
@@ -31,6 +31,7 @@ module Jekyll
class
Markdown
<
Converter
alias
base_converter
convert
@@moneropedia
=
Array
.
new
@@moneropedia_ordered
=
Hash
.
new
def
convert
(
content
)
# build up index of Moneropedia summaries
...
...
@@ -47,10 +48,27 @@ module Jekyll
if
!
entry
.
empty?
@@moneropedia
.
push
({
:terms
=>
entry
[
'terms'
],
:summary
=>
entry
[
'summary'
],
:file
=>
File
.
basename
(
entry_file
,
".*"
)
})
@@moneropedia_ordered
=
@@moneropedia_ordered
.
merge
({
entry
[
'entry'
]
=>
File
.
basename
(
entry_file
,
".*"
)
})
end
end
end
# Jekyll.logger.warn YAML::dump(@@moneropedia_ordered)
if
content
.
include?
'@moneropedia'
# Moneropedia index, replace with a list of entries
cur_letter
=
'A'
replace
=
"<div class='col-lg-4'>
\n
<h4 class='text-center'>A</h4>
\n
"
@@moneropedia_ordered
.
sort
.
map
do
|
entry
,
link
|
if
cur_letter
!=
entry
[
0
]
replace
+=
"</div>
\n
<div class='col-lg-4'>
\n
<h4 class='text-center'>"
+
entry
[
0
]
+
"</h4>
\n
"
cur_letter
=
entry
[
0
]
end
replace
+=
"<a href='/knowledge-base/moneropedia/"
+
link
+
"'>"
+
entry
+
"</a><br>
\n
"
end
replace
+=
"</div>"
content
=
content
.
gsub
(
/(\@moneropedia)/i
,
replace
)
end
# replace instances of @term with tooltips of the summary
@@moneropedia
.
each
do
|
entry
|
entry
[
:terms
].
each
do
|
term
|
...
...
This diff is collapsed.
Click to expand it.
knowledge-base/moneropedia/index.md
+
10
−
1
View file @
f7a3f8ec
...
...
@@ -9,5 +9,14 @@ icon: "icon_wiki"
attribution
:
"
<!--
Icon
is
based
on
work
by
Freepik
(http://www.freepik.com)
and
is
licensed
under
Creative
Commons
BY
3.0
-->"
---
### Work in Progress
---
<div class="row">
@
moneropedia
</div>
---
If there is an entry you'd like to modify or be added, please
[
open an issue on this website's Github repository
](
https://github.com/monero-project/monero-site/issues
)
or submit changes via pull request.
This diff is collapsed.
Click to expand it.
knowledge-base/moneropedia/miners.md
0 → 100644
+
10
−
0
View file @
f7a3f8ec
---
layout
:
moneropedia
entry
:
"
Mining"
terms
:
[
"
mining"
,
"
miner"
,
"
miners"
]
summary
:
"
the
process
of
cryptographically
computing
a
mathematical
proof
for
a
block,
containing
a
number
of
transactions,
which
is
then
added
to
the
blockchain"
---
### The Basics
{{ page.summary | capitalize }}.
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment