Skip to content

Commit a312ef6

Browse files
committed
Add linting and convert a few files
1 parent 5548c13 commit a312ef6

22 files changed

Lines changed: 135 additions & 111 deletions

.markdownlint.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
MD013: false
2+
MD033: false
3+
MD038: false

.vscode/extensions.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"recommendations": [
3+
"davidanson.vscode-markdownlint"
4+
]
5+
}

.vscode/settings.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"editor.codeActionsOnSave": {
3+
"source.fixAll.markdownlint": true
4+
},
5+
"markdownlint": {
6+
"lintWorkspaceGlobs": [
7+
"**/*.{md,markdown}",
8+
"!themes/**"
9+
]
10+
}
11+
}

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
# README
2+
13
git submodule update --init
2-
hugo server --disableFastRender --buildDrafts --buildFuture
4+
hugo server --disableFastRender --buildDrafts --buildFuture

config/_default/markup.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414

1515
[highlight]
1616
noClasses = false
17+
lineNos = true
18+
anchorLineNos = true
19+
guessSyntax = true
1720

1821
[tableOfContents]
1922
startLevel = 2

config/_default/params.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ autoSwitchAppearance = true
1111

1212
enableA11y = false
1313
enableSearch = false
14-
enableCodeCopy = true
14+
enableCodeCopy = false
1515

1616
replyByEmail = false
1717

content/posts/2008-06-25-purpose-website.markdown

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,3 @@ Yes I like to share, discuss, and debate many technological things, however anot
1717
This serves that purpose well.
1818

1919
This blog is obviously not complete. I will finish it over time, but it does share the same code with another website, so any improvements will reflect on both.
20-

content/posts/2008-07-05-making-django-version-control-friendly.markdown

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,12 @@ This file will go under version control.
1818

1919
Now, in your settings.py, add the line
2020

21-
{{< highlight python >}}
21+
```python
2222
from settings_local import *
23-
{{< / highlight >}}
23+
```
2424

2525
(I added the line to the very bottom of my settings.py)
2626

2727
So, now when a working copy of the project is grabbed, the person behind it can copy settings_local.py.dist to settings_local.py. Inside settings_local.py the environment's details are placed. This file will be ignored from version control.
2828

2929
With this setup, you can add an application or middle ware to settings.py for easy distributing through version control, and it will not affect a workspace's local variables.
30-

content/posts/2008-07-07-developed-directory-structure.markdown

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ Here is what I have come up with.
1717

1818
- projects/
1919
-- project 1/
20-
--- apps/
20+
--- apps/
2121
---- non reusable app 1/
2222
---- non reusable app 2/
23-
-- project 2/
24-
-- project 3/
25-
---apps
23+
-- project 2/
24+
-- project 3/
25+
---apps
2626
---- non reusable app 3/
2727

2828
- common/
@@ -44,9 +44,9 @@ Then for each virtual host, I add to the python path the projects folder, then r
4444

4545
That works for apache, but then to get manage.py to work (it doesn't work because none of the python paths are set for it), I edit "/etc/environment" and add the line
4646

47-
{{< highlight bash >}}
47+
```bash
4848
PYTHONPATH="/home/username/projects:/home/username/common:/home/username/external"
49-
{{< / highlight >}}
49+
```
5050

5151
Bingo, now manage.py works.
5252

content/posts/2008-07-08-structure-inside-project.markdown

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,38 +11,40 @@ Previously, my template folder and my media folder were in different parent dire
1111

1212
Inside my settings.py I have this:
1313

14-
{{< highlight python >}}
14+
```python
1515
import os, sys
1616
PROJECT_ROOT = os.path.dirname(__file__)
17-
sys.path.insert(0, os.path.join(PROJECT_ROOT, 'apps'))
18-
{{< / highlight >}}
17+
sys.path.insert(0, os.path.join(PROJECT_ROOT, 'apps'))
18+
```
1919

2020
The first two lines figure out the directory that the settings.py lives in
2121
The third line inserts my apps folder to the python path (this works great with my [django directory structure](http://kapsh.com/blog/2008/jul/01/developed-directory-structure/))
2222

2323
Now, the next step for me was to move my template and media directories around. My directory structure for a project is as follows:
2424

25+
```text
2526
-project
26-
--media
27-
---css
28-
---js
27+
--media
28+
---css
29+
---js
2930
---images
3031
--templates
3132
---application template directory 1
3233
---application template directory 2
33-
---base.html
34-
--apps
35-
---app1
36-
---app2
37-
--settings.py
34+
---base.html
35+
--apps
36+
---app1
37+
---app2
38+
--settings.py
3839
--settings_local.py
40+
```
3941

4042
So as you can see, my templates folder is in the same directory as my settings.py. My media folder is too. In order to avoid making this a variable too:
4143

42-
{{< highlight python >}}
44+
```python
4345
MEDIA_ROOT = os.path.join(PROJECT_ROOT, 'media')
4446

4547
TEMPLATE_DIRS = (
4648
os.path.join(PROJECT_ROOT, 'templates'),
4749
)
48-
{{< / highlight >}}
50+
```

0 commit comments

Comments
 (0)