Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
freedombone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Context Sensitive Group
freedombone
Commits
d095710e
Unverified
Commit
d095710e
authored
8 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Change to markdown blog posts
parent
04c63f16
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/freedombone-app-blogstatic
+2
-2
2 additions, 2 deletions
src/freedombone-app-blogstatic
src/freedombone-image-mesh
+4
-0
4 additions, 0 deletions
src/freedombone-image-mesh
src/freedombone-mesh-blog
+8
-10
8 additions, 10 deletions
src/freedombone-mesh-blog
with
14 additions
and
12 deletions
src/freedombone-app-blogstatic
+
2
−
2
View file @
d095710e
...
...
@@ -190,8 +190,8 @@ function mesh_install_blogstatic {
mkdir
-p
$rootdir$STATIC_BLOG_PATH
fi
if
[
!
-d
$rootdir$STATIC_BLOG_INSTALL_DIR
/content
]
;
then
mkdir
-p
$rootdir$STATIC_BLOG_INSTALL_DIR
/content
if
[
!
-d
$rootdir$STATIC_BLOG_INSTALL_DIR
/content
/images
]
;
then
mkdir
-p
$rootdir$STATIC_BLOG_INSTALL_DIR
/content
/images
fi
create_pelican_conf
$rootdir$STATIC_BLOG_INSTALL_DIR
/pelicanconf.py
...
...
This diff is collapsed.
Click to expand it.
src/freedombone-image-mesh
+
4
−
0
View file @
d095710e
...
...
@@ -765,6 +765,10 @@ function setup_ipfs {
rm
-rf
/home/
$MY_USERNAME
/Public
fi
if
[
-d
/home/
$MY_USERNAME
/CreateBlog/content/images
]
;
then
shred
-zu
/home/
$MY_USERNAME
/CreateBlog/content/images/
*
fi
if
[
-d
/home/
$MY_USERNAME
/CreateBlog/content
]
;
then
shred
-zu
/home/
$MY_USERNAME
/CreateBlog/content/
*
if
grep
-q
"THEME="
/home/
$MY_USERNAME
/CreateBlog/pelicanconf.py
;
then
...
...
This diff is collapsed.
Click to expand it.
src/freedombone-mesh-blog
+
8
−
10
View file @
d095710e
...
...
@@ -84,13 +84,11 @@ function view_blog {
function
new_blog
{
DATESTR
=
$(
date
"+%Y-%m-%d %H:%M:%S"
)
echo
$'Blog Post Title'
>
~/.new-blog-entry
echo
$'###############'
>>
~/.new-blog-entry
echo
''
>>
~/.new-blog-entry
echo
$":date:
${
DATESTR
}
"
>>
~/.new-blog-entry
echo
$":author:
$(
toxid
--showuser
)
"
>>
~/.new-blog-entry
echo
$':category: default'
>>
~/.new-blog-entry
echo
$':tags: blog, tag'
>>
~/.new-blog-entry
echo
$'Title: Blog Post Title'
>
~/.new-blog-entry
echo
$"Date:
${
DATESTR
}
"
>>
~/.new-blog-entry
echo
$"Author:
$(
toxid
--showuser
)
"
>>
~/.new-blog-entry
echo
$'Category: default'
>>
~/.new-blog-entry
echo
$'Tags: blog, tag'
>>
~/.new-blog-entry
echo
''
>>
~/.new-blog-entry
echo
$'Add your text here'
>>
~/.new-blog-entry
echo
''
>>
~/.new-blog-entry
...
...
@@ -109,7 +107,7 @@ function new_blog {
# move to the content directory
CURRENT_INDEX
=
$(
cat
$CURRENT_BLOG_INDEX
)
mv
~/.new-blog-entry
$BLOG_CONTENT_PATH
/
${
CURRENT_INDEX
}
_post.
rst
mv
~/.new-blog-entry
$BLOG_CONTENT_PATH
/
${
CURRENT_INDEX
}
_post.
md
# increment the index
CURRENT_INDEX
=
$((
CURRENT_INDEX
+
1
))
...
...
@@ -124,7 +122,7 @@ function edit_blog {
fi
CURRENT_INDEX
=
$(
cat
$CURRENT_BLOG_INDEX
)
PREVIOUS_INDEX
=
$((
CURRENT_INDEX
-
1
))
LAST_BLOG_ENTRY
=
$BLOG_CONTENT_PATH
/
${
PREVIOUS_INDEX
}
_post.
rst
LAST_BLOG_ENTRY
=
$BLOG_CONTENT_PATH
/
${
PREVIOUS_INDEX
}
_post.
md
if
[
!
-f
$LAST_BLOG_ENTRY
]
;
then
return
fi
...
...
@@ -138,7 +136,7 @@ function delete_blog {
fi
CURRENT_INDEX
=
$(
cat
$CURRENT_BLOG_INDEX
)
PREVIOUS_INDEX
=
$((
CURRENT_INDEX
-
1
))
LAST_BLOG_ENTRY
=
$BLOG_CONTENT_PATH
/
${
PREVIOUS_INDEX
}
_post.
rst
LAST_BLOG_ENTRY
=
$BLOG_CONTENT_PATH
/
${
PREVIOUS_INDEX
}
_post.
md
if
[
!
-f
$LAST_BLOG_ENTRY
]
;
then
return
fi
...
...
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